diff options
author | megamage <none@none> | 2009-03-07 12:05:30 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-07 12:05:30 -0600 |
commit | 520ce96257a07c0ad07a652e01a3927af0f48f6f (patch) | |
tree | 3053b5b82332efbe2f6dbb79c9a3523859844ff2 /src | |
parent | f63c07e66975a9f55c0bf5f73a4f2a34bde3e848 (diff) |
[7399] Rewrited BattleGround starting code - moved it to battleground class. Author: Triply
Fixed message color for premature finish warnings.
Fixed .debug bg command won't allow 1v0 arenas now, only battlegrounds 1v0.
Added battleground announcer message removed in [7384].
[7401] Fixed bgqueue invitation to already started battlegrounds - not tested. Author: Triply
--HG--
branch : trunk
Diffstat (limited to 'src')
27 files changed, 479 insertions, 445 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 46c6bbf76aa..29843eb425e 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -92,6 +92,16 @@ BattleGround::BattleGround() m_PrematureCountDown = 0; m_HonorMode = BG_NORMAL; + + m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_2M; + m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_1M; + m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_30S; + m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; + //we must set to some default existing values + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN; } BattleGround::~BattleGround() @@ -173,6 +183,11 @@ void BattleGround::Update(uint32 diff) } } + //TODO: move this system to spell system and ressurect players correclt there! + /*********************************************************/ + /*** BATTLEGROUND RESSURECTION SYSTEM ***/ + /*********************************************************/ + //this should be handled by spell system: m_LastResurrectTime += diff; if (m_LastResurrectTime >= RESURRECTION_INTERVAL) @@ -223,6 +238,10 @@ void BattleGround::Update(uint32 diff) m_ResurrectQueue.clear(); } + /*********************************************************/ + /*** BATTLEGROUND BALLANCE SYSTEM ***/ + /*********************************************************/ + // if less then minimum players are in on one side, then start premature finish timer if(GetStatus() == STATUS_IN_PROGRESS && !isArena() && sBattleGroundMgr.GetPrematureFinishTime() && (GetPlayersCountByTeam(ALLIANCE) < GetMinPlayersPerTeam() || GetPlayersCountByTeam(HORDE) < GetMinPlayersPerTeam())) { @@ -244,13 +263,13 @@ void BattleGround::Update(uint32 diff) if( newtime > (MINUTE * IN_MILISECONDS) ) { if( newtime / (MINUTE * IN_MILISECONDS) != m_PrematureCountDownTimer / (MINUTE * IN_MILISECONDS) ) - PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILISECONDS))); + PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, CHAT_MSG_SYSTEM, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILISECONDS))); } else { //announce every 15 seconds if( newtime / (15 * IN_MILISECONDS) != m_PrematureCountDownTimer / (15 * IN_MILISECONDS) ) - PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, (uint32)(m_PrematureCountDownTimer / IN_MILISECONDS)); + PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, CHAT_MSG_SYSTEM, (uint32)(m_PrematureCountDownTimer / IN_MILISECONDS)); } m_PrematureCountDownTimer = newtime; } @@ -258,6 +277,88 @@ void BattleGround::Update(uint32 diff) else if (m_PrematureCountDown) m_PrematureCountDown = false; + /*********************************************************/ + /*** BATTLEGROUND STARTING SYSTEM ***/ + /*********************************************************/ + + if (GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize()) + { + ModifyStartDelayTime(diff); + + if (!(m_Events & BG_STARTING_EVENT_1)) + { + m_Events |= BG_STARTING_EVENT_1; + + // setup here, only when at least one player has ported to the map + if(!SetupBattleGround()) + { + EndNow(); + return; + } + + StartingEventCloseDoors(); + SetStartDelayTime(m_StartDelayTimes[BG_STARTING_EVENT_FIRST]); + //first start warning - 2 or 1 minute + SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL); + } + // After 1 minute or 30 seconds, warning is signalled + else if (GetStartDelayTime() <= m_StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2)) + { + m_Events |= BG_STARTING_EVENT_2; + SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL); + } + // After 30 or 15 seconds, warning is signalled + else if (GetStartDelayTime() <= m_StartDelayTimes[BG_STARTING_EVENT_THIRD] && !(m_Events & BG_STARTING_EVENT_3)) + { + m_Events |= BG_STARTING_EVENT_3; + SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL); + } + // delay expired (atfer 2 or 1 minute) + else if (GetStartDelayTime() <= 0 && !(m_Events & BG_STARTING_EVENT_4)) + { + m_Events |= BG_STARTING_EVENT_4; + + StartingEventOpenDoors(); + + SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_FOURTH], CHAT_MSG_BG_SYSTEM_NEUTRAL); + SetStatus(STATUS_IN_PROGRESS); + SetStartDelayTime(m_StartDelayTimes[BG_STARTING_EVENT_FOURTH]); + + //remove preparation + if( isArena() ) + { + //TODO : add arena sound (PlaySoundToAll(SOUND_ARENA_START); + + for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) + if(Player *plr = objmgr.GetPlayer(itr->first)) + plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION); + + if(!GetPlayersCountByTeam(ALLIANCE) && GetPlayersCountByTeam(HORDE)) + EndBattleGround(HORDE); + else if(GetPlayersCountByTeam(ALLIANCE) && !GetPlayersCountByTeam(HORDE)) + EndBattleGround(ALLIANCE); + } + else + { + + PlaySoundToAll(SOUND_BG_START); + + for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) + if(Player* plr = objmgr.GetPlayer(itr->first)) + plr->RemoveAurasDueToSpell(SPELL_PREPARATION); + //Announce BG starting: + if( sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) ) + { + sWorld.SendWorldText(LANG_BG_STARTED_ANNOUNCE_WORLD, GetName(), GetMinLevel(), GetMaxLevel()); + } + } + } + } + + /*********************************************************/ + /*** BATTLEGROUND ENDING SYSTEM ***/ + /*********************************************************/ + if(GetStatus() == STATUS_WAIT_LEAVE) { // remove all players from battleground after 2 minutes @@ -271,6 +372,7 @@ void BattleGround::Update(uint32 diff) // do not change any battleground's private variables } } + } void BattleGround::SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O) @@ -1407,31 +1509,31 @@ bool BattleGround::AddSpiritGuide(uint32 type, float x, float y, float z, float return true; } -void BattleGround::SendMessageToAll(char const* text) +void BattleGround::SendMessageToAll(char const* text, uint8 type) { WorldPacket data; - ChatHandler::FillMessageData(&data, NULL, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_UNIVERSAL, NULL, 0, text, NULL); + ChatHandler::FillMessageData(&data, NULL, type, LANG_UNIVERSAL, NULL, 0, text, NULL); SendPacketToAll(&data); } -void BattleGround::SendMessageToAll(int32 entry) +void BattleGround::SendMessageToAll(int32 entry, uint8 type) { char const* text = GetTrinityString(entry); WorldPacket data; - ChatHandler::FillMessageData(&data, NULL, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_UNIVERSAL, NULL, 0, text, NULL); + ChatHandler::FillMessageData(&data, NULL, type, LANG_UNIVERSAL, NULL, 0, text, NULL); SendPacketToAll(&data); } //copied from void ChatHandler::PSendSysMessage(int32 entry, ...) -void BattleGround::PSendMessageToAll(int32 entry, ...) +void BattleGround::PSendMessageToAll(int32 entry, uint8 type, ...) { const char *format = GetMangosString(entry); va_list ap; char str [2048]; - va_start(ap, entry); + va_start(ap, type); vsnprintf(str,2048,format, ap ); va_end(ap); - SendMessageToAll(str); + SendMessageToAll(str, type); } void BattleGround::EndNow() diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 8f8aec564c6..d05969ec50a 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -93,16 +93,21 @@ enum BattleGroundTimeIntervals INVITE_ACCEPT_WAIT_TIME = 80000, // ms TIME_TO_AUTOREMOVE = 120000, // ms MAX_OFFLINE_TIME = 300000, // ms - START_DELAY0 = 120000, // ms - START_DELAY1 = 60000, // ms - START_DELAY2 = 30000, // ms - START_DELAY3 = 15000, // ms used only in arena RESPAWN_ONE_DAY = 86400, // secs RESPAWN_IMMEDIATELY = 0, // secs BUFF_RESPAWN_TIME = 180, // secs BG_HONOR_SCORE_TICKS = 330 // points }; +enum BattleGroundStartTimeIntervals +{ + BG_START_DELAY_2M = 120000, // ms (2 minutes) + BG_START_DELAY_1M = 60000, // ms (1 minute) + BG_START_DELAY_30S = 30000, // ms (30 seconds) + BG_START_DELAY_15S = 15000, // ms (15 seconds) Used only in arena + BG_START_DELAY_NONE = 0, // ms +}; + enum BattleGroundBuffObjects { BG_OBJECTID_SPEEDBUFF_ENTRY = 179871, @@ -217,6 +222,24 @@ enum BattleGroundTeamId }; #define BG_TEAMS_COUNT 2 +enum BattleGroundStartingEvents +{ + BG_STARTING_EVENT_NONE = 0x00, + BG_STARTING_EVENT_1 = 0x01, + BG_STARTING_EVENT_2 = 0x02, + BG_STARTING_EVENT_3 = 0x04, + BG_STARTING_EVENT_4 = 0x08 +}; + +enum BattleGroundStartingEventsIds +{ + BG_STARTING_EVENT_FIRST = 0, + BG_STARTING_EVENT_SECOND = 1, + BG_STARTING_EVENT_THIRD = 2, + BG_STARTING_EVENT_FOURTH = 3 +}; +#define BG_STARTING_EVENT_COUNT 4 + enum BattleGroundJoinError { BG_JOIN_ERR_OK = 0, @@ -276,6 +299,8 @@ class BattleGround return true; } virtual void Reset(); // resets all common properties for battlegrounds, must be implemented and called in BG subclass + virtual void StartingEventCloseDoors() {} + virtual void StartingEventOpenDoors() {} /* Battleground */ // Get methods: @@ -400,9 +425,9 @@ class BattleGround void EndBattleGround(uint32 winner); void BlockMovement(Player *plr); - void SendMessageToAll(char const* text); - void SendMessageToAll(int32 entry); - void PSendMessageToAll(int32 entry, ... ); + void SendMessageToAll(char const* text, uint8 type); + void SendMessageToAll(int32 entry, uint8 type); + void PSendMessageToAll(int32 entry, uint8 type, ... ); /* Raid Group */ Group *GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE]; } @@ -435,7 +460,6 @@ class BattleGround virtual void HandleKillUnit(Creature* /*unit*/, Player* /*killer*/); /* Battleground events */ - /* these functions will return true event is possible, but false if player is bugger */ virtual void EventPlayerDroppedFlag(Player* /*player*/) {} virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) {} virtual void EventPlayerCapturedFlag(Player* /*player*/) {} @@ -496,9 +520,12 @@ class BattleGround std::map<uint64, std::vector<uint64> > m_ReviveQueue; /* - this is important variable used for invitation messages + these are important variables used for starting messages */ uint8 m_Events; + BattleGroundStartTimeIntervals m_StartDelayTimes[BG_STARTING_EVENT_COUNT]; + //this must be filled in constructors! + uint32 m_StartMessageIds[BG_STARTING_EVENT_COUNT]; bool m_BuffChange; diff --git a/src/game/BattleGroundAA.cpp b/src/game/BattleGroundAA.cpp index ca52e4ddaf2..2aac2dde3eb 100644 --- a/src/game/BattleGroundAA.cpp +++ b/src/game/BattleGroundAA.cpp @@ -21,10 +21,20 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundAA.h" +#include "Language.h" BattleGroundAA::BattleGroundAA() { + m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; + m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; + m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; + m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; + //we must set messageIds + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN; } BattleGroundAA::~BattleGroundAA() @@ -37,6 +47,14 @@ void BattleGroundAA::Update(uint32 diff) BattleGround::Update(diff); } +void BattleGroundAA::StartingEventCloseDoors() +{ +} + +void BattleGroundAA::StartingEventOpenDoors() +{ +} + void BattleGroundAA::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundAA.h b/src/game/BattleGroundAA.h index 4f073b21da4..06793ea38e0 100644 --- a/src/game/BattleGroundAA.h +++ b/src/game/BattleGroundAA.h @@ -41,6 +41,9 @@ class BattleGroundAA : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); + void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); bool SetupBattleGround(); diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index 21a6583537d..fdf2de96c15 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -47,6 +47,11 @@ BattleGroundAB::BattleGroundAB() m_BuffChange = true; m_BgObjects.resize(BG_AB_OBJECT_MAX); m_BgCreatures.resize(BG_AB_ALL_NODES_COUNT); + + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AB_START_TWO_MINUTES; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AB_START_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AB_START_HALF_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AB_HAS_BEGUN; } BattleGroundAB::~BattleGroundAB() @@ -57,83 +62,7 @@ void BattleGroundAB::Update(uint32 diff) { BattleGround::Update(diff); - if( GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize() ) - { - ModifyStartDelayTime(diff); - - if( !(m_Events & 0x01) ) - { - m_Events |= 0x01; - - // setup here, only when at least one player has ported to the map - if(!SetupBattleGround()) - { - EndNow(); - return; - } - - sLog.outDebug("Arathi Basin: entering state STATUS_WAIT_JOIN ..."); - - // despawn banners, auras and buffs - for (int obj = BG_AB_OBJECT_BANNER_NEUTRAL; obj < BG_AB_DYNAMIC_NODES_COUNT * 8; ++obj) - SpawnBGObject(obj, RESPAWN_ONE_DAY); - for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT * 3; ++i) - SpawnBGObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + i, RESPAWN_ONE_DAY); - - // Starting doors - SpawnBGObject(BG_AB_OBJECT_GATE_A, RESPAWN_IMMEDIATELY); - SpawnBGObject(BG_AB_OBJECT_GATE_H, RESPAWN_IMMEDIATELY); - DoorClose(BG_AB_OBJECT_GATE_A); - DoorClose(BG_AB_OBJECT_GATE_H); - - // Starting base spirit guides - _NodeOccupied(BG_AB_SPIRIT_ALIANCE,ALLIANCE); - _NodeOccupied(BG_AB_SPIRIT_HORDE,HORDE); - - SetStartDelayTime(START_DELAY0); - } - // After 1 minute, warning is signalled - else if( GetStartDelayTime() <= START_DELAY1 && !(m_Events & 0x04) ) - { - m_Events |= 0x04; - SendMessageToAll(GetTrinityString(LANG_BG_AB_ONEMINTOSTART)); - } - // After 1,5 minute, warning is signalled - else if( GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x08) ) - { - m_Events |= 0x08; - SendMessageToAll(GetTrinityString(LANG_BG_AB_HALFMINTOSTART)); - } - // After 2 minutes, gates OPEN ! x) - else if( GetStartDelayTime() < 0 && !(m_Events & 0x10) ) - { - m_Events |= 0x10; - SendMessageToAll(GetTrinityString(LANG_BG_AB_STARTED)); - - // spawn neutral banners - for (int banner = BG_AB_OBJECT_BANNER_NEUTRAL, i = 0; i < 5; banner += 8, ++i) - SpawnBGObject(banner, RESPAWN_IMMEDIATELY); - for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i) - { - //randomly select buff to spawn - uint8 buff = urand(0, 2); - SpawnBGObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + buff + i * 3, RESPAWN_IMMEDIATELY); - } - DoorOpen(BG_AB_OBJECT_GATE_A); - DoorOpen(BG_AB_OBJECT_GATE_H); - - PlaySoundToAll(SOUND_BG_START); - if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) - PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC - SetStatus(STATUS_IN_PROGRESS); - - for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if(Player* plr = objmgr.GetPlayer(itr->first)) - plr->RemoveAurasDueToSpell(SPELL_PREPARATION); - } - - } - else if( GetStatus() == STATUS_IN_PROGRESS ) + if( GetStatus() == STATUS_IN_PROGRESS ) { int team_points[2] = { 0, 0 }; @@ -211,9 +140,9 @@ void BattleGroundAB::Update(uint32 diff) if( !m_IsInformedNearVictory && m_TeamScores[team] > 1800 ) { if( team == BG_TEAM_ALLIANCE ) - SendMessageToAll(GetTrinityString(LANG_BG_AB_A_NEAR_VICTORY)); + SendMessageToAll(GetMangosString(LANG_BG_AB_A_NEAR_VICTORY), CHAT_MSG_BG_SYSTEM_NEUTRAL); else - SendMessageToAll(GetTrinityString(LANG_BG_AB_H_NEAR_VICTORY)); + SendMessageToAll(GetMangosString(LANG_BG_AB_H_NEAR_VICTORY), CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(SOUND_NEAR_VICTORY); m_IsInformedNearVictory = true; } @@ -235,6 +164,40 @@ void BattleGroundAB::Update(uint32 diff) } } +void BattleGroundAB::StartingEventCloseDoors() +{ + // despawn banners, auras and buffs + for (int obj = BG_AB_OBJECT_BANNER_NEUTRAL; obj < BG_AB_DYNAMIC_NODES_COUNT * 8; ++obj) + SpawnBGObject(obj, RESPAWN_ONE_DAY); + for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT * 3; ++i) + SpawnBGObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + i, RESPAWN_ONE_DAY); + + // Starting doors + DoorClose(BG_AB_OBJECT_GATE_A); + DoorClose(BG_AB_OBJECT_GATE_H); + SpawnBGObject(BG_AB_OBJECT_GATE_A, RESPAWN_IMMEDIATELY); + SpawnBGObject(BG_AB_OBJECT_GATE_H, RESPAWN_IMMEDIATELY); + + // Starting base spirit guides + _NodeOccupied(BG_AB_SPIRIT_ALIANCE,ALLIANCE); + _NodeOccupied(BG_AB_SPIRIT_HORDE,HORDE); +} + +void BattleGroundAB::StartingEventOpenDoors() +{ + // spawn neutral banners + for (int banner = BG_AB_OBJECT_BANNER_NEUTRAL, i = 0; i < 5; banner += 8, ++i) + SpawnBGObject(banner, RESPAWN_IMMEDIATELY); + for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i) + { + //randomly select buff to spawn + uint8 buff = urand(0, 2); + SpawnBGObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + buff + i * 3, RESPAWN_IMMEDIATELY); + } + DoorOpen(BG_AB_OBJECT_GATE_A); + DoorOpen(BG_AB_OBJECT_GATE_H); +} + void BattleGroundAB::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundAB.h b/src/game/BattleGroundAB.h index 3c080621033..65ee073c9ae 100644 --- a/src/game/BattleGroundAB.h +++ b/src/game/BattleGroundAB.h @@ -240,6 +240,8 @@ class BattleGroundAB : public BattleGround void Update(uint32 diff); void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); void RemovePlayer(Player *plr,uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); virtual bool SetupBattleGround(); diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp index 972c24a8f4d..50f549ab4ca 100644 --- a/src/game/BattleGroundAV.cpp +++ b/src/game/BattleGroundAV.cpp @@ -34,9 +34,14 @@ BattleGroundAV::BattleGroundAV() { - m_BgObjects.resize(BG_AV_OBJECT_MAX); m_BgCreatures.resize(AV_CPLACE_MAX+AV_STATICCPLACE_MAX); + + //TODO FIX ME! + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_EY_START_TWO_MINUTES; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_EY_START_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_EY_START_HALF_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN; } BattleGroundAV::~BattleGroundAV() @@ -240,7 +245,7 @@ void BattleGroundAV::UpdateScore(uint16 team, int16 points ) } else if(!m_IsInformedNearVictory[teamindex] && m_Team_Scores[teamindex] < SEND_MSG_NEAR_LOSE) { - SendMessageToAll(GetTrinityString((teamindex==BG_TEAM_HORDE)?LANG_BG_AV_H_NEAR_LOSE:LANG_BG_AV_A_NEAR_LOSE)); + SendMessageToAll(GetTrinityString((teamindex==BG_TEAM_HORDE)?LANG_BG_AV_H_NEAR_LOSE:LANG_BG_AV_A_NEAR_LOSE), teamindex==BG_TEAM_HORDE ? CHAT_MSG_BG_SYSTEM_HORDE : CHAT_MSG_BG_SYSTEM_ALLIANCE); PlaySoundToAll(AV_SOUND_NEAR_VICTORY); m_IsInformedNearVictory[teamindex] = true; } @@ -367,19 +372,19 @@ void BattleGroundAV::Update(uint32 diff) DoorClose(BG_AV_OBJECT_DOOR_A); DoorClose(BG_AV_OBJECT_DOOR_H); - SetStartDelayTime(START_DELAY0); + SetStartDelayTime(BG_START_DELAY_2M); } // After 1 minute, warning is signalled - else if (GetStartDelayTime() <= START_DELAY1 && !(m_Events & 0x04)) + else if (GetStartDelayTime() <= BG_START_DELAY_1M && !(m_Events & 0x04)) { m_Events |= 0x04; - SendMessageToAll(GetTrinityString(LANG_BG_AV_ONEMINTOSTART)); + SendMessageToAll(GetTrinityString(LANG_BG_AV_ONEMINTOSTART), CHAT_MSG_BG_SYSTEM_NEUTRAL); } // After 1,5 minute, warning is signalled - else if (GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x08)) + else if (GetStartDelayTime() <= BG_START_DELAY_1M + BG_START_DELAY_30S && !(m_Events & 0x08)) { m_Events |= 0x08; - SendMessageToAll(GetTrinityString(LANG_BG_AV_HALFMINTOSTART)); + SendMessageToAll(GetTrinityString(LANG_BG_AV_HALFMINTOSTART), CHAT_MSG_BG_SYSTEM_NEUTRAL); } // After 2 minutes, gates OPEN ! x) else if (GetStartDelayTime() <= 0 && !(m_Events & 0x10)) @@ -388,7 +393,7 @@ void BattleGroundAV::Update(uint32 diff) UpdateWorldState(AV_SHOW_A_SCORE, 1); m_Events |= 0x10; - SendMessageToAll(GetTrinityString(LANG_BG_AV_STARTED)); + SendMessageToAll(GetTrinityString(LANG_BG_AV_STARTED), CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(SOUND_BG_START); SetStatus(STATUS_IN_PROGRESS); @@ -466,6 +471,14 @@ void BattleGroundAV::Update(uint32 diff) } } +void BattleGroundAV::StartingEventCloseDoors() +{ +} + +void BattleGroundAV::StartingEventOpenDoors() +{ +} + void BattleGroundAV::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundAV.h b/src/game/BattleGroundAV.h index ef6731b5e73..f9f4f46b0ae 100644 --- a/src/game/BattleGroundAV.h +++ b/src/game/BattleGroundAV.h @@ -1504,6 +1504,8 @@ class BattleGroundAV : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); void RemovePlayer(Player *plr,uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); diff --git a/src/game/BattleGroundBE.cpp b/src/game/BattleGroundBE.cpp index c23fae887a1..a96859a3041 100644 --- a/src/game/BattleGroundBE.cpp +++ b/src/game/BattleGroundBE.cpp @@ -31,6 +31,16 @@ BattleGroundBE::BattleGroundBE() { m_BgObjects.resize(BG_BE_OBJECT_MAX); + + m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; + m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; + m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; + m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; + //we must set messageIds + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN; } BattleGroundBE::~BattleGroundBE() @@ -42,73 +52,30 @@ void BattleGroundBE::Update(uint32 diff) { BattleGround::Update(diff); - // after bg start we get there - if (GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize()) - { - ModifyStartDelayTime(diff); - - if (!(m_Events & 0x01)) - { - m_Events |= 0x01; - // setup here, only when at least one player has ported to the map - if(!SetupBattleGround()) - { - EndNow(); - return; - } - for(uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_4; i++) - SpawnBGObject(i, RESPAWN_IMMEDIATELY); - - for(uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; i++) - SpawnBGObject(i, RESPAWN_ONE_DAY); - - SetStartDelayTime(START_DELAY1); - SendMessageToAll(LANG_ARENA_ONE_MINUTE); - } - // After 30 seconds, warning is signalled - else if (GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x04)) - { - m_Events |= 0x04; - SendMessageToAll(LANG_ARENA_THIRTY_SECONDS); - } - // After 15 seconds, warning is signalled - else if (GetStartDelayTime() <= START_DELAY3 && !(m_Events & 0x08)) - { - m_Events |= 0x08; - SendMessageToAll(LANG_ARENA_FIFTEEN_SECONDS); - } - // delay expired (1 minute) - else if (GetStartDelayTime() <= 0 && !(m_Events & 0x10)) - { - m_Events |= 0x10; - - for(uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_2; i++) - DoorOpen(i); - - for(uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; i++) - SpawnBGObject(i, 60); - - SendMessageToAll(LANG_ARENA_BEGUN); - SetStatus(STATUS_IN_PROGRESS); - SetStartDelayTime(0); - - for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if(Player *plr = objmgr.GetPlayer(itr->first)) - plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION); - - if(!GetPlayersCountByTeam(ALLIANCE) && GetPlayersCountByTeam(HORDE)) - EndBattleGround(HORDE); - else if(GetPlayersCountByTeam(ALLIANCE) && !GetPlayersCountByTeam(HORDE)) - EndBattleGround(ALLIANCE); - } - } - /*if(GetStatus() == STATUS_IN_PROGRESS) { // update something }*/ } +void BattleGroundBE::StartingEventCloseDoors() +{ + for(uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_4; i++) + SpawnBGObject(i, RESPAWN_IMMEDIATELY); + + for(uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; i++) + SpawnBGObject(i, RESPAWN_ONE_DAY); +} + +void BattleGroundBE::StartingEventOpenDoors() +{ + for(uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_2; i++) + DoorOpen(i); + + for(uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; i++) + SpawnBGObject(i, 60); +} + void BattleGroundBE::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundBE.h b/src/game/BattleGroundBE.h index b8922e8f983..e75e332f44f 100644 --- a/src/game/BattleGroundBE.h +++ b/src/game/BattleGroundBE.h @@ -61,6 +61,8 @@ class BattleGroundBE : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); diff --git a/src/game/BattleGroundDS.cpp b/src/game/BattleGroundDS.cpp index 825a52967b6..78360b9b194 100644 --- a/src/game/BattleGroundDS.cpp +++ b/src/game/BattleGroundDS.cpp @@ -19,10 +19,20 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundDS.h" +#include "Language.h" BattleGroundDS::BattleGroundDS() { + m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; + m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; + m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; + m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; + //we must set messageIds + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN; } BattleGroundDS::~BattleGroundDS() @@ -35,6 +45,14 @@ void BattleGroundDS::Update(uint32 diff) BattleGround::Update(diff); } +void BattleGroundDS::StartingEventCloseDoors() +{ +} + +void BattleGroundDS::StartingEventOpenDoors() +{ +} + void BattleGroundDS::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundDS.h b/src/game/BattleGroundDS.h index 7f9de8ca7de..44a6cfbd33a 100644 --- a/src/game/BattleGroundDS.h +++ b/src/game/BattleGroundDS.h @@ -39,6 +39,9 @@ class BattleGroundDS : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); + void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); bool SetupBattleGround(); diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 78027b532bc..6d2ed689da2 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -46,6 +46,11 @@ BattleGroundEY::BattleGroundEY() m_Points_Trigger[BLOOD_ELF] = TR_BLOOD_ELF_BUFF; m_Points_Trigger[DRAENEI_RUINS] = TR_DRAENEI_RUINS_BUFF; m_Points_Trigger[MAGE_TOWER] = TR_MAGE_TOWER_BUFF; + + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_EY_START_TWO_MINUTES; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_EY_START_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_EY_START_HALF_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN; } BattleGroundEY::~BattleGroundEY() @@ -55,73 +60,8 @@ BattleGroundEY::~BattleGroundEY() void BattleGroundEY::Update(uint32 diff) { BattleGround::Update(diff); - // after bg start we get there (once) - if (GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize()) - { - ModifyStartDelayTime(diff); - - if(!(m_Events & 0x01)) - { - m_Events |= 0x01; - - // setup here, only when at least one player has ported to the map - if(!SetupBattleGround()) - { - EndNow(); - return; - } - - SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_IMMEDIATELY); - SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_IMMEDIATELY); - -// SpawnBGCreature(EY_SPIRIT_MAIN_ALLIANCE, RESPAWN_IMMEDIATELY); -// SpawnBGCreature(EY_SPIRIT_MAIN_HORDE, RESPAWN_IMMEDIATELY); - for(uint32 i = BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER; i < BG_EY_OBJECT_MAX; ++i) - SpawnBGObject(i, RESPAWN_ONE_DAY); - SetStartDelayTime(START_DELAY0); - } - // After 1 minute, warning is signalled - else if(GetStartDelayTime() <= START_DELAY1 && !(m_Events & 0x04)) - { - m_Events |= 0x04; - SendMessageToAll(GetTrinityString(LANG_BG_EY_ONE_MINUTE)); - } - // After 1,5 minute, warning is signalled - else if(GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x08)) - { - m_Events |= 0x08; - SendMessageToAll(GetTrinityString(LANG_BG_EY_HALF_MINUTE)); - } - // After 2 minutes, gates OPEN ! x) - else if(GetStartDelayTime() < 0 && !(m_Events & 0x10)) - { - m_Events |= 0x10; - SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_ONE_DAY); - SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_ONE_DAY); - - for(uint32 i = BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER; i <= BG_EY_OBJECT_FLAG_NETHERSTORM; ++i) - SpawnBGObject(i, RESPAWN_IMMEDIATELY); - for(uint32 i = 0; i < EY_POINTS_MAX; ++i) - { - //randomly spawn buff - uint8 buff = urand(0, 2); - SpawnBGObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REALVER + buff + i * 3, RESPAWN_IMMEDIATELY); - } - - SendMessageToAll(GetTrinityString(LANG_BG_EY_BEGIN)); - - PlaySoundToAll(SOUND_BG_START); - if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) - PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC - SetStatus(STATUS_IN_PROGRESS); - - for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if(Player *plr = objmgr.GetPlayer(itr->first)) - plr->RemoveAurasDueToSpell(SPELL_PREPARATION); - } - } - else if(GetStatus() == STATUS_IN_PROGRESS) + if( GetStatus() == STATUS_IN_PROGRESS ) { m_PointAddingTimer -= diff; if(m_PointAddingTimer <= 0) @@ -163,6 +103,30 @@ void BattleGroundEY::Update(uint32 diff) } } +void BattleGroundEY::StartingEventCloseDoors() +{ + SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_IMMEDIATELY); + SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_IMMEDIATELY); + + for(uint32 i = BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER; i < BG_EY_OBJECT_MAX; ++i) + SpawnBGObject(i, RESPAWN_ONE_DAY); +} + +void BattleGroundEY::StartingEventOpenDoors() +{ + SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_ONE_DAY); + SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_ONE_DAY); + + for(uint32 i = BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER; i <= BG_EY_OBJECT_FLAG_NETHERSTORM; ++i) + SpawnBGObject(i, RESPAWN_IMMEDIATELY); + for(uint32 i = 0; i < EY_POINTS_MAX; ++i) + { + //randomly spawn buff + uint8 buff = urand(0, 2); + SpawnBGObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REALVER + buff + i * 3, RESPAWN_IMMEDIATELY); + } +} + void BattleGroundEY::AddPoints(uint32 Team, uint32 Points) { uint8 team_index = GetTeamIndexByTeamId(Team); @@ -565,7 +529,7 @@ void BattleGroundEY::RespawnFlag(bool send_message) if(send_message) { - SendMessageToAll(GetTrinityString(LANG_BG_EY_RESETED_FLAG)); + SendMessageToAll(GetMangosString(LANG_BG_EY_RESETED_FLAG), CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_EY_SOUND_FLAG_RESET); // flags respawned sound... } diff --git a/src/game/BattleGroundEY.h b/src/game/BattleGroundEY.h index fd5cf7ce763..1eb79d7b9fd 100644 --- a/src/game/BattleGroundEY.h +++ b/src/game/BattleGroundEY.h @@ -304,6 +304,8 @@ class BattleGroundEY : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); /* BG Flags */ uint64 GetFlagPickerGUID() const { return m_FlagKeeper; } diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 06bdbf54c3f..9ee9c841de3 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -83,7 +83,7 @@ void BattleGroundQueue::SelectionPool::Init() // remove group info from selection pool // returns true when we need to try to add new group to selection pool -// or false when pool is ok +// returns false when selection pool is ok or when we kicked smaller group than we need to kick // sometimes it can be called on empty selection pool bool BattleGroundQueue::SelectionPool::KickGroup(uint32 size) { @@ -107,7 +107,8 @@ bool BattleGroundQueue::SelectionPool::KickGroup(uint32 size) GroupQueueInfo* ginfo = (*groupToKick); SelectedGroups.erase(groupToKick); PlayerCount -= ginfo->Players.size(); - if (abs((int32)(ginfo->Players.size() - size)) <= 1) + //return false if we kicked smaller group or there are enough players in selection pool + if (ginfo->Players.size() <= size + 1) return false; } return true; @@ -115,8 +116,8 @@ bool BattleGroundQueue::SelectionPool::KickGroup(uint32 size) // add group to selection pool // used when building selection pools -// returns true if we can invite more players -// returns false when selection pool is set +// returns true if we can invite more players, or when we added group to selection pool +// returns false when selection pool is full bool BattleGroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 desiredCount) { //if group is larger than desired count - don't allow to add it to pool @@ -125,6 +126,7 @@ bool BattleGroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 de SelectedGroups.push_back(ginfo); // increase selected players count PlayerCount += ginfo->Players.size(); + return true; } if( PlayerCount < desiredCount ) return true; @@ -501,7 +503,7 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BGQueueIdBasedOnLevel //if ali selection is already empty, then kick horde group, but if there are less horde than ali in bg - break; if( !m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() ) { - if( aliFree <= diffHorde - 1 ) + if( aliFree <= diffHorde + 1 ) break; m_SelectionPools[BG_TEAM_HORDE].KickGroup(diffHorde - diffAli); } @@ -516,7 +518,7 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BGQueueIdBasedOnLevel } if( !m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() ) { - if( hordeFree <= diffAli - 1 ) + if( hordeFree <= diffAli + 1 ) break; m_SelectionPools[BG_TEAM_ALLIANCE].KickGroup(diffAli - diffHorde); } @@ -624,7 +626,7 @@ bool BattleGroundQueue::CheckNormalMatch(BattleGround* bg_template, BGQueueIdBas return false; } //allow 1v0 if debug bg - if( sBattleGroundMgr.isTesting() && (m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() || m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount()) ) + if( sBattleGroundMgr.isTesting() && bg_template->isBattleGround() && (m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() || m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount()) ) return true; //return true if there are enough players in selection pools - enable to work .debug bg command correctly return m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() >= minPlayers && m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() >= minPlayers; diff --git a/src/game/BattleGroundNA.cpp b/src/game/BattleGroundNA.cpp index 007ff659020..702c2cd8a02 100644 --- a/src/game/BattleGroundNA.cpp +++ b/src/game/BattleGroundNA.cpp @@ -31,6 +31,16 @@ BattleGroundNA::BattleGroundNA() { m_BgObjects.resize(BG_NA_OBJECT_MAX); + + m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; + m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; + m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; + m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; + //we must set messageIds + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN; } BattleGroundNA::~BattleGroundNA() @@ -42,70 +52,27 @@ void BattleGroundNA::Update(uint32 diff) { BattleGround::Update(diff); - // after bg start we get there - if (GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize()) - { - ModifyStartDelayTime(diff); - - if (!(m_Events & 0x01)) - { - m_Events |= 0x01; - // setup here, only when at least one player has ported to the map - if(!SetupBattleGround()) - { - EndNow(); - return; - } - for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_4; i++) - SpawnBGObject(i, RESPAWN_IMMEDIATELY); - - SetStartDelayTime(START_DELAY1); - SendMessageToAll(LANG_ARENA_ONE_MINUTE); - } - // After 30 seconds, warning is signalled - else if (GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x04)) - { - m_Events |= 0x04; - SendMessageToAll(LANG_ARENA_THIRTY_SECONDS); - } - // After 15 seconds, warning is signalled - else if (GetStartDelayTime() <= START_DELAY3 && !(m_Events & 0x08)) - { - m_Events |= 0x08; - SendMessageToAll(LANG_ARENA_FIFTEEN_SECONDS); - } - // delay expired (1 minute) - else if (GetStartDelayTime() <= 0 && !(m_Events & 0x10)) - { - m_Events |= 0x10; - - for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_2; i++) - DoorOpen(i); - - for(uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; i++) - SpawnBGObject(i, 60); - - SendMessageToAll(LANG_ARENA_BEGUN); - SetStatus(STATUS_IN_PROGRESS); - SetStartDelayTime(0); - - for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if(Player *plr = objmgr.GetPlayer(itr->first)) - plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION); - - if(!GetPlayersCountByTeam(ALLIANCE) && GetPlayersCountByTeam(HORDE)) - EndBattleGround(HORDE); - else if(GetPlayersCountByTeam(ALLIANCE) && !GetPlayersCountByTeam(HORDE)) - EndBattleGround(ALLIANCE); - } - } - /*if(GetStatus() == STATUS_IN_PROGRESS) { // update something }*/ } +void BattleGroundNA::StartingEventCloseDoors() +{ + for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_4; i++) + SpawnBGObject(i, RESPAWN_IMMEDIATELY); +} + +void BattleGroundNA::StartingEventOpenDoors() +{ + for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_2; i++) + DoorOpen(i); + + for(uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; i++) + SpawnBGObject(i, 60); +} + void BattleGroundNA::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundNA.h b/src/game/BattleGroundNA.h index 8adef0a131b..56e2cf373c4 100644 --- a/src/game/BattleGroundNA.h +++ b/src/game/BattleGroundNA.h @@ -62,6 +62,8 @@ class BattleGroundNA : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); diff --git a/src/game/BattleGroundRL.cpp b/src/game/BattleGroundRL.cpp index 501ee704948..293b11041e0 100644 --- a/src/game/BattleGroundRL.cpp +++ b/src/game/BattleGroundRL.cpp @@ -31,6 +31,16 @@ BattleGroundRL::BattleGroundRL() { m_BgObjects.resize(BG_RL_OBJECT_MAX); + + m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; + m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; + m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; + m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; + //we must set messageIds + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN; } BattleGroundRL::~BattleGroundRL() @@ -42,71 +52,27 @@ void BattleGroundRL::Update(uint32 diff) { BattleGround::Update(diff); - if (GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize()) - { - ModifyStartDelayTime(diff); - - if (!(m_Events & 0x01)) - { - m_Events |= 0x01; - - // setup here, only when at least one player has ported to the map - if(!SetupBattleGround()) - { - EndNow(); - return; - } - - for(uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; i++) - SpawnBGObject(i, RESPAWN_IMMEDIATELY); - - SetStartDelayTime(START_DELAY1); - SendMessageToAll(LANG_ARENA_ONE_MINUTE); - } - // After 30 seconds, warning is signalled - else if (GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x04)) - { - m_Events |= 0x04; - SendMessageToAll(LANG_ARENA_THIRTY_SECONDS); - } - // After 15 seconds, warning is signalled - else if (GetStartDelayTime() <= START_DELAY3 && !(m_Events & 0x08)) - { - m_Events |= 0x08; - SendMessageToAll(LANG_ARENA_FIFTEEN_SECONDS); - } - // delay expired (1 minute) - else if (GetStartDelayTime() <= 0 && !(m_Events & 0x10)) - { - m_Events |= 0x10; - - for(uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; i++) - DoorOpen(i); - - for(uint32 i = BG_RL_OBJECT_BUFF_1; i <= BG_RL_OBJECT_BUFF_2; i++) - SpawnBGObject(i, 60); - - SendMessageToAll(LANG_ARENA_BEGUN); - SetStatus(STATUS_IN_PROGRESS); - SetStartDelayTime(0); - - for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if(Player *plr = objmgr.GetPlayer(itr->first)) - plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION); - - if(!GetPlayersCountByTeam(ALLIANCE) && GetPlayersCountByTeam(HORDE)) - EndBattleGround(HORDE); - else if(GetPlayersCountByTeam(ALLIANCE) && !GetPlayersCountByTeam(HORDE)) - EndBattleGround(ALLIANCE); - } - } - /*if(GetStatus() == STATUS_IN_PROGRESS) { // update something }*/ } +void BattleGroundRL::StartingEventCloseDoors() +{ + for(uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; i++) + SpawnBGObject(i, RESPAWN_IMMEDIATELY); +} + +void BattleGroundRL::StartingEventOpenDoors() +{ + for(uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; i++) + DoorOpen(i); + + for(uint32 i = BG_RL_OBJECT_BUFF_1; i <= BG_RL_OBJECT_BUFF_2; i++) + SpawnBGObject(i, 60); +} + void BattleGroundRL::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundRL.h b/src/game/BattleGroundRL.h index abb6b25d4ff..772c9dd0879 100644 --- a/src/game/BattleGroundRL.h +++ b/src/game/BattleGroundRL.h @@ -60,6 +60,8 @@ class BattleGroundRL : public BattleGround virtual void AddPlayer(Player *plr); virtual void Reset(); virtual void FillInitialWorldStates(WorldPacket &d); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); diff --git a/src/game/BattleGroundRV.cpp b/src/game/BattleGroundRV.cpp index a66f0ce30e2..8c252c35c97 100644 --- a/src/game/BattleGroundRV.cpp +++ b/src/game/BattleGroundRV.cpp @@ -19,10 +19,20 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundRV.h" +#include "Language.h" BattleGroundRV::BattleGroundRV() { + m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; + m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; + m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; + m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; + //we must set messageIds + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN; } BattleGroundRV::~BattleGroundRV() @@ -35,6 +45,14 @@ void BattleGroundRV::Update(uint32 diff) BattleGround::Update(diff); } +void BattleGroundRV::StartingEventCloseDoors() +{ +} + +void BattleGroundRV::StartingEventOpenDoors() +{ +} + void BattleGroundRV::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundRV.h b/src/game/BattleGroundRV.h index 2d2ad12c941..e3e94baf101 100644 --- a/src/game/BattleGroundRV.h +++ b/src/game/BattleGroundRV.h @@ -39,6 +39,9 @@ class BattleGroundRV : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); + void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); bool SetupBattleGround(); diff --git a/src/game/BattleGroundSA.cpp b/src/game/BattleGroundSA.cpp index d5585fd93e9..68ef2af19be 100644 --- a/src/game/BattleGroundSA.cpp +++ b/src/game/BattleGroundSA.cpp @@ -16,13 +16,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "Player.h" #include "BattleGround.h" #include "BattleGroundSA.h" -#include "Player.h" +#include "Language.h" BattleGroundSA::BattleGroundSA() { - + //TODO FIX ME! + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN; } BattleGroundSA::~BattleGroundSA() @@ -35,6 +40,14 @@ void BattleGroundSA::Update(uint32 diff) BattleGround::Update(diff); } +void BattleGroundSA::StartingEventCloseDoors() +{ +} + +void BattleGroundSA::StartingEventOpenDoors() +{ +} + void BattleGroundSA::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); diff --git a/src/game/BattleGroundSA.h b/src/game/BattleGroundSA.h index 331a41455fd..3ba23d02656 100644 --- a/src/game/BattleGroundSA.h +++ b/src/game/BattleGroundSA.h @@ -39,6 +39,8 @@ class BattleGroundSA : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); void RemovePlayer(Player *plr,uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index 93b5659a0b9..bb63840feb3 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -54,6 +54,11 @@ BattleGroundWS::BattleGroundWS() { m_BgObjects.resize(BG_WS_OBJECT_MAX); m_BgCreatures.resize(BG_CREATURES_MAX_WS); + + m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES; + m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE; + m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN; } BattleGroundWS::~BattleGroundWS() @@ -64,77 +69,7 @@ void BattleGroundWS::Update(uint32 diff) { BattleGround::Update(diff); - // after bg start we get there (once) - if (GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize()) - { - ModifyStartDelayTime(diff); - - if(!(m_Events & 0x01)) - { - m_Events |= 0x01; - - // setup here, only when at least one player has ported to the map - if(!SetupBattleGround()) - { - EndNow(); - return; - } - -// for(uint32 i = WS_SPIRIT_MAIN_ALLIANCE; i <= WS_SPIRIT_MAIN_HORDE; i++) -// SpawnBGCreature(i, RESPAWN_IMMEDIATELY); - - for(uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_H_4; i++) - { - SpawnBGObject(i, RESPAWN_IMMEDIATELY); - DoorClose(i); - } - for(uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; i++) - SpawnBGObject(i, RESPAWN_ONE_DAY); - - SetStartDelayTime(START_DELAY0); - } - // After 1 minute, warning is signalled - else if(GetStartDelayTime() <= START_DELAY1 && !(m_Events & 0x04)) - { - m_Events |= 0x04; - SendMessageToAll(GetTrinityString(LANG_BG_WS_ONE_MINUTE)); - } - // After 1,5 minute, warning is signalled - else if(GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x08)) - { - m_Events |= 0x08; - SendMessageToAll(GetTrinityString(LANG_BG_WS_HALF_MINUTE)); - } - // After 2 minutes, gates OPEN ! x) - else if(GetStartDelayTime() < 0 && !(m_Events & 0x10)) - { - m_Events |= 0x10; - for(uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_4; i++) - DoorOpen(i); - for(uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_2; i++) - DoorOpen(i); - - SpawnBGObject(BG_WS_OBJECT_DOOR_A_5, RESPAWN_ONE_DAY); - SpawnBGObject(BG_WS_OBJECT_DOOR_A_6, RESPAWN_ONE_DAY); - SpawnBGObject(BG_WS_OBJECT_DOOR_H_3, RESPAWN_ONE_DAY); - SpawnBGObject(BG_WS_OBJECT_DOOR_H_4, RESPAWN_ONE_DAY); - - for(uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; i++) - SpawnBGObject(i, RESPAWN_IMMEDIATELY); - - SendMessageToAll(GetTrinityString(LANG_BG_WS_BEGIN)); - - PlaySoundToAll(SOUND_BG_START); - if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) - PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC - Custom config - SetStatus(STATUS_IN_PROGRESS); - - for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if(Player* plr = objmgr.GetPlayer(itr->first)) - plr->RemoveAurasDueToSpell(SPELL_PREPARATION); - } - } - else if(GetStatus() == STATUS_IN_PROGRESS) + if(GetStatus() == STATUS_IN_PROGRESS) { if(m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_WAIT_RESPAWN) { @@ -179,6 +114,33 @@ void BattleGroundWS::Update(uint32 diff) } } +void BattleGroundWS::StartingEventCloseDoors() +{ + for(uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_H_4; i++) + { + DoorClose(i); + SpawnBGObject(i, RESPAWN_IMMEDIATELY); + } + for(uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; i++) + SpawnBGObject(i, RESPAWN_ONE_DAY); +} + +void BattleGroundWS::StartingEventOpenDoors() +{ + for(uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_4; i++) + DoorOpen(i); + for(uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_2; i++) + DoorOpen(i); + + SpawnBGObject(BG_WS_OBJECT_DOOR_A_5, RESPAWN_ONE_DAY); + SpawnBGObject(BG_WS_OBJECT_DOOR_A_6, RESPAWN_ONE_DAY); + SpawnBGObject(BG_WS_OBJECT_DOOR_H_3, RESPAWN_ONE_DAY); + SpawnBGObject(BG_WS_OBJECT_DOOR_H_4, RESPAWN_ONE_DAY); + + for(uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; i++) + SpawnBGObject(i, RESPAWN_IMMEDIATELY); +} + void BattleGroundWS::AddPlayer(Player *plr) { BattleGround::AddPlayer(plr); @@ -206,7 +168,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(GetTrinityString(LANG_BG_WS_F_PLACED)); + SendMessageToAll(GetMangosString(LANG_BG_WS_F_PLACED), CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); // flag respawned sound... } } @@ -220,12 +182,12 @@ void BattleGroundWS::RespawnFlagAfterDrop(uint32 team) if(team == ALLIANCE) { SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(GetTrinityString(LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED)); + SendMessageToAll(GetMangosString(LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED), CHAT_MSG_BG_SYSTEM_NEUTRAL); } else { SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(GetTrinityString(LANG_BG_WS_HORDE_FLAG_RESPAWNED)); + SendMessageToAll(GetMangosString(LANG_BG_WS_HORDE_FLAG_RESPAWNED), CHAT_MSG_BG_SYSTEM_NEUTRAL); } PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); diff --git a/src/game/BattleGroundWS.h b/src/game/BattleGroundWS.h index 9a54479abb4..6b42ecbfc3c 100644 --- a/src/game/BattleGroundWS.h +++ b/src/game/BattleGroundWS.h @@ -147,6 +147,8 @@ class BattleGroundWS : public BattleGround /* inherited from BattlegroundClass */ virtual void AddPlayer(Player *plr); + virtual void StartingEventCloseDoors(); + virtual void StartingEventOpenDoors(); /* BG Flags */ uint64 GetAllianceFlagPickerGUID() const { return m_FlagKeepers[BG_TEAM_ALLIANCE]; } diff --git a/src/game/Language.h b/src/game/Language.h index e0e6ce8e8c2..0bb9ca3318c 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -565,9 +565,11 @@ enum TrinityStrings // Battleground LANG_BG_A_WINS = 600, LANG_BG_H_WINS = 601, - LANG_BG_WS_ONE_MINUTE = 602, - LANG_BG_WS_HALF_MINUTE = 603, - LANG_BG_WS_BEGIN = 604, + + LANG_BG_WS_START_TWO_MINUTES = 753, + LANG_BG_WS_START_ONE_MINUTE = 602, + LANG_BG_WS_START_HALF_MINUTE = 603, + LANG_BG_WS_HAS_BEGUN = 604, LANG_BG_WS_CAPTURED_HF = 605, LANG_BG_WS_CAPTURED_AF = 606, @@ -581,9 +583,10 @@ enum TrinityStrings LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED = 614, LANG_BG_WS_HORDE_FLAG_RESPAWNED = 615, - LANG_BG_EY_ONE_MINUTE = 636, - LANG_BG_EY_HALF_MINUTE = 637, - LANG_BG_EY_BEGIN = 638, + LANG_BG_EY_START_TWO_MINUTES = 755, + LANG_BG_EY_START_ONE_MINUTE = 636, + LANG_BG_EY_START_HALF_MINUTE = 637, + LANG_BG_EY_HAS_BEGUN = 638, LANG_BG_AB_ALLY = 650, LANG_BG_AB_HORDE = 651, @@ -596,9 +599,11 @@ enum TrinityStrings LANG_BG_AB_NODE_DEFENDED = 658, LANG_BG_AB_NODE_ASSAULTED = 659, LANG_BG_AB_NODE_CLAIMED = 660, - LANG_BG_AB_ONEMINTOSTART = 661, - LANG_BG_AB_HALFMINTOSTART = 662, - LANG_BG_AB_STARTED = 663, + + LANG_BG_AB_START_TWO_MINUTES = 754, + LANG_BG_AB_START_ONE_MINUTE = 661, + LANG_BG_AB_START_HALF_MINUTE = 662, + LANG_BG_AB_HAS_BEGUN = 663, LANG_BG_AB_A_NEAR_VICTORY = 664, LANG_BG_AB_H_NEAR_VICTORY = 665, LANG_BG_MARK_BY_MAIL = 666, @@ -629,7 +634,7 @@ enum TrinityStrings LANG_ARENA_ONE_MINUTE = 701, LANG_ARENA_THIRTY_SECONDS = 702, LANG_ARENA_FIFTEEN_SECONDS = 703, - LANG_ARENA_BEGUN = 704, + LANG_ARENA_HAS_BEGUN = 704, LANG_WAIT_BEFORE_SPEAKING = 705, LANG_NOT_EQUIPPED_ITEM = 706, @@ -681,7 +686,11 @@ enum TrinityStrings // = 749, not used LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING = 750, // "Not enough players. This game will close in %u mins." LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS = 751, // "Not enough players. This game will close in %u seconds." - // Room for batleground/arena strings 752-799 not used +// = 752, not used +// LANG_BG_WS_START_TWO_MINUTES = 753, +// LANG_BG_AB_START_TWO_MINUTES = 754, +// LANG_BG_EY_START_TWO_MINUTES = 755, + // Room for batleground/arena strings 756-799 not used // Room for BG/ARENA 750-769 not used diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ffd0c7e3dd3..0cbbe03d19d 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 "7398" + #define REVISION_NR "7401" #endif // __REVISION_NR_H__ |