Skip to content
Permalink
Browse files

Server/Misc: Fixed static analysis issues.

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information
AriDEV committed Feb 11, 2020
1 parent ae4b94f commit 540cad3243fc6bee8e1880c2f80f2f0c438700a3
Showing with 434 additions and 432 deletions.
  1. +7 −7 src/server/game/AI/SmartScripts/SmartScript.cpp
  2. +3 −3 src/server/game/Achievements/AchievementMgr.cpp
  3. +3 −3 src/server/game/Battlefield/Battlefield.cpp
  4. +11 −11 src/server/game/Battlegrounds/Battleground.cpp
  5. +1 −1 src/server/game/Battlegrounds/Battleground.h
  6. +14 −14 src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
  7. +10 −10 src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
  8. +14 −14 src/server/game/Battlegrounds/Zones/BattlegroundBFG.cpp
  9. +11 −11 src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
  10. +6 −6 src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
  11. +4 −4 src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
  12. +14 −14 src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp
  13. +14 −14 src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
  14. +3 −3 src/server/game/Chat/Channels/Channel.cpp
  15. +1 −1 src/server/game/Chat/Channels/Channel.h
  16. +31 −30 src/server/game/Chat/Chat.cpp
  17. +16 −16 src/server/game/Entities/Object/Object.cpp
  18. +4 −4 src/server/game/Entities/Object/Object.h
  19. +16 −16 src/server/game/Entities/Player/Player.cpp
  20. +3 −3 src/server/game/Entities/Player/Player.h
  21. +1 −1 src/server/game/Entities/Unit/Unit.cpp
  22. +27 −27 src/server/game/Globals/ObjectMgr.cpp
  23. +1 −1 src/server/game/Globals/ObjectMgr.h
  24. +1 −1 src/server/game/Grids/Notifiers/GridNotifiersImpl.h
  25. +3 −3 src/server/game/Guilds/Guild.cpp
  26. +1 −1 src/server/game/Guilds/Guild.h
  27. +103 −101 src/server/game/Handlers/ChatHandler.cpp
  28. +3 −4 src/server/game/Miscellaneous/SharedDefines.h
  29. +8 −8 src/server/game/Scripting/MapScripts.cpp
  30. +5 −5 src/server/game/Scripting/ScriptMgr.cpp
  31. +10 −10 src/server/game/Scripting/ScriptMgr.h
  32. +16 −16 src/server/game/Texts/CreatureTextMgr.cpp
  33. +6 −6 src/server/game/Texts/CreatureTextMgr.h
  34. +3 −3 src/server/game/World/World.cpp
  35. +1 −1 src/server/scripts/Commands/cs_debug.cpp
  36. +2 −2 src/server/scripts/Commands/cs_npc.cpp
  37. +2 −2 src/server/scripts/Commands/cs_wp.cpp
  38. +8 −8 src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
  39. +2 −2 src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
  40. +2 −2 src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
  41. +1 −1 src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
  42. +1 −1 src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
  43. +1 −1 src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
  44. +1 −1 src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
  45. +1 −1 src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
  46. +2 −2 src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
  47. +2 −2 src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
  48. +1 −1 src/server/scripts/Northrend/zone_sholazar_basin.cpp
  49. +3 −3 src/server/scripts/Northrend/zone_zuldrak.cpp
  50. +1 −1 src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
  51. +1 −1 src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
  52. +28 −28 src/server/scripts/World/chat_log.cpp
@@ -42,7 +42,7 @@
class SkyFireStringTextBuilder
{
public:
SkyFireStringTextBuilder(WorldObject* obj, ChatMsg msgtype, int32 id, uint32 language, uint64 targetGUID)
SkyFireStringTextBuilder(WorldObject* obj, ChatMsg msgtype, int32 id, Language language, uint64 targetGUID)
: _source(obj), _msgType(msgtype), _textId(id), _language(language), _targetGUID(targetGUID)
{
}
@@ -75,7 +75,7 @@ class SkyFireStringTextBuilder
WorldObject* _source;
ChatMsg _msgType;
int32 _textId;
uint32 _language;
Language _language;
uint64 _targetGUID;
};

