示例#1
0
OutdoorPvPSI::OutdoorPvPSI() : OutdoorPvP(),
    m_resourcesAlliance(0),
    m_resourcesHorde(0),
    m_zoneOwner(TEAM_NONE)
{
    uint32 zoneId = sOutdoorPvPMgr.GetZoneOfAffectedScript(this);
    FillInitialWorldStates(zoneId);
}
示例#2
0
void BattlefieldTB::SendInitWorldStatesTo(Player* player)
{
    WorldPackets::WorldState::InitWorldStates packet;
    packet.AreaID = m_ZoneId;
    packet.MapID = m_MapId;
    packet.SubareaID = 0;

    FillInitialWorldStates(packet);

    player->SendDirectMessage(packet.Write());
}
void BattlefieldWG::SendInitWorldStatesTo(Player* player)
{
    WorldPacket data(SMSG_INIT_WORLD_STATES, (4 + 4 + 4 + 2 + (BuildingsInZone.size() * 8) + (WorkshopsList.size() * 8)));

    data << uint32(m_MapId);
    data << uint32(m_ZoneId);
    data << uint32(0);
    data << uint16(10 + BuildingsInZone.size() + WorkshopsList.size()); // Number of fields

    FillInitialWorldStates(data);

    player->GetSession()->SendPacket(&data);
}
示例#4
0
OutdoorPvPNA::OutdoorPvPNA(uint32 id) : OutdoorPvP(id),
    m_zoneOwner(TEAM_NONE),
    m_soldiersRespawnTimer(0),
    m_zoneWorldState(0),
    m_zoneMapState(WORLD_STATE_NA_HALAA_NEUTRAL),
    m_guardsLeft(0),
    m_isUnderSiege(false)
{
    // initially set graveyard owner to neither faction
    sObjectMgr.SetGraveYardLinkTeam(GRAVEYARD_ID_HALAA, GRAVEYARD_ZONE_ID_HALAA, TEAM_INVALID);

    uint32 zoneId = sOutdoorPvPMgr.GetZoneOfAffectedScript(this);
    FillInitialWorldStates(zoneId);
}
示例#5
0
OutdoorPvPEP::OutdoorPvPEP() : OutdoorPvP(),
    m_towersAlliance(0),
    m_towersHorde(0)
{
    // FIXME - need read data from worlstates
    m_towerWorldState[0] = WORLD_STATE_EP_NORTHPASS_NEUTRAL;
    m_towerWorldState[1] = WORLD_STATE_EP_CROWNGUARD_NEUTRAL;
    m_towerWorldState[2] = WORLD_STATE_EP_EASTWALL_NEUTRAL;
    m_towerWorldState[3] = WORLD_STATE_EP_PLAGUEWOOD_NEUTRAL;

    for (uint8 i = 0; i < MAX_EP_TOWERS; ++i)
        m_towerOwner[i] = TEAM_NONE;

    // initially set graveyard owner to neither faction
    sObjectMgr.SetGraveYardLinkTeam(GRAVEYARD_ID_EASTERN_PLAGUE, GRAVEYARD_ZONE_EASTERN_PLAGUE, TEAM_INVALID);

    uint32 zoneId = sOutdoorPvPMgr.GetZoneOfAffectedScript(this);
    FillInitialWorldStates(zoneId);
}
示例#6
0
OutdoorPvPTF::OutdoorPvPTF(uint32 id) : OutdoorPvP(id),
    m_zoneWorldState(WORLD_STATE_TF_TOWERS_CONTROLLED),
    m_zoneOwner(TEAM_NONE),
    //m_zoneUpdateTimer(TIMER_TF_UPDATE_TIME),
    m_zoneLockTimer(0),
    m_towersAlliance(0),
    m_towersHorde(0)
{
    m_towerWorldState[0] = WORLD_STATE_TF_WEST_TOWER_NEUTRAL;
    m_towerWorldState[1] = WORLD_STATE_TF_NORTH_TOWER_NEUTRAL;
    m_towerWorldState[2] = WORLD_STATE_TF_EAST_TOWER_NEUTRAL;
    m_towerWorldState[3] = WORLD_STATE_TF_SOUTH_EAST_TOWER_NEUTRAL;
    m_towerWorldState[4] = WORLD_STATE_TF_SOUTH_TOWER_NEUTRAL;

    for (uint8 i = 0; i < MAX_TF_TOWERS; ++i)
        m_towerOwner[i] = TEAM_NONE;

    uint32 zoneId = sOutdoorPvPMgr.GetZoneOfAffectedScript(this);
    FillInitialWorldStates(zoneId);
}
示例#7
0
void BattlefieldWG::SendInitWorldStatesTo(Player* player)
{
    WorldStateBuilder builder(m_MapId, 0, m_ZoneId);
    FillInitialWorldStates(builder);
    builder.SendPacket(player->GetSession());
}