當前位置: 首頁>>代碼示例>>C++>>正文


C++ FillInitialWorldState函數代碼示例

本文整理匯總了C++中FillInitialWorldState函數的典型用法代碼示例。如果您正苦於以下問題:C++ FillInitialWorldState函數的具體用法?C++ FillInitialWorldState怎麽用?C++ FillInitialWorldState使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了FillInitialWorldState函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: FillInitialWorldState

void BattlegroundKT::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count, BG_KT_ORB_POINTS_A, GetTeamScore(ALLIANCE));
    FillInitialWorldState(data, count, BG_KT_ORB_POINTS_H, GetTeamScore(HORDE));

    /*if (m_OrbState[BG_TEAM_ALLIANCE] == BG_KT_ORB_STATE_ON_GROUND)
        FillInitialWorldState(data, count, BG_KT_ICON_A, -1);
    else if (m_OrbState[BG_TEAM_ALLIANCE] == BG_KT_ORB_STATE_ON_PLAYER)
        FillInitialWorldState(data, count, BG_KT_ICON_A, 1);
    else
        FillInitialWorldState(data, count, BG_KT_ICON_A, 0);

    if (m_OrbState[BG_TEAM_HORDE] == BG_KT_ORB_STATE_ON_GROUND)
        FillInitialWorldState(data, count, BG_KT_ICON_H, -1);
    else if (m_OrbState[BG_TEAM_HORDE] == BG_KT_ORB_STATE_ON_PLAYER)
        FillInitialWorldState(data, count, BG_KT_ICON_H, 1);
    else
        FillInitialWorldState(data, count, BG_KT_ICON_H, 0);*/

    FillInitialWorldState(data, count, BG_KT_ORB_POINTS_MAX, BG_KT_MAX_TEAM_SCORE);

    /*if (m_OrbState[BG_TEAM_HORDE] == BG_KT_ORB_STATE_ON_PLAYER)
        FillInitialWorldState(data, count, BG_KT_ORB_STATE, 2);
    else
        FillInitialWorldState(data, count, BG_KT_ORB_STATE, 1);

    if (m_OrbState[BG_TEAM_ALLIANCE] == BG_KT_ORB_STATE_ON_PLAYER)
        FillInitialWorldState(data, count, BG_KT_ORB_STATE, 2);
    else
        FillInitialWorldState(data, count, BG_KT_ORB_STATE, 1);*/

    FillInitialWorldState(data, count, BG_KT_TIME_ENABLED, 1);
    FillInitialWorldState(data, count, BG_KT_TIME_REMAINING, GetRemainingTimeInMinutes());
}
開發者ID:3DViking,項目名稱:MistCore,代碼行數:34,代碼來源:BattlegroundKT.cpp

示例2: FillInitialWorldState

void OutdoorPvPEP::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count, WORLD_STATE_EP_TOWER_COUNT_ALLIANCE, m_towersAlliance);
    FillInitialWorldState(data, count, WORLD_STATE_EP_TOWER_COUNT_HORDE, m_towersHorde);

    for (uint8 i = 0; i < MAX_EP_TOWERS; ++i)
        FillInitialWorldState(data, count, m_towerWorldState[i], WORLD_STATE_ADD);
}
開發者ID:Blutban,項目名稱:OneServer,代碼行數:8,代碼來源:OutdoorPvPEP.cpp

示例3: FillInitialWorldState

void OutdoorPvPTF::FillInitialWorldStates(uint32 zoneId)
{
    if (m_zoneWorldState == WORLD_STATE_TF_TOWERS_CONTROLLED)
    {
        FillInitialWorldState(zoneId, WORLD_STATE_TF_TOWER_COUNT_H, m_towersHorde);
        FillInitialWorldState(zoneId, WORLD_STATE_TF_TOWER_COUNT_A, m_towersAlliance);
    }
    else
        UpdateTimerWorldState();
}
開發者ID:beyourself,項目名稱:RustEmu-Core,代碼行數:10,代碼來源:OutdoorPvPTF.cpp

示例4: uint32

void OPvPCapturePointTF::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    data << uint32(TFTowerWorldStates[m_TowerType].n) << uint32(bool(m_TowerState & TF_TOWERSTATE_N));
    data << uint32(TFTowerWorldStates[m_TowerType].h) << uint32(bool(m_TowerState & TF_TOWERSTATE_H));
    data << uint32(TFTowerWorldStates[m_TowerType].a) << uint32(bool(m_TowerState & TF_TOWERSTATE_A));

    FillInitialWorldState(data, count, TFTowerWorldStates[m_TowerType].n,     bool(m_TowerState & TF_TOWERSTATE_N));
    FillInitialWorldState(data, count, TFTowerWorldStates[m_TowerType].h,     bool(m_TowerState & TF_TOWERSTATE_H));
    FillInitialWorldState(data, count, TFTowerWorldStates[m_TowerType].a,     bool(m_TowerState & TF_TOWERSTATE_A));
}
開發者ID:Gengeru,項目名稱:mangos,代碼行數:10,代碼來源:OutdoorPvPTF.cpp

示例5: FillInitialWorldState

void BattleGroundAV::FillInitialWorldStates()
{
    bool stateok;
    for (uint8 i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
    {
        for (uint8 j = 0; j < BG_AV_MAX_STATES; ++j)
        {
            stateok = (m_Nodes[i].State == j);
            FillInitialWorldState(BG_AV_NodeWorldStates[i][GetWorldStateType(j, TEAM_INDEX_ALLIANCE)],
                m_Nodes[i].Owner == TEAM_INDEX_ALLIANCE && stateok);
            FillInitialWorldState(BG_AV_NodeWorldStates[i][GetWorldStateType(j, TEAM_INDEX_HORDE)],
                m_Nodes[i].Owner == TEAM_INDEX_HORDE && stateok);
        }
    }

    if (m_Nodes[BG_AV_NODES_SNOWFALL_GRAVE].Owner == TEAM_INDEX_NEUTRAL)    // cause neutral teams aren't handled generic
        FillInitialWorldState(AV_SNOWFALL_N, WORLD_STATE_ADD);

    FillInitialWorldState(BG_AV_Alliance_Score, m_TeamScores[TEAM_INDEX_ALLIANCE]);
    FillInitialWorldState(BG_AV_Horde_Score,    m_TeamScores[TEAM_INDEX_HORDE]);
    FillInitialWorldState(BG_AV_MineWorldStates[BG_AV_NORTH_MINE][m_Mine_Owner[BG_AV_NORTH_MINE]], WORLD_STATE_ADD);

    if (m_Mine_Owner[BG_AV_NORTH_MINE] != m_Mine_PrevOwner[BG_AV_NORTH_MINE])
        FillInitialWorldState(BG_AV_MineWorldStates[BG_AV_NORTH_MINE][m_Mine_PrevOwner[BG_AV_NORTH_MINE]], WORLD_STATE_REMOVE);

    FillInitialWorldState( BG_AV_MineWorldStates[BG_AV_SOUTH_MINE][m_Mine_Owner[BG_AV_SOUTH_MINE]], WORLD_STATE_ADD);
    if (m_Mine_Owner[BG_AV_SOUTH_MINE] != m_Mine_PrevOwner[BG_AV_SOUTH_MINE])
        FillInitialWorldState(BG_AV_MineWorldStates[BG_AV_SOUTH_MINE][m_Mine_PrevOwner[BG_AV_SOUTH_MINE]], WORLD_STATE_REMOVE);
}
開發者ID:wuzhupc,項目名稱:mangos,代碼行數:29,代碼來源:BattleGroundAV.cpp

示例6: FillInitialWorldState

void BattleGroundAB::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    const uint8 plusArray[] = {0, 2, 3, 0, 1};

    // Node icons
    for (uint8 node = 0; node < BG_AB_NODES_MAX; ++node)
        FillInitialWorldState(data, count, BG_AB_OP_NODEICONS[node], m_Nodes[node] == 0);

    // Node occupied states
    for (uint8 node = 0; node < BG_AB_NODES_MAX; ++node)
        for (uint8 i = 1; i < BG_AB_NODES_MAX; ++i)
            FillInitialWorldState(data, count, BG_AB_OP_NODESTATES[node] + plusArray[i], m_Nodes[node] == i);

    // How many bases each team owns
    uint8 ally = 0, horde = 0;
    for (uint8 node = 0; node < BG_AB_NODES_MAX; ++node)
        if (m_Nodes[node] == BG_AB_NODE_STATUS_ALLY_OCCUPIED)
            ++ally;
        else if (m_Nodes[node] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)
            ++horde;

    FillInitialWorldState(data, count, BG_AB_OP_OCCUPIED_BASES_ALLY, ally);
    FillInitialWorldState(data, count, BG_AB_OP_OCCUPIED_BASES_HORDE, horde);

    // Team scores
    FillInitialWorldState(data, count, BG_AB_OP_RESOURCES_MAX,      BG_AB_MAX_TEAM_SCORE);
    FillInitialWorldState(data, count, BG_AB_OP_RESOURCES_WARNING,  BG_AB_WARNING_NEAR_VICTORY_SCORE);
    FillInitialWorldState(data, count, BG_AB_OP_RESOURCES_ALLY,     m_TeamScores[BG_TEAM_ALLIANCE]);
    FillInitialWorldState(data, count, BG_AB_OP_RESOURCES_HORDE,    m_TeamScores[BG_TEAM_HORDE]);

    // other unknown
    FillInitialWorldState(data, count, 0x745, 0x2);         // 37 1861 unk
}
開發者ID:bread-and-butter,項目名稱:server,代碼行數:33,代碼來源:BattleGroundAB.cpp

示例7: FillInitialWorldState

void OutdoorPvPEP::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count, EP_UI_TOWER_COUNT_A,        m_AllianceTowersControlled);
    FillInitialWorldState(data, count, EP_UI_TOWER_COUNT_H,        m_HordeTowersControlled);
    FillInitialWorldState(data, count, EP_UI_TOWER_SLIDER_DISPLAY, 0);
    FillInitialWorldState(data, count, EP_UI_TOWER_SLIDER_POS,     50);
    FillInitialWorldState(data, count, EP_UI_TOWER_SLIDER_N,       100);
    for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
    {
        itr->second->FillInitialWorldStates(data, count);
    }
}
開發者ID:Subv,項目名稱:diamondcore,代碼行數:12,代碼來源:OutdoorPvPEP.cpp

示例8: FillInitialWorldState

void WorldPvPZM::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count, m_uiAllianceScoutWorldState, 1);
    FillInitialWorldState(data, count, m_uiHordeScoutWorldState, 1);
    FillInitialWorldState(data, count, m_uiGraveyardWorldState, 1);

    for (uint8 i = 0; i < MAX_ZM_TOWERS; ++i)
    {
        FillInitialWorldState(data, count, m_uiBeaconWorldState[i], 1);
        FillInitialWorldState(data, count, m_uiBeaconMapState[i], 1);
    }
}
開發者ID:Agustin1010,項目名稱:Mangos-Agustin,代碼行數:12,代碼來源:WorldPvPZM.cpp

示例9: FillInitialWorldState

void OutdoorPvPZM::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count, m_scoutWorldStateAlliance, WORLD_STATE_ADD);
    FillInitialWorldState(data, count, m_scoutWorldStateHorde, WORLD_STATE_ADD);
    FillInitialWorldState(data, count, m_graveyardWorldState, WORLD_STATE_ADD);

    for (uint8 i = 0; i < MAX_ZM_TOWERS; ++i)
    {
        FillInitialWorldState(data, count, m_towerWorldState[i], WORLD_STATE_ADD);
        FillInitialWorldState(data, count, m_towerMapState[i], WORLD_STATE_ADD);
    }
}
開發者ID:chinshou,項目名稱:server,代碼行數:12,代碼來源:OutdoorPvPZM.cpp

示例10: FillInitialWorldState

void WorldPvPTF::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count, m_uiControllerWorldState, 1);
    if (m_uiControllerWorldState == WORLD_STATE_TF_TOWERS_CONTROLLED)
    {
        FillInitialWorldState(data, count, WORLD_STATE_TF_TOWER_COUNT_H, m_uiTowersHorde);
        FillInitialWorldState(data, count, WORLD_STATE_TF_TOWER_COUNT_A, m_uiTowersAlly);
    }
    else
        UpdateTimerWorldState();

    for (uint8 i = 0; i < MAX_TF_TOWERS; ++i)
        FillInitialWorldState(data, count, m_uiTowerWorldState[i], 1);
}
開發者ID:BACKUPLIB,項目名稱:mangos,代碼行數:14,代碼來源:WorldPvPTF.cpp

示例11: FillInitialWorldState

void OutdoorPvPTF::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count, m_uiZoneWorldState, WORLD_STATE_ADD);
    if (m_uiZoneWorldState == WORLD_STATE_TF_TOWERS_CONTROLLED)
    {
        FillInitialWorldState(data, count, WORLD_STATE_TF_TOWER_COUNT_H, m_uiTowersHorde);
        FillInitialWorldState(data, count, WORLD_STATE_TF_TOWER_COUNT_A, m_uiTowersAlliance);
    }
    else
        UpdateTimerWorldState();

    for (uint8 i = 0; i < MAX_TF_TOWERS; ++i)
        FillInitialWorldState(data, count, m_uiTowerWorldState[i], WORLD_STATE_ADD);
}
開發者ID:kramnik,項目名稱:server,代碼行數:14,代碼來源:OutdoorPvPTF.cpp

示例12: _GydOccupied

void BattleGroundSA::FillInitialWorldStates()
{
    for (uint8 i = 0; i < BG_SA_GRY_MAX; ++i)
    {
        if (m_Gyd[i] == BG_SA_GRAVE_STATUS_HORDE_OCCUPIED || m_Gyd[i] == BG_SA_GRAVE_STATUS_HORDE_CONTESTED)
            _GydOccupied(i, HORDE);
        else if (m_Gyd[i] == BG_SA_GRAVE_STATUS_ALLY_OCCUPIED || m_Gyd[i] == BG_SA_GRAVE_STATUS_ALLY_CONTESTED)
            _GydOccupied(i, ALLIANCE);
    }

    for (uint8 i = 0; i < BG_SA_MAX_WS; ++i)
    {
        FillInitialWorldState(BG_SA_WorldStatusA[i], (GetDefender() == HORDE) ? 1 : 0);
        FillInitialWorldState(BG_SA_WorldStatusH[i], (GetDefender() == HORDE) ? 0 : 1);
    }

    for (uint32 z = 0; z < BG_SA_GATE_MAX; ++z)
    {
        FillInitialWorldState(BG_SA_GateStatus[z], GateStatus[z]);
        if ((z == 0) && (GetDefender() == HORDE))                                               // Ancient gate changes color depending on the defender
            FillInitialWorldState(BG_SA_GateStatus[z], (GateStatus[z] + 3));
    }

    //Time will be sent on first update...
    FillInitialWorldState(BG_SA_ENABLE_TIMER, TimerEnabled ? uint32(1) : uint32(0));
    FillInitialWorldState(BG_SA_TIMER_MINUTES, uint32(0));
    FillInitialWorldState(BG_SA_TIMER_10SEC, uint32(0));
    FillInitialWorldState(BG_SA_TIMER_SEC, uint32(0));
}
開發者ID:Sar777,項目名稱:mangos,代碼行數:29,代碼來源:BattleGroundSA.cpp

示例13: FillInitialWorldState

void OutdoorPvPNA::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    if (m_zoneOwner != TEAM_NONE)
    {
        FillInitialWorldState(data, count, m_zoneWorldState, WORLD_STATE_ADD);

        // map states
        for (uint8 i = 0; i < MAX_NA_ROOSTS; ++i)
            FillInitialWorldState(data, count, m_roostWorldState[i], WORLD_STATE_ADD);
    }

    FillInitialWorldState(data, count, m_zoneMapState, WORLD_STATE_ADD);
    FillInitialWorldState(data, count, WORLD_STATE_NA_GUARDS_MAX, MAX_NA_GUARDS);
    FillInitialWorldState(data, count, WORLD_STATE_NA_GUARDS_LEFT, m_guardsLeft);
}
開發者ID:Calixa,項目名稱:murlocs_434,代碼行數:15,代碼來源:OutdoorPvPNA.cpp

示例14: FillInitialWorldState

void WorldPvPNA::FillInitialWorldStates(uint32 zoneId)
{
    if (m_uiZoneController != NEUTRAL)
    {
        FillInitialWorldState(zoneId, WORLD_STATE_NA_GUARDS_LEFT, m_uiGuardsLeft);
    }
}
開發者ID:alolo,項目名稱:mangos,代碼行數:7,代碼來源:WorldPvPNA.cpp

示例15: FillInitialWorldState

void OutdoorPvPZM::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
    FillInitialWorldState(data, count,  ZM_WORLDSTATE_UNK_1,   1);
    for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
    {
        itr->second->FillInitialWorldStates(data, count);
    }
}
開發者ID:Ancient,項目名稱:mangos,代碼行數:8,代碼來源:OutdoorPvPZM.cpp


注:本文中的FillInitialWorldState函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。