@@ -214,7 +214,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
else if (IsPlayer(*itr) && me)
{
Unit* templastInvoker = GetLastInvoker();
sCreatureTextMgr->SendChat(me, uint8(e.action.talk.textGroupID), IsPlayer(templastInvoker) ? templastInvoker : 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, (*itr)->ToPlayer());
sCreatureTextMgr->SendChat(me, uint8(e.action.talk.textGroupID), IsPlayer(templastInvoker) ? templastInvoker : 0, ChatMsg::CHAT_MSG_ADDON, Language::LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, (*itr)->ToPlayer());
}
SF_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: %s (GuidLow: %u), textGroupId: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), uint8(e.action.talk.textGroupID));
@@ -751,8 +751,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
me->DoFleeToGetAssistance();
if (e.action.flee.withEmote)
{
SkyFireStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_FLEE, LANG_UNIVERSAL, 0);
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
SkyFireStringTextBuilder builder(me, ChatMsg::CHAT_MSG_MONSTER_EMOTE, LANG_FLEE, Language::LANG_UNIVERSAL, 0);
sCreatureTextMgr->SendChatPacket(me, builder, ChatMsg::CHAT_MSG_MONSTER_EMOTE);
}
SF_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance", me->GetGUIDLow());
break;
@@ -987,8 +987,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
me->CallForHelp((float)e.action.callHelp.range);
if (e.action.callHelp.withEmote)
{
SkyFireStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_CALL_FOR_HELP, LANG_UNIVERSAL, 0);
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
SkyFireStringTextBuilder builder(me, ChatMsg::CHAT_MSG_MONSTER_EMOTE, LANG_CALL_FOR_HELP, Language::LANG_UNIVERSAL, 0);
sCreatureTextMgr->SendChatPacket(me, builder, ChatMsg::CHAT_MSG_MONSTER_EMOTE);
}
SF_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u", me->GetGUIDLow());
}
@@ -56,7 +56,7 @@ namespace Skyfire
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
std::string text = sObjectMgr->GetSkyFireString(i_textId, loc_idx);
ChatHandler::BuildChatPacket(data, i_msgtype, LANG_UNIVERSAL, &i_player, &i_player, text, i_achievementId);
ChatHandler::BuildChatPacket(data, i_msgtype, Language::LANG_UNIVERSAL, &i_player, &i_player, text, i_achievementId);
}

private:
@@ -828,7 +828,7 @@ void AchievementMgr<T>::SendAchievementEarned(AchievementEntry const* achievemen

if (Guild* guild = sGuildMgr->GetGuildById(GetOwner()->GetGuildId()))
{
Skyfire::AchievementChatBuilder say_builder(*GetOwner(), CHAT_MSG_GUILD_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED, achievement->ID);
Skyfire::AchievementChatBuilder say_builder(*GetOwner(), ChatMsg::CHAT_MSG_GUILD_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED, achievement->ID);
Skyfire::LocalizedPacketDo<Skyfire::AchievementChatBuilder> say_do(say_builder);
guild->BroadcastWorker(say_do);
}
@@ -853,7 +853,7 @@ void AchievementMgr<T>::SendAchievementEarned(AchievementEntry const* achievemen
// if player is in world he can tell his friends about new achievement
else if (GetOwner()->IsInWorld())
{
Skyfire::AchievementChatBuilder say_builder(*GetOwner(), CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED, achievement->ID);
Skyfire::AchievementChatBuilder say_builder(*GetOwner(), ChatMsg::CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED, achievement->ID);

CellCoord p = Skyfire::ComputeCellCoord(GetOwner()->GetPositionX(), GetOwner()->GetPositionY());

@@ -533,7 +533,7 @@ WorldPacket Battlefield::BuildWarningAnnPacket(std::string const& msg)
data.WriteByteSeq(target[2]);
data.WriteByteSeq(target[3]);

data << uint8(CHAT_MSG_RAID_BOSS_EMOTE);
data << uint8(ChatMsg::CHAT_MSG_RAID_BOSS_EMOTE);

data.WriteByteSeq(unkGuid[1]);
data.WriteByteSeq(unkGuid[3]);
@@ -553,7 +553,7 @@ WorldPacket Battlefield::BuildWarningAnnPacket(std::string const& msg)
data.WriteByteSeq(source[1]);
data.WriteByteSeq(source[0]);

data << uint8(LANG_UNIVERSAL);
data << uint8(Language::LANG_UNIVERSAL);
data.WriteString(msg);
return data;
}
@@ -562,7 +562,7 @@ void Battlefield::SendWarningToAllInZone(uint32 entry)
{
if (Creature* stalker = GetCreature(StalkerGuid))
// FIXME: replaced CHAT_TYPE_END with CHAT_MSG_BG_SYSTEM_NEUTRAL to fix compile, it's a guessed change :/
sCreatureTextMgr->SendChat(stalker, (uint8) entry, 0, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_ADDON, TEXT_RANGE_ZONE);
sCreatureTextMgr->SendChat(stalker, (uint8) entry, 0, ChatMsg::CHAT_MSG_BG_SYSTEM_NEUTRAL, Language::LANG_ADDON, TEXT_RANGE_ZONE);
}

void Battlefield::SendWarningToPlayer(Player* player, uint32 entry)
@@ -70,7 +70,7 @@ namespace Skyfire
private:
void do_helper(WorldPacket& data, char const* text)
{
ChatHandler::BuildChatPacket(data, _msgtype, LANG_UNIVERSAL, _source, _target, text);
ChatHandler::BuildChatPacket(data, _msgtype, Language::LANG_UNIVERSAL, _source, _target, text);
}

ChatMsg _msgtype;
@@ -95,7 +95,7 @@ namespace Skyfire
char str[2048];
snprintf(str, sizeof(str), text, arg1str, arg2str);

ChatHandler::BuildChatPacket(data, _msgtype, LANG_UNIVERSAL, _source, _target, str);
ChatHandler::BuildChatPacket(data, _msgtype, Language::LANG_UNIVERSAL, _source, _target, str);
}

private:
@@ -441,13 +441,13 @@ inline void Battleground::_ProcessProgress(uint32 diff)
if (newtime > (MINUTE * IN_MILLISECONDS))
{
if (newtime / (MINUTE * IN_MILLISECONDS) != m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS))
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS)));
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, ChatMsg::CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS)));
}
else
{
//announce every 15 seconds
if (newtime / (15 * IN_MILLISECONDS) != m_PrematureCountDownTimer / (15 * IN_MILLISECONDS))
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / IN_MILLISECONDS));
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, ChatMsg::CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / IN_MILLISECONDS));
}
m_PrematureCountDownTimer = newtime;
}
@@ -509,19 +509,19 @@ inline void Battleground::_ProcessJoin(uint32 diff)
StartingEventCloseDoors();
SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FIRST]);
// First start warning - 2 or 1 minute
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_FIRST], ChatMsg::CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// After 1 minute or 30 seconds, warning is signaled
else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2))
{
m_Events |= BG_STARTING_EVENT_2;
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_SECOND], ChatMsg::CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// After 30 or 15 seconds, warning is signaled
else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_THIRD] && !(m_Events & BG_STARTING_EVENT_3))
{
m_Events |= BG_STARTING_EVENT_3;
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_THIRD], ChatMsg::CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// Delay expired (after 2 or 1 minute)
else if (GetStartDelayTime() <= 0 && !(m_Events & BG_STARTING_EVENT_4))
@@ -715,13 +715,13 @@ void Battleground::RemoveAuraOnTeam(uint32 SpellID, uint32 TeamID)
player->RemoveAura(SpellID);
}

void Battleground::YellToAll(Creature* creature, char const* text, uint32 language)
void Battleground::YellToAll(Creature* creature, char const* text, Language language)
{
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
if (Player* player = _GetPlayer(itr, "YellToAll"))
{
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_MONSTER_YELL, Language(language), creature, player, text);
ChatHandler::BuildChatPacket(data, ChatMsg::CHAT_MSG_MONSTER_YELL, language, creature, player, text);
player->SendDirectMessage(&data);
}
}
@@ -986,7 +986,7 @@ void Battleground::EndBattleground(uint32 winner)
}

if (winmsg_id)
SendMessageToAll(winmsg_id, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendMessageToAll(winmsg_id, ChatMsg::CHAT_MSG_BG_SYSTEM_NEUTRAL);
}

uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const
@@ -1792,7 +1792,7 @@ void Battleground::SendWarningToAll(int32 entry, ...)
vsnprintf(str, 1024, format, ap);
va_end(ap);

ChatHandler::BuildChatPacket(localizedPackets[player->GetSession()->GetSessionDbLocaleIndex()], CHAT_MSG_RAID_BOSS_EMOTE, LANG_UNIVERSAL, NULL, NULL, str);
ChatHandler::BuildChatPacket(localizedPackets[player->GetSession()->GetSessionDbLocaleIndex()], ChatMsg::CHAT_MSG_RAID_BOSS_EMOTE, Language::LANG_UNIVERSAL, NULL, NULL, str);
}

player->SendDirectMessage(&localizedPackets[player->GetSession()->GetSessionDbLocaleIndex()]);
@@ -426,7 +426,7 @@ class Battleground
virtual void FillInitialWorldStates(WorldStateBuilder& /*builder*/) { }
void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = NULL, bool self = true);
void SendPacketToAll(WorldPacket* packet);
void YellToAll(Creature* creature, const char* text, uint32 language);
void YellToAll(Creature* creature, const char* text, Language language);

template<class Do>
void BroadcastWorker(Do& _do);
@@ -87,13 +87,13 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
if (teamIndex == 0)
{
// FIXME: team and node names not localized
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, ChatMsg::CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node));
PlaySoundToAll(BG_AB_SOUND_NODE_CAPTURED_ALLIANCE);
}
else
{
// FIXME: team and node names not localized
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, ChatMsg::CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node));
PlaySoundToAll(BG_AB_SOUND_NODE_CAPTURED_HORDE);
}
}
@@ -135,9 +135,9 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
if (!m_IsInformedNearVictory && m_TeamScores[team] > BG_AB_WARNING_NEAR_VICTORY_SCORE)
{
if (team == TEAM_ALLIANCE)
SendMessageToAll(LANG_BG_AB_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendMessageToAll(LANG_BG_AB_A_NEAR_VICTORY, ChatMsg::CHAT_MSG_BG_SYSTEM_NEUTRAL);
else
SendMessageToAll(LANG_BG_AB_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendMessageToAll(LANG_BG_AB_H_NEAR_VICTORY, ChatMsg::CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_AB_SOUND_NEAR_VICTORY);
m_IsInformedNearVictory = true;
}
@@ -448,9 +448,9 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ

// FIXME: team and node names not localized
if (teamIndex == 0)
SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node), LANG_BG_AB_ALLY);
SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, ChatMsg::CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node), LANG_BG_AB_ALLY);
else
SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node), LANG_BG_AB_HORDE);
SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, ChatMsg::CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node), LANG_BG_AB_HORDE);

sound = BG_AB_SOUND_NODE_CLAIMED;
}
@@ -472,9 +472,9 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ

// FIXME: node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, ChatMsg::CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
else
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, ChatMsg::CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
}
// If contested, change back to occupied
else
@@ -492,9 +492,9 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ

// FIXME: node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, ChatMsg::CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
else
SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, ChatMsg::CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
}
sound = (teamIndex == TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE;
}
@@ -514,9 +514,9 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ

// FIXME: node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, ChatMsg::CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
else
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, ChatMsg::CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));

sound = (teamIndex == TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE;
}
@@ -526,9 +526,9 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
{
// FIXME: team and node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, ChatMsg::CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node));
else
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node));
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, ChatMsg::CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node));
}
PlaySoundToAll(sound);
}

0 comments on commit 540cad3

Please sign in to comment.
You can’t perform that action at this time.