diff options
author | megamage <none@none> | 2009-03-09 17:07:12 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-09 17:07:12 -0600 |
commit | 1f296b7d40c16e209b8cee6a64c166fef6d4b8fd (patch) | |
tree | 5b1ecf2dad11661b2bb37b4cfd1e3d63d0a21e6f /src/game/BattleGround.h | |
parent | 01b67a1f6a08b22dcdea6e7f5647bb37dc2465d9 (diff) |
[7414] Fixed premature finish timer messages for battleground (va_start was broken). Author: Triply
Fixed typo with BattleGroundPlayerMap.
Optimized implementation for removing offline players from battleground.
Fixed typo in BattleGroundMgr::DeleteAllBattleGrounds.
Patch is tested and should work.
TODO there is a bug if you disable premature finish timer, that can cause battlegrounds to be never ending!
TODO rewrite BattleGround::RemovePlayer function - and fix bugs there!
I might not have today enough time to fix those bugs.
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGround.h')
-rw-r--r-- | src/game/BattleGround.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 9d060f9d2c6..ee8a22d4f8f 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -89,7 +89,7 @@ enum BattleGroundTimeIntervals INVITATION_REMIND_TIME = 60000, // ms INVITE_ACCEPT_WAIT_TIME = 80000, // ms TIME_TO_AUTOREMOVE = 120000, // ms - MAX_OFFLINE_TIME = 300000, // ms + MAX_OFFLINE_TIME = 300, // secs RESPAWN_ONE_DAY = 86400, // secs RESPAWN_IMMEDIATELY = 0, // secs BUFF_RESPAWN_TIME = 180, // secs @@ -125,7 +125,7 @@ enum BattleGroundStatus struct BattleGroundPlayer { - uint32 LastOnlineTime; // for tracking and removing offline players from queue after 5 minutes + time_t OfflineRemoveTime; // for tracking and removing offline players from queue after 5 minutes uint32 Team; // Player's team }; @@ -467,6 +467,7 @@ class BattleGround virtual void EventPlayerDroppedFlag(Player* /*player*/) {} virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) {} virtual void EventPlayerCapturedFlag(Player* /*player*/) {} + void EventPlayerLoggedIn(Player* player, uint64 plr_guid); void EventPlayerLoggedOut(Player* player); /* Death related */ @@ -506,13 +507,13 @@ class BattleGround // since arenas can be AvA or Hvh, we have to get the "temporary" team of a player uint32 GetPlayerTeam(uint64 guid); bool IsPlayerInBattleGround(uint64 guid); - void PlayerRelogin(Player* plr); void SetDeleteThis() {m_SetDeleteThis = true;} protected: //this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends BattleGround void EndNow(); + void PlayerAddedToBGCheckIfBGIsRunning(Player* plr); /* Scorekeeping */ // Player scores @@ -558,6 +559,7 @@ class BattleGround /* Player lists */ std::vector<uint64> m_ResurrectQueue; // Player GUID + std::deque<uint64> m_OfflineQueue; // Player GUID std::map<uint64, uint8> m_RemovedPlayers; // uint8 is remove type (0 - bgqueue, 1 - bg, 2 - resurrect queue) /* Invited counters are useful for player invitation to BG - do not allow, if BG is started to one faction to have 2 more players than another faction */ |