mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[7406] Remove string version of BattleGround::SendMessageToAll. Use only string_id versions always.
This commit is contained in:
parent
e2e1a9f7d4
commit
27a2d88796
6 changed files with 11 additions and 16 deletions
|
|
@ -1474,13 +1474,6 @@ bool BattleGround::AddSpiritGuide(uint32 type, float x, float y, float z, float
|
||||||
return true;
|
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)
|
void BattleGround::SendMessageToAll(int32 entry, uint8 type)
|
||||||
{
|
{
|
||||||
char const* text = GetMangosString(entry);
|
char const* text = GetMangosString(entry);
|
||||||
|
|
@ -1498,7 +1491,10 @@ void BattleGround::PSendMessageToAll(int32 entry, uint8 type, ...)
|
||||||
va_start(ap, type);
|
va_start(ap, type);
|
||||||
vsnprintf(str,2048,format, ap );
|
vsnprintf(str,2048,format, ap );
|
||||||
va_end(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()
|
void BattleGround::EndNow()
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,6 @@ class BattleGround
|
||||||
void EndBattleGround(uint32 winner);
|
void EndBattleGround(uint32 winner);
|
||||||
void BlockMovement(Player *plr);
|
void BlockMovement(Player *plr);
|
||||||
|
|
||||||
void SendMessageToAll(char const* text, uint8 type);
|
|
||||||
void SendMessageToAll(int32 entry, uint8 type);
|
void SendMessageToAll(int32 entry, uint8 type);
|
||||||
void PSendMessageToAll(int32 entry, uint8 type, ... );
|
void PSendMessageToAll(int32 entry, uint8 type, ... );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,9 +125,9 @@ void BattleGroundAB::Update(uint32 diff)
|
||||||
if( !m_IsInformedNearVictory && m_TeamScores[team] > 1800 )
|
if( !m_IsInformedNearVictory && m_TeamScores[team] > 1800 )
|
||||||
{
|
{
|
||||||
if( team == BG_TEAM_ALLIANCE )
|
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
|
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);
|
PlaySoundToAll(SOUND_NEAR_VICTORY);
|
||||||
m_IsInformedNearVictory = true;
|
m_IsInformedNearVictory = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -519,7 +519,7 @@ void BattleGroundEY::RespawnFlag(bool send_message)
|
||||||
|
|
||||||
if(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...
|
PlaySoundToAll(BG_EY_SOUND_FLAG_RESET); // flags respawned sound...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ void BattleGroundWS::RespawnFlag(uint32 Team, bool captured)
|
||||||
//when map_update will be allowed for battlegrounds this code will be useless
|
//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_H_FLAG, RESPAWN_IMMEDIATELY);
|
||||||
SpawnBGObject(BG_WS_OBJECT_A_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...
|
PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); // flag respawned sound...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -159,12 +159,12 @@ void BattleGroundWS::RespawnFlagAfterDrop(uint32 team)
|
||||||
if(team == ALLIANCE)
|
if(team == ALLIANCE)
|
||||||
{
|
{
|
||||||
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY);
|
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
|
else
|
||||||
{
|
{
|
||||||
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY);
|
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);
|
PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7405"
|
#define REVISION_NR "7406"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue