本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
}
}
示例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);
}
示例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);
}