mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 16:37:06 +00:00
[10924] Send time diff between Update() calls for object - should help with mob respawn on inactive grids etc. Based on patches by VladimirMangos and cipherCOM. All issues from previous patches should be finally fixed now.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
72b1d30a1c
commit
b11820593c
39 changed files with 284 additions and 149 deletions
|
|
@ -158,7 +158,7 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG
|
|||
ginfo->ArenaTeamId = arenateamid;
|
||||
ginfo->IsRated = isRated;
|
||||
ginfo->IsInvitedToBGInstanceGUID = 0;
|
||||
ginfo->JoinTime = getMSTime();
|
||||
ginfo->JoinTime = WorldTimer::getMSTime();
|
||||
ginfo->RemoveInviteTime = 0;
|
||||
ginfo->GroupTeam = leader->GetTeam();
|
||||
ginfo->ArenaTeamRating = arenaRating;
|
||||
|
|
@ -176,7 +176,7 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG
|
|||
|
||||
DEBUG_LOG("Adding Group to BattleGroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index);
|
||||
|
||||
uint32 lastOnlineTime = getMSTime();
|
||||
uint32 lastOnlineTime = WorldTimer::getMSTime();
|
||||
|
||||
//announce world (this don't need mutex)
|
||||
if (isRated && sWorld.getConfig(CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN))
|
||||
|
|
@ -253,7 +253,7 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG
|
|||
|
||||
void BattleGroundQueue::PlayerInvitedToBGUpdateAverageWaitTime(GroupQueueInfo* ginfo, BattleGroundBracketId bracket_id)
|
||||
{
|
||||
uint32 timeInQueue = getMSTimeDiff(ginfo->JoinTime, getMSTime());
|
||||
uint32 timeInQueue = WorldTimer::getMSTimeDiff(ginfo->JoinTime, WorldTimer::getMSTime());
|
||||
uint8 team_index = BG_TEAM_ALLIANCE; //default set to BG_TEAM_ALLIANCE - or non rated arenas!
|
||||
if (!ginfo->ArenaType)
|
||||
{
|
||||
|
|
@ -460,7 +460,7 @@ bool BattleGroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, BattleGround * b
|
|||
if (bg->isArena() && bg->isRated())
|
||||
bg->SetArenaTeamIdForTeam(ginfo->GroupTeam, ginfo->ArenaTeamId);
|
||||
|
||||
ginfo->RemoveInviteTime = getMSTime() + INVITE_ACCEPT_WAIT_TIME;
|
||||
ginfo->RemoveInviteTime = WorldTimer::getMSTime() + INVITE_ACCEPT_WAIT_TIME;
|
||||
|
||||
// loop through the players
|
||||
for(GroupQueueInfoPlayers::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
|
||||
|
|
@ -626,7 +626,7 @@ bool BattleGroundQueue::CheckPremadeMatch(BattleGroundBracketId bracket_id, uint
|
|||
// this could be 2 cycles but i'm checking only first team in queue - it can cause problem -
|
||||
// if first is invited to BG and seconds timer expired, but we can ignore it, because players have only 80 seconds to click to enter bg
|
||||
// and when they click or after 80 seconds the queue info is removed from queue
|
||||
uint32 time_before = getMSTime() - sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH);
|
||||
uint32 time_before = WorldTimer::getMSTime() - sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH);
|
||||
for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
{
|
||||
if (!m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE + i].empty())
|
||||
|
|
@ -932,7 +932,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI
|
|||
// (after what time the ratings aren't taken into account when making teams) then
|
||||
// the discard time is current_time - time_to_discard, teams that joined after that, will have their ratings taken into account
|
||||
// else leave the discard time on 0, this way all ratings will be discarded
|
||||
uint32 discardTime = getMSTime() - sBattleGroundMgr.GetRatingDiscardTimer();
|
||||
uint32 discardTime = WorldTimer::getMSTime() - sBattleGroundMgr.GetRatingDiscardTimer();
|
||||
|
||||
// we need to find 2 teams which will play next game
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue