当前位置: 首页>>代码示例>>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;未经允许,请勿转载。