当前位置: 首页>>代码示例>>C++>>正文


C++ GetBonusHonorFromKill函数代码示例

本文整理汇总了C++中GetBonusHonorFromKill函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBonusHonorFromKill函数的具体用法?C++ GetBonusHonorFromKill怎么用?C++ GetBonusHonorFromKill使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetBonusHonorFromKill函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DEBUG_LOG

void BattleGroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
    DEBUG_LOG("BattleGroundAV: player destroyed point node %i", node);

    STRAWBERRY_ASSERT(m_Nodes[node].Owner != BG_AV_TEAM_NEUTRAL)
    BattleGroundTeamIndex ownerTeamIdx = BattleGroundTeamIndex(m_Nodes[node].Owner);
    Team ownerTeam = ownerTeamIdx == BG_TEAM_ALLIANCE ? ALLIANCE : HORDE;

    // despawn banner
    DestroyNode(node);
    PopulateNode(node);
    UpdateNodeWorldState(node);

    if (IsTower(node))
    {
        uint8 tmp = node - BG_AV_NODES_DUNBALDAR_SOUTH;
        // despawn marshal (one of those guys protecting the boss)
        SpawnEvent(BG_AV_MARSHAL_A_SOUTH + tmp, 0, false);

        UpdateScore(GetOtherTeamIndex(ownerTeamIdx), (-1) * BG_AV_RES_TOWER);
        RewardReputationToTeam((ownerTeam == ALLIANCE) ? BG_AV_FACTION_A : BG_AV_FACTION_H, m_RepTowerDestruction, ownerTeam);
        RewardHonorToTeam(GetBonusHonorFromKill(BG_AV_KILL_TOWER), ownerTeam);
        SendYell2ToAll(LANG_BG_AV_TOWER_TAKEN, LANG_UNIVERSAL, GetSingleCreatureGuid(BG_AV_HERALD, 0), GetNodeName(node), (ownerTeam == ALLIANCE) ? LANG_BG_ALLY : LANG_BG_HORDE);
    }
    else
    {
        SendYell2ToAll(LANG_BG_AV_GRAVE_TAKEN, LANG_UNIVERSAL, GetSingleCreatureGuid(BG_AV_HERALD, 0), GetNodeName(node), (ownerTeam == ALLIANCE) ? LANG_BG_ALLY : LANG_BG_HORDE);
    }
}
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:29,代码来源:BattleGroundAV.cpp

示例2: RewardXpToTeam

void BattleGroundEY::EndBattleGround(Team winner)
{
    //win reward
    if(winner)
        RewardXpToTeam(0, 0.8f, winner);
    if (winner == ALLIANCE)
        RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
    if (winner == HORDE)
        RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
    //complete map reward
    RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
    RewardXpToTeam(0, 0.8f, ALLIANCE);
    RewardXpToTeam(0, 0.8f, HORDE);

    BattleGround::EndBattleGround(winner);
}
开发者ID:KioM,项目名称:mangos,代码行数:17,代码来源:BattleGroundEY.cpp

示例3: RewardHonorToTeam

void BattleGroundSA::EndBattleGround(Team winner)
{
    //win reward
    if(winner)
    {
        RewardHonorToTeam(GetBonusHonorFromKill(1), winner);
        RewardXpToTeam(0, 0.8f, winner);
    }

    //complete map_end rewards (even if no team wins)
    RewardHonorToTeam(GetBonusHonorFromKill(2), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(2), HORDE);
    RewardXpToTeam(0, 0.8f, ALLIANCE);
    RewardXpToTeam(0, 0.8f, HORDE);
    
    BattleGround::EndBattleGround(winner);
}
开发者ID:Sar777,项目名称:mangos,代码行数:17,代码来源:BattleGroundSA.cpp

示例4: RewardHonorToTeam

void BattleGroundEY::EndBattleGround(uint32 winner)
{
    //win reward
    if (winner)
    {
        RewardHonorToTeam(GetBonusHonorFromKill(sWorld.getConfig(CONFIG_UINT32_BONUS_HONOR_EOS_WIN)), winner);
        RewardXpToTeam(0, 0.8, winner);
    }
    
    //complete map reward
    RewardHonorToTeam(GetBonusHonorFromKill(sWorld.getConfig(CONFIG_UINT32_BONUS_HONOR_EOS_END)), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(sWorld.getConfig(CONFIG_UINT32_BONUS_HONOR_EOS_END)), HORDE);
    RewardXpToTeam(0, 0.8, ALLIANCE);
    RewardXpToTeam(0, 0.8, HORDE);

    BattleGround::EndBattleGround(winner);
}
开发者ID:christof69,项目名称:fusion,代码行数:17,代码来源:BattleGroundEY.cpp

示例5: RewardHonorToTeam

void BattleGroundWS::EndBattleGround(uint32 winner)
{
    //win reward
    if (winner)
    {
        RewardHonorToTeam(GetBonusHonorFromKill(sWorld.getConfig(CONFIG_UINT32_BONUS_HONOR_WSG_WIN)), winner);
        RewardXpToTeam(0, 0.8f, winner);
    }

    //complete map_end rewards (even if no team wins)
    RewardHonorToTeam(GetBonusHonorFromKill(sWorld.getConfig(CONFIG_UINT32_BONUS_HONOR_WSG_END)), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(sWorld.getConfig(CONFIG_UINT32_BONUS_HONOR_WSG_END)), HORDE);
    RewardXpToTeam(0, 0.8f, ALLIANCE);
    RewardXpToTeam(0, 0.8f, HORDE);

    BattleGround::EndBattleGround(winner);
}
开发者ID:Archives,项目名称:try,代码行数:17,代码来源:BattleGroundWS.cpp

示例6: RewardHonorToTeam

void BattleGroundEY::EndBattleGround(Team winner)
{
    // win reward
    if (winner == ALLIANCE)
        RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
    if (winner == HORDE)
        RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
    // complete map reward
    RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);

    // disable capture points
    for (uint8 i = 0; i < EY_NODES_MAX; ++i)
        if (GameObject* go = GetBgMap()->GetGameObject(m_towers[i]))
            go->SetLootState(GO_JUST_DEACTIVATED);

    BattleGround::EndBattleGround(winner);
}
开发者ID:mangosfour,项目名称:server,代码行数:18,代码来源:BattleGroundEY.cpp

示例7: RemoveAuraOnTeam

void BattlegroundWS::EndBattleground(uint32 winner)
{
	// Remove flag debuff
	RemoveAuraOnTeam(BG_WS_SPELL_FOCUSED_ASSAULT, ALLIANCE);
	RemoveAuraOnTeam(BG_WS_SPELL_BRUTAL_ASSAULT, ALLIANCE);
	RemoveAuraOnTeam(BG_WS_SPELL_FOCUSED_ASSAULT, HORDE);
	RemoveAuraOnTeam(BG_WS_SPELL_BRUTAL_ASSAULT, HORDE);

    // Win reward
    if (winner == ALLIANCE)
        RewardHonorToTeam(GetBonusHonorFromKill(m_HonorWinKills), ALLIANCE);
    if (winner == HORDE)
        RewardHonorToTeam(GetBonusHonorFromKill(m_HonorWinKills), HORDE);
    //complete map_end rewards (even if no team wins)
    RewardHonorToTeam(GetBonusHonorFromKill(m_HonorEndKills), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(m_HonorEndKills), HORDE);

    Battleground::EndBattleground(winner);
}
开发者ID:boom8866,项目名称:new,代码行数:19,代码来源:BattlegroundWS.cpp

示例8: GetTeamIndexByTeamId

void BattleGroundEY::AddPoints(Team team, uint32 points)
{
    BattleGroundTeamIndex team_index = GetTeamIndexByTeamId(team);
    m_TeamScores[team_index] += points;
    m_honorScoreTicks[team_index] += points;
    if (m_honorScoreTicks[team_index] >= m_honorTicks)
    {
        RewardHonorToTeam(GetBonusHonorFromKill(1), team);
        m_honorScoreTicks[team_index] -= m_honorTicks;
    }
}
开发者ID:mangosfour,项目名称:server,代码行数:11,代码来源:BattleGroundEY.cpp

示例9: RewardHonorToTeam

void BattleGroundEY::EndBattleGround(uint32 winner)
{
    //win reward
    if (winner == ALLIANCE)
	{
        RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
		RewardXpToTeam(0, 0.8, winner);
	}
    if (winner == HORDE)
	{
        RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
		RewardXpToTeam(0, 0.8, winner);
	}
    //complete map reward
    RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
	RewardXpToTeam(0, 0.8, ALLIANCE);
    RewardXpToTeam(0, 0.8, HORDE);
    BattleGround::EndBattleGround(winner);
}
开发者ID:Ankso,项目名称:mangos,代码行数:20,代码来源:BattleGroundEY.cpp

示例10: RewardHonorToTeam

void BattleGroundWS::EndBattleGround(uint32 winner)
{
    //win reward
    if (winner == ALLIANCE)
	{
        RewardHonorToTeam(GetBonusHonorFromKill(m_HonorWinKills), ALLIANCE);
		RewardXpToTeam(0, 0.8, winner);
	}
    if (winner == HORDE)
	{
        RewardHonorToTeam(GetBonusHonorFromKill(m_HonorWinKills), HORDE);
		RewardXpToTeam(0, 0.8, winner);
	}
    //complete map_end rewards (even if no team wins)
    RewardHonorToTeam(GetBonusHonorFromKill(m_HonorEndKills), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(m_HonorEndKills), HORDE);
	RewardXpToTeam(0, 0.8, ALLIANCE);
    RewardXpToTeam(0, 0.8, HORDE);

    BattleGround::EndBattleGround(winner);
}
开发者ID:Ankso,项目名称:mangos,代码行数:21,代码来源:BattleGroundWS.cpp

示例11: GetTeamIndexByTeamId

void BattlegroundEY::AddPoints(uint32 Team, uint32 Points)
{
    BattlegroundTeamId team_index = GetTeamIndexByTeamId(Team);
    m_TeamScores[team_index] += Points;
    m_HonorScoreTics[team_index] += Points;
    if (m_HonorScoreTics[team_index] >= m_HonorTics)
    {
        RewardHonorToTeam(GetBonusHonorFromKill(1), Team);
        m_HonorScoreTics[team_index] -= m_HonorTics;
    }
    UpdateTeamScore(Team);
}
开发者ID:Gamerzon94,项目名称:wowrean-emu,代码行数:12,代码来源:BattlegroundEY.cpp

示例12: GetTeamIndexByTeamId

void BattleGroundBG::AddPoints(Team team, uint32 points)
{
    TeamIndex team_index = GetTeamIndexByTeamId(team);
    m_TeamScores[team_index] += points;
    m_HonorScoreTics[team_index] += points;
    if (m_HonorScoreTics[team_index] >= m_HonorTics)
    {
        RewardHonorToTeam(GetBonusHonorFromKill(1), team);
        m_HonorScoreTics[team_index] -= m_HonorTics;
    }
    UpdateTeamScore(team);
}
开发者ID:Jojo2323,项目名称:mangos3,代码行数:12,代码来源:BattleGroundBG.cpp

示例13: getGateIdFromDamagedOrDestroyEventId

void BattlegroundSA::DestroyGate(Player* player, GameObject* go)
{
    uint32 i = getGateIdFromDamagedOrDestroyEventId(go->GetGOInfo()->building.destroyedEvent);

    if (!GateStatus[i])
        return;

    if (GameObject* g = GetBGObject(i))
    {
        if (g->GetGOValue()->Building.Health == 0)
        {
            GateStatus[i] = BG_SA_GATE_DESTROYED;
            uint32 uws = getWorldStateFromGateId(i);

            if (uws)
                UpdateWorldState(uws, GateStatus[i]);

            bool rewardHonor = true;
            gateDestroyed = true;

            switch (i)
            {
                case BG_SA_GREEN_GATE:
                    if (GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED)
                        rewardHonor = false;
                    break;
                case BG_SA_BLUE_GATE:
                    if (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED)
                        rewardHonor = false;
                    break;
                case BG_SA_RED_GATE:
                    if (GateStatus[BG_SA_PURPLE_GATE] == BG_SA_GATE_DESTROYED)
                        rewardHonor = false;
                    break;
                case BG_SA_PURPLE_GATE:
                    if (GateStatus[BG_SA_RED_GATE] == BG_SA_GATE_DESTROYED)
                        rewardHonor = false;
                    break;
                default:
                    break;
            }

            if (i < 5)
                DelObject(i + 14);

            UpdatePlayerScore(player, SCORE_DESTROYED_WALL, 1);

            if (rewardHonor)
                UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(1));
        }
    }
}
开发者ID:Asandru,项目名称:Script-Land,代码行数:52,代码来源:BattlegroundSA.cpp

示例14: if

void BattleGroundSA::EndBattleGround(Team winner)
{
    if (RoundScores[0].time == RoundScores[1].time) // Noone got in time
        winner = TEAM_NONE;
    else if (RoundScores[0].time < RoundScores[1].time)
        winner = RoundScores[0].winner == ALLIANCE ? ALLIANCE : HORDE;
    else
        winner = RoundScores[1].winner == ALLIANCE ? ALLIANCE : HORDE;

    //win reward
    if(winner)
    {
        RewardXpToTeam(0, 0.8f, winner);
    }

    //complete map_end rewards (even if no team wins)
    RewardHonorToTeam(GetBonusHonorFromKill(2), ALLIANCE);
    RewardHonorToTeam(GetBonusHonorFromKill(2), HORDE);
    RewardXpToTeam(0, 0.8f, ALLIANCE);
    RewardXpToTeam(0, 0.8f, HORDE);

    BattleGround::EndBattleGround(winner);
}
开发者ID:Nedj,项目名称:mangos,代码行数:23,代码来源:BattleGroundSA.cpp

示例15: GetTeamIndexByTeamId

void BattleGroundEY::AddPoints(Team team, uint32 Points)
{
    BattleGroundTeamIndex team_index = GetTeamIndexByTeamId(team);
    m_TeamScores[team_index] += Points;
    m_HonorScoreTics[team_index] += Points;
    m_ExperienceTics[team_index] += Points;
    if (m_HonorScoreTics[team_index] >= m_HonorTics )
    {
        RewardHonorToTeam(GetBonusHonorFromKill(1), team);
        m_HonorScoreTics[team_index] -= m_HonorTics;
    }
    if (m_ExperienceTics[team_index] >= BG_EY_ExperienceTicks )
    {
        RewardXpToTeam(0, 0.8f, team);
        m_ExperienceTics[team_index] -= m_HonorTics;
    }
    UpdateTeamScore(team);
}
开发者ID:SeTM,项目名称:mangos-1,代码行数:18,代码来源:BattleGroundEY.cpp


注:本文中的GetBonusHonorFromKill函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。