Ejemplo n.º 1
0
void BattleGroundSA::ResetBattle(uint32 winner, Team teamDefending)
{
    Phase = SA_ROUND_TWO;
    shipsTimer = BG_SA_BOAT_START;
    shipsStarted = false;

    for (int32 i = 0; i < BG_SA_GATE_MAX; ++i)
        GateStatus[i] = BG_SA_GO_GATES_NORMAL;

    SetStartTime(0);
    defender = (teamDefending  == ALLIANCE) ?  HORDE : ALLIANCE;
    relicGateDestroyed = false;
    ToggleTimer();

    SetupShips();

    for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
    {
        Player *plr = sObjectMgr.GetPlayer(itr->first);

        if (!plr)
            continue;

        TeleportPlayerToCorrectLoc(plr, true);

        if (plr->GetBGTeam() == defender && plr->GetItemByEntry(39213) != NULL)
            plr->DestroyItemCount(39213, 1, true);
    }

    UpdatePhase();
    ResetWorldStates();
}
Ejemplo n.º 2
0
void BattleGroundSA::AddPlayer(Player *plr)
{
    BattleGround::AddPlayer(plr);

    TeleportPlayerToCorrectLoc(plr);

    BattleGroundSAScore* sc = new BattleGroundSAScore;

    m_PlayerScores[plr->GetObjectGuid()] = sc;
}
Ejemplo n.º 3
0
void BattleGroundSA::ResetBattle(uint32 winner, Team teamDefending)
{
    Phase = SA_ROUND_TWO;
    shipsTimer = 60000;
    shipsStarted = false;
  
    for (int32 i = 0; i <= BG_SA_GATE_MAX; ++i)
        GateStatus[i] = 1;

    SetStartTime(0);
    defender = (teamDefending  == ALLIANCE) ?  HORDE : ALLIANCE;
	relicGateDestroyed = false;
    ToggleTimer();

    SetupShips();

    for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
    {
        if (Player *plr = sObjectMgr.GetPlayer(itr->first))
            TeleportPlayerToCorrectLoc(plr, true);
    }

    UpdatePhase();
}