From 27a2d88796706659d3f0902f8238049afa6b2d54 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sun, 8 Mar 2009 05:47:03 +0300 Subject: [PATCH] [7406] Remove string version of BattleGround::SendMessageToAll. Use only string_id versions always. --- src/game/BattleGround.cpp | 12 ++++-------- src/game/BattleGround.h | 1 - src/game/BattleGroundAB.cpp | 4 ++-- src/game/BattleGroundEY.cpp | 2 +- src/game/BattleGroundWS.cpp | 6 +++--- src/shared/revision_nr.h | 2 +- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 1231d26cb..6ec145b8c 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1474,13 +1474,6 @@ bool BattleGround::AddSpiritGuide(uint32 type, float x, float y, float z, float return true; } -void BattleGround::SendMessageToAll(char const* text, uint8 type) -{ - WorldPacket data; - ChatHandler::FillMessageData(&data, NULL, type, LANG_UNIVERSAL, NULL, 0, text, NULL); - SendPacketToAll(&data); -} - void BattleGround::SendMessageToAll(int32 entry, uint8 type) { char const* text = GetMangosString(entry); @@ -1498,7 +1491,10 @@ void BattleGround::PSendMessageToAll(int32 entry, uint8 type, ...) va_start(ap, type); vsnprintf(str,2048,format, ap ); va_end(ap); - SendMessageToAll(str, type); + + WorldPacket data; + ChatHandler::FillMessageData(&data, NULL, type, LANG_UNIVERSAL, NULL, 0, str, NULL); + SendPacketToAll(&data); } void BattleGround::EndNow() diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index a1667c3cc..88fb1ab26 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -412,7 +412,6 @@ class BattleGround void EndBattleGround(uint32 winner); void BlockMovement(Player *plr); - void SendMessageToAll(char const* text, uint8 type); void SendMessageToAll(int32 entry, uint8 type); void PSendMessageToAll(int32 entry, uint8 type, ... ); diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index fe9efde5c..97a50d55b 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -125,9 +125,9 @@ void BattleGroundAB::Update(uint32 diff) if( !m_IsInformedNearVictory && m_TeamScores[team] > 1800 ) { if( team == BG_TEAM_ALLIANCE ) - SendMessageToAll(GetMangosString(LANG_BG_AB_A_NEAR_VICTORY), CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendMessageToAll(LANG_BG_AB_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); else - SendMessageToAll(GetMangosString(LANG_BG_AB_H_NEAR_VICTORY), CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendMessageToAll(LANG_BG_AB_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(SOUND_NEAR_VICTORY); m_IsInformedNearVictory = true; } diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 6428dd428..6543962c7 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -519,7 +519,7 @@ void BattleGroundEY::RespawnFlag(bool send_message) if(send_message) { - SendMessageToAll(GetMangosString(LANG_BG_EY_RESETED_FLAG), CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendMessageToAll(LANG_BG_EY_RESETED_FLAG, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_EY_SOUND_FLAG_RESET); // flags respawned sound... } diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index 0e8f4057d..482727692 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -145,7 +145,7 @@ void BattleGroundWS::RespawnFlag(uint32 Team, bool captured) //when map_update will be allowed for battlegrounds this code will be useless SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY); SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(GetMangosString(LANG_BG_WS_F_PLACED), CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendMessageToAll(LANG_BG_WS_F_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); // flag respawned sound... } } @@ -159,12 +159,12 @@ void BattleGroundWS::RespawnFlagAfterDrop(uint32 team) if(team == ALLIANCE) { SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(GetMangosString(LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED), CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendMessageToAll(LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED, CHAT_MSG_BG_SYSTEM_NEUTRAL); } else { SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(GetMangosString(LANG_BG_WS_HORDE_FLAG_RESPAWNED), CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendMessageToAll(LANG_BG_WS_HORDE_FLAG_RESPAWNED, CHAT_MSG_BG_SYSTEM_NEUTRAL); } PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index cda1da10d..4081ac0e2 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7405" + #define REVISION_NR "7406" #endif // __REVISION_NR_H__