void StrandOfTheAncients::OnCreate() { WorldStateManager& sm = m_mapMgr->GetStateManager(); sm.CreateWorldState( WORLDSTATE_SOTA_CAPTURE_BAR_DISPLAY, 0 ); sm.CreateWorldState( WORLDSTATE_SOTA_CAPTURE_BAR_VALUE, 0 ); PrepareRound(); sm.CreateWorldState( WORLDSTATE_SOTA_BONUS_TIME, 0 ); sm.CreateWorldState( WORLDSTATE_SOTA_TIMER_1, 0 ); sm.CreateWorldState( WORLDSTATE_SOTA_TIMER_2, 0 ); sm.CreateWorldState( WORLDSTATE_SOTA_TIMER_3, 0 ); }
void StrandOfTheAncient::OnCreate() { sLog.outDebug("OnCreate: SOTA Battleground\n"); SetWorldState(WORLDSTATE_SOTA_CAPTURE_BAR_DISPLAY, 0); SetWorldState(WORLDSTATE_SOTA_CAPTURE_BAR_VALUE, 0); PrepareRound(); SetWorldState(WORLDSTATE_SOTA_BONUS_TIME, 0); SetWorldState(WORLDSTATE_SOTA_TIMER_1, 0); SetWorldState(WORLDSTATE_SOTA_TIMER_2, 0); SetWorldState(WORLDSTATE_SOTA_TIMER_3, 0); }
void StrandOfTheAncient::OnCreate() { { uint32 i; BattleRound = 1; roundprogress = SOTA_ROUND_PREPARATION; for(i = 0; i < 2; i++) { m_players[i].clear(); m_pendPlayers[i].clear(); RoundFinishTime[ i ] = 10 * 60; } m_pvpData.clear(); m_resurrectMap.clear(); // Boats for(i = 0; i < 4; i++) { m_boats[i] = m_mapMgr->CreateAndSpawnGameObject(20808, sotaBoats[i][0], sotaBoats[i][1], sotaBoats[i][2], sotaBoats[i][3], 1.0f); m_boats[i]->PushToWorld( m_mapMgr ); } /* Relic */ m_relic = m_mapMgr->CreateAndSpawnGameObject(GO_RELIC, sotaTitanRelic[0], sotaTitanRelic[1], sotaTitanRelic[2], sotaTitanRelic[3], 1.0f); for(i = 0; i < GATE_COUNT; i++) { m_gates[i] = m_mapMgr->CreateAndSpawnGameObject(GateGOIds[i], sotaGates[i][0], sotaGates[i][1], sotaGates[i][2], sotaGates[i][3], 1.0f); m_gateSigils[i] = m_mapMgr->CreateAndSpawnGameObject(GateSigilGOIds[i], sotaGateSigils[i][0], sotaGateSigils[i][1], sotaGateSigils[i][2], sotaGateSigils[i][3], 1.0f); m_gateTransporters[i] = m_mapMgr->CreateAndSpawnGameObject(192819, sotaTransporters[i][0], sotaTransporters[i][1], sotaTransporters[i][2], sotaTransporters[i][3], 1.0f); } // Spawn door for Chamber of Ancient Relics m_endgate = m_mapMgr->CreateAndSpawnGameObject(GateGOIds[i], sotaChamberGate[0], sotaChamberGate[1], sotaChamberGate[2], sotaChamberGate[3], 1.0f); } PrepareRound(); }
void StrandOfTheAncient::FinishRound(){ sEventMgr.RemoveEvents( this, EVENT_SOTA_TIMER ); EventResurrectPlayers(); RoundFinishTime[ BattleRound - 1 ] = RoundTime; if( BattleRound == 1 ){ BattleRound = 2; PrepareRound(); }else{ if( RoundFinishTime[ 0 ] < RoundFinishTime[ 1 ] ) Finish( Attackers ); else Finish( Defenders ); } }