mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
corrected spawning of buffobjects in arena
they are spawned in all arenas 60 seconds after start so i implemented this function in BattleGround.cpp maybe we should use BattleGroundAA for such things then we also can drop all arena-files, cause all arenas are working in the same way (at least those which are currently implemented)
This commit is contained in:
parent
d249e9550a
commit
9b7b3b0304
2 changed files with 24 additions and 0 deletions
|
|
@ -360,10 +360,24 @@ void BattleGround::Update(uint32 diff)
|
|||
}
|
||||
m_PrematureCountDownTimer = newtime;
|
||||
}
|
||||
|
||||
}
|
||||
else if (m_PrematureCountDown)
|
||||
m_PrematureCountDown = false;
|
||||
|
||||
/*********************************************************/
|
||||
/*** ARENA BUFF OBJECT SPAWNING ***/
|
||||
/*********************************************************/
|
||||
if (isArena() && !m_ArenaBuffSpawned)
|
||||
{
|
||||
// 60 seconds after start the buffobjects in arena should get spawned
|
||||
if (m_StartTime > uint32(m_StartDelayTimes[BG_STARTING_EVENT_FIRST] + ARENA_SPAWN_BUFF_OBJECTS))
|
||||
{
|
||||
SpawnEvent(ARENA_BUFF_EVENT, 0, true);
|
||||
m_ArenaBuffSpawned = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/*** BATTLEGROUND STARTING SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
|
@ -1085,6 +1099,11 @@ void BattleGround::Reset()
|
|||
|
||||
// door-event2 is always 0
|
||||
m_ActiveEvents[BG_EVENT_DOOR] = 0;
|
||||
if (isArena())
|
||||
{
|
||||
m_ActiveEvents[ARENA_BUFF_EVENT] = BG_EVENT_NONE;
|
||||
m_ArenaBuffSpawned = false;
|
||||
}
|
||||
|
||||
if (m_InvitedAlliance > 0 || m_InvitedHorde > 0)
|
||||
sLog.outError("BattleGround system: bad counter, m_InvitedAlliance: %d, m_InvitedHorde: %d", m_InvitedAlliance, m_InvitedHorde);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue