本文整理汇总了C++中WorldStateBuilder类的典型用法代码示例。如果您正苦于以下问题:C++ WorldStateBuilder类的具体用法?C++ WorldStateBuilder怎么用?C++ WorldStateBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WorldStateBuilder类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: FillInitialWorldStates
void BattlegroundAB::FillInitialWorldStates(WorldStateBuilder& builder)
{
const uint8 plusArray[] = {0, 2, 3, 0, 1};
// Node icons
for (uint8 node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node)
builder.AppendState(BG_AB_OP_NODEICONS[node], (m_Nodes[node] == 0) ? 1 : 0);
// Node occupied states
for (uint8 node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node)
for (uint8 i = 1; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
builder.AppendState(BG_AB_OP_NODESTATES[node] + plusArray[i], (m_Nodes[node] == i) ? 1 : 0);
// How many bases each team owns
uint8 ally = 0, horde = 0;
for (uint8 node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node)
if (m_Nodes[node] == BG_AB_NODE_STATUS_ALLY_OCCUPIED)
++ally;
else if (m_Nodes[node] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)
++horde;
builder.AppendState(BG_AB_OP_OCCUPIED_BASES_ALLY, ally);
builder.AppendState(BG_AB_OP_OCCUPIED_BASES_HORDE, horde);
// Team scores
builder.AppendState(BG_AB_OP_RESOURCES_MAX, BG_AB_MAX_TEAM_SCORE);
builder.AppendState(BG_AB_OP_RESOURCES_WARNING, BG_AB_WARNING_NEAR_VICTORY_SCORE);
builder.AppendState(BG_AB_OP_RESOURCES_ALLY, m_TeamScores[TEAM_ALLIANCE]);
builder.AppendState(BG_AB_OP_RESOURCES_HORDE, m_TeamScores[TEAM_HORDE]);
// other unknown
builder.AppendState(0x745, 0x2); // 37 1861 unk
}
开发者ID:Caydan,项目名称:mop548,代码行数:33,代码来源:BattlegroundAB.cpp
示例2: FillInitialWorldStates
void OutdoorPvPZM::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(ZM_WORLDSTATE_UNK_1, 1);
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
{
itr->second->FillInitialWorldStates(builder);
}
}
开发者ID:cooler-SAI,项目名称:PandaFire,代码行数:9,代码来源:OutdoorPvPZM.cpp
示例3: FillInitialWorldStates
void OPvPCapturePointHP::FillInitialWorldStates(WorldStateBuilder& builder)
{
switch (m_State)
{
case OBJECTIVESTATE_ALLIANCE:
case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
builder.AppendState(HP_MAP_N[m_TowerType], 0);
builder.AppendState(HP_MAP_A[m_TowerType], 1);
builder.AppendState(HP_MAP_H[m_TowerType], 0);
break;
case OBJECTIVESTATE_HORDE:
case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
builder.AppendState(HP_MAP_N[m_TowerType], 0);
builder.AppendState(HP_MAP_A[m_TowerType], 0);
builder.AppendState(HP_MAP_H[m_TowerType], 1);
break;
case OBJECTIVESTATE_NEUTRAL:
case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
default:
builder.AppendState(HP_MAP_N[m_TowerType], 1);
builder.AppendState(HP_MAP_A[m_TowerType], 0);
builder.AppendState(HP_MAP_H[m_TowerType], 0);
break;
}
}
开发者ID:Ayik0,项目名称:DeathCore_5.4.8,代码行数:26,代码来源:OutdoorPvPHP.cpp
示例4: FillInitialWorldStates
void BattlefieldWG::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_ATTACKER, GetAttackerTeam());
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_DEFENDER, GetDefenderTeam());
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_ACTIVE, IsWarTime() ? 0 : 1); // Note: cleanup these two, their names look awkward
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_SHOW_WORLDSTATE, IsWarTime() ? 1 : 0);
for (uint32 i = 0; i < 2; ++i)
builder.AppendState(ClockWorldState[i], uint32(time(NULL) + (m_Timer / 1000)));
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_H, GetData(BATTLEFIELD_WG_DATA_VEHICLE_H));
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_H, GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_H));
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_A, GetData(BATTLEFIELD_WG_DATA_VEHICLE_A));
builder.AppendState(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_A, GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A));
for (GameObjectBuilding::const_iterator itr = BuildingsInZone.begin(); itr != BuildingsInZone.end(); ++itr)
builder.AppendState((*itr)->m_WorldState, (*itr)->m_State);
for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr)
if (*itr)
builder.AppendState(WorkshopsData[(*itr)->workshopId].worldstate, (*itr)->state);
}
开发者ID:Ayik0,项目名称:DeathCore_5.4.8,代码行数:22,代码来源:BattlefieldWG.cpp
示例5: FillInitialWorldStates
void BattlegroundIC::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(BG_IC_ALLIANCE_RENFORT_SET, 1);
builder.AppendState(BG_IC_HORDE_RENFORT_SET, 1);
builder.AppendState(BG_IC_ALLIANCE_RENFORT, factionReinforcements[TEAM_ALLIANCE]);
builder.AppendState(BG_IC_HORDE_RENFORT, factionReinforcements[TEAM_HORDE]);
for (uint8 i = 0; i < MAX_FORTRESS_GATES_SPAWNS; ++i)
{
uint32 uws = GetWorldStateFromGateEntry(BG_IC_ObjSpawnlocs[i].entry, GateStatus[GetGateIDFromEntry(BG_IC_ObjSpawnlocs[i].entry)] == BG_IC_GATE_DESTROYED ? true : false);
builder.AppendState(uws, 1);
}
for (uint8 i = 0; i < MAX_NODE_TYPES; ++i)
builder.AppendState(nodePoint[i].worldStates[nodePoint[i].nodeState], 1);
}
开发者ID:ChaosPaladin,项目名称:SkyFire.548,代码行数:16,代码来源:BattlegroundIC.cpp
示例6: FillInitialWorldStates
void OPvPCapturePointTF::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(TFTowerWorldStates[m_TowerType].n, bool(m_TowerState & TF_TOWERSTATE_N));
builder.AppendState(TFTowerWorldStates[m_TowerType].h, bool(m_TowerState & TF_TOWERSTATE_H));
builder.AppendState(TFTowerWorldStates[m_TowerType].a, bool(m_TowerState & TF_TOWERSTATE_A));
}
开发者ID:Caydan,项目名称:WoWSCore548,代码行数:6,代码来源:OutdoorPvPTF.cpp
示例7: FillInitialWorldStates
void BattlegroundWS::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(BG_WS_FLAG_CAPTURES_ALLIANCE, GetTeamScore(TEAM_ALLIANCE));
builder.AppendState(BG_WS_FLAG_CAPTURES_HORDE, GetTeamScore(TEAM_HORDE));
if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_GROUND)
builder.AppendState(BG_WS_FLAG_UNK_ALLIANCE, -1);
else if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
builder.AppendState(BG_WS_FLAG_UNK_ALLIANCE, 1);
else
builder.AppendState(BG_WS_FLAG_UNK_ALLIANCE, 0);
if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_GROUND)
builder.AppendState(BG_WS_FLAG_UNK_HORDE, -1);
else if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
builder.AppendState(BG_WS_FLAG_UNK_HORDE, 1);
else
builder.AppendState(BG_WS_FLAG_UNK_HORDE, 0);
builder.AppendState(BG_WS_FLAG_CAPTURES_MAX, BG_WS_MAX_TEAM_SCORE);
if (GetStatus() == STATUS_IN_PROGRESS)
{
builder.AppendState(BG_WS_STATE_TIMER_ACTIVE, 1);
builder.AppendState(BG_WS_STATE_TIMER, 25-_minutesElapsed);
}
else
builder.AppendState(BG_WS_STATE_TIMER_ACTIVE, 0);
if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
builder.AppendState(BG_WS_FLAG_STATE_HORDE, 2);
else
builder.AppendState(BG_WS_FLAG_STATE_HORDE, 1);
if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
builder.AppendState(BG_WS_FLAG_STATE_ALLIANCE, 2);
else
builder.AppendState(BG_WS_FLAG_STATE_ALLIANCE, 1);
}
开发者ID:cooler-SAI,项目名称:PandaFire,代码行数:39,代码来源:BattlegroundWS.cpp
示例8: FillInitialWorldStates
void BattlegroundRV::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(BG_RV_WORLD_STATE_A, GetAlivePlayersCountByTeam(ALLIANCE));
builder.AppendState(BG_RV_WORLD_STATE_H, GetAlivePlayersCountByTeam(HORDE));
builder.AppendState(BG_RV_WORLD_STATE, 1);
}
开发者ID:cooler-SAI,项目名称:PandaFire,代码行数:6,代码来源:BattlegroundRV.cpp
示例9: FillInitialWorldStates
void BattlegroundEY::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(EY_HORDE_BASE, m_TeamPointsCount[TEAM_HORDE]);
builder.AppendState(EY_ALLIANCE_BASE, m_TeamPointsCount[TEAM_ALLIANCE]);
builder.AppendState(0xab6, 0x0);
builder.AppendState(0xab5, 0x0);
builder.AppendState(0xab4, 0x0);
builder.AppendState(0xab3, 0x0);
builder.AppendState(0xab2, 0x0);
builder.AppendState(0xab1, 0x0);
builder.AppendState(0xab0, 0x0);
builder.AppendState(0xaaf, 0x0);
builder.AppendState(DRAENEI_RUINS_HORDE_CONTROL, m_PointOwnedByTeam[DRAENEI_RUINS] == HORDE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL);
builder.AppendState(DRAENEI_RUINS_ALLIANCE_CONTROL, m_PointOwnedByTeam[DRAENEI_RUINS] == ALLIANCE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL);
builder.AppendState(DRAENEI_RUINS_UNCONTROL, m_PointState[DRAENEI_RUINS] != EY_POINT_UNDER_CONTROL);
builder.AppendState(MAGE_TOWER_ALLIANCE_CONTROL, m_PointOwnedByTeam[MAGE_TOWER] == ALLIANCE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL);
builder.AppendState(MAGE_TOWER_HORDE_CONTROL, m_PointOwnedByTeam[MAGE_TOWER] == HORDE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL);
builder.AppendState(MAGE_TOWER_UNCONTROL, m_PointState[MAGE_TOWER] != EY_POINT_UNDER_CONTROL);
builder.AppendState(FEL_REAVER_HORDE_CONTROL, m_PointOwnedByTeam[FEL_REAVER] == HORDE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL);
builder.AppendState(FEL_REAVER_ALLIANCE_CONTROL, m_PointOwnedByTeam[FEL_REAVER] == ALLIANCE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL);
builder.AppendState(FEL_REAVER_UNCONTROL, m_PointState[FEL_REAVER] != EY_POINT_UNDER_CONTROL);
builder.AppendState(BLOOD_ELF_HORDE_CONTROL, m_PointOwnedByTeam[BLOOD_ELF] == HORDE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL);
builder.AppendState(BLOOD_ELF_ALLIANCE_CONTROL, m_PointOwnedByTeam[BLOOD_ELF] == ALLIANCE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL);
builder.AppendState(BLOOD_ELF_UNCONTROL, m_PointState[BLOOD_ELF] != EY_POINT_UNDER_CONTROL);
builder.AppendState(NETHERSTORM_FLAG, m_FlagState == BG_EY_FLAG_STATE_ON_BASE);
builder.AppendState(0xad2, 0x1);
builder.AppendState(0xad1, 0x1);
builder.AppendState(0xabe, GetTeamScore(TEAM_HORDE));
builder.AppendState(0xabd, GetTeamScore(TEAM_ALLIANCE));
builder.AppendState(0xa05, 0x8e);
builder.AppendState(0xaa0, 0x0);
builder.AppendState(0xa9f, 0x0);
builder.AppendState(0xa9e, 0x0);
builder.AppendState(0xc0d, 0x17b);
}
开发者ID:ProjectSkyfire,项目名称:SkyFire.548,代码行数:49,代码来源:BattlegroundEY.cpp
示例10: FillInitialWorldStates
void BattlegroundDS::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(3610, 1); // 9 show
UpdateArenaWorldState();
}
开发者ID:AriDEV,项目名称:SkyFire.548,代码行数:5,代码来源:BattlegroundDS.cpp
示例11: FillInitialWorldStates
void BattlegroundNA::FillInitialWorldStates(WorldStateBuilder &builder)
{
builder.AppendState(0xa11, 1); // 9
UpdateArenaWorldState();
}
开发者ID:Chuck5ta,项目名称:SkyFire.548,代码行数:5,代码来源:BattlegroundNA.cpp
示例12: FillInitialWorldStates
void OutdoorPvPSI::FillInitialWorldStates(WorldStateBuilder& builder)
{
builder.AppendState(SI_GATHERED_A, m_Gathered_A);
builder.AppendState(SI_GATHERED_H, m_Gathered_H);
builder.AppendState(SI_SILITHYST_MAX, SI_MAX_RESOURCES);
}
开发者ID:Ayik0,项目名称:DeathCore_5.4.8,代码行数:6,代码来源:OutdoorPvPSI.cpp
示例13: FillInitialWorldStates
void BattlegroundSA::FillInitialWorldStates(WorldStateBuilder& builder)
{
uint32 ally_attacks = uint32(Attackers == TEAM_ALLIANCE ? 1 : 0);
uint32 horde_attacks = uint32(Attackers == TEAM_HORDE ? 1 : 0);
builder.AppendState(BG_SA_ANCIENT_GATEWS, GateStatus[BG_SA_ANCIENT_GATE]);
builder.AppendState(BG_SA_YELLOW_GATEWS, GateStatus[BG_SA_YELLOW_GATE]);
builder.AppendState(BG_SA_GREEN_GATEWS, GateStatus[BG_SA_GREEN_GATE]);
builder.AppendState(BG_SA_BLUE_GATEWS, GateStatus[BG_SA_BLUE_GATE]);
builder.AppendState(BG_SA_RED_GATEWS, GateStatus[BG_SA_RED_GATE]);
builder.AppendState(BG_SA_PURPLE_GATEWS, GateStatus[BG_SA_PURPLE_GATE]);
builder.AppendState(BG_SA_BONUS_TIMER, 0);
builder.AppendState(BG_SA_HORDE_ATTACKS, horde_attacks);
builder.AppendState(BG_SA_ALLY_ATTACKS, ally_attacks);
//Time will be sent on first update...
builder.AppendState(BG_SA_ENABLE_TIMER, TimerEnabled ? 1 : 0);
builder.AppendState(BG_SA_TIMER_MINS, 0);
builder.AppendState(BG_SA_TIMER_SEC_TENS, 0);
builder.AppendState(BG_SA_TIMER_SEC_DECS, 0);
builder.AppendState(BG_SA_RIGHT_GY_HORDE, GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE ? 1 : 0);
builder.AppendState(BG_SA_LEFT_GY_HORDE, GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE ? 1 : 0);
builder.AppendState(BG_SA_CENTER_GY_HORDE, GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE ? 1 : 0);
builder.AppendState(BG_SA_RIGHT_GY_ALLIANCE, GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE ? 1 : 0);
builder.AppendState(BG_SA_LEFT_GY_ALLIANCE, GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE ? 1 : 0);
builder.AppendState(BG_SA_CENTER_GY_ALLIANCE, GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE ? 1 : 0);
builder.AppendState(BG_SA_HORDE_DEFENCE_TOKEN, ally_attacks);
builder.AppendState(BG_SA_ALLIANCE_DEFENCE_TOKEN, horde_attacks);
builder.AppendState(BG_SA_LEFT_ATT_TOKEN_HRD, horde_attacks);
builder.AppendState(BG_SA_RIGHT_ATT_TOKEN_HRD, horde_attacks);
builder.AppendState(BG_SA_RIGHT_ATT_TOKEN_ALL, ally_attacks);
builder.AppendState(BG_SA_LEFT_ATT_TOKEN_ALL, ally_attacks);
}
开发者ID:cooler-SAI,项目名称:PandaFire,代码行数:39,代码来源:BattlegroundSA.cpp
示例14: FillInitialWorldStates
void OPvPCapturePointNA::FillInitialWorldStates(WorldStateBuilder& builder)
{
if (m_ControllingFaction == ALLIANCE)
{
builder.AppendState(NA_UI_HORDE_GUARDS_SHOW, 0);
builder.AppendState(NA_UI_ALLIANCE_GUARDS_SHOW, 1);
}
else if (m_ControllingFaction == HORDE)
{
builder.AppendState(NA_UI_HORDE_GUARDS_SHOW, 1);
builder.AppendState(NA_UI_ALLIANCE_GUARDS_SHOW, 0);
}
else
{
builder.AppendState(NA_UI_HORDE_GUARDS_SHOW, 0);
builder.AppendState(NA_UI_ALLIANCE_GUARDS_SHOW, 0);
}
builder.AppendState(NA_UI_GUARDS_MAX, NA_GUARDS_MAX);
builder.AppendState(NA_UI_GUARDS_LEFT, m_GuardsAlive);
builder.AppendState(NA_UI_TOWER_SLIDER_DISPLAY, 0);
builder.AppendState(NA_UI_TOWER_SLIDER_POS, 50);
builder.AppendState(NA_UI_TOWER_SLIDER_N, 100);
builder.AppendState(NA_MAP_WYVERN_NORTH_NEU_H, bool(m_WyvernStateNorth & WYVERN_NEU_HORDE));
builder.AppendState(NA_MAP_WYVERN_NORTH_NEU_A, bool(m_WyvernStateNorth & WYVERN_NEU_ALLIANCE));
builder.AppendState(NA_MAP_WYVERN_NORTH_H, bool(m_WyvernStateNorth & WYVERN_HORDE));
builder.AppendState(NA_MAP_WYVERN_NORTH_A, bool(m_WyvernStateNorth & WYVERN_ALLIANCE));
builder.AppendState(NA_MAP_WYVERN_SOUTH_NEU_H, bool(m_WyvernStateSouth & WYVERN_NEU_HORDE));
builder.AppendState(NA_MAP_WYVERN_SOUTH_NEU_A, bool(m_WyvernStateSouth & WYVERN_NEU_ALLIANCE));
builder.AppendState(NA_MAP_WYVERN_SOUTH_H, bool(m_WyvernStateSouth & WYVERN_HORDE));
builder.AppendState(NA_MAP_WYVERN_SOUTH_A, bool(m_WyvernStateSouth & WYVERN_ALLIANCE));
builder.AppendState(NA_MAP_WYVERN_WEST_NEU_H, bool(m_WyvernStateWest & WYVERN_NEU_HORDE));
builder.AppendState(NA_MAP_WYVERN_WEST_NEU_A, bool(m_WyvernStateWest & WYVERN_NEU_ALLIANCE));
builder.AppendState(NA_MAP_WYVERN_WEST_H, bool(m_WyvernStateWest & WYVERN_HORDE));
builder.AppendState(NA_MAP_WYVERN_WEST_A, bool(m_WyvernStateWest & WYVERN_ALLIANCE));
builder.AppendState(NA_MAP_WYVERN_EAST_NEU_H, bool(m_WyvernStateEast & WYVERN_NEU_HORDE));
builder.AppendState(NA_MAP_WYVERN_EAST_NEU_A, bool(m_WyvernStateEast & WYVERN_NEU_ALLIANCE));
builder.AppendState(NA_MAP_WYVERN_EAST_H, bool(m_WyvernStateEast & WYVERN_HORDE));
builder.AppendState(NA_MAP_WYVERN_EAST_A, bool(m_WyvernStateEast & WYVERN_ALLIANCE));
builder.AppendState(NA_MAP_HALAA_NEUTRAL, bool(m_HalaaState & HALAA_N));
builder.AppendState(NA_MAP_HALAA_NEU_A, bool(m_HalaaState & HALAA_N_A));
builder.AppendState(NA_MAP_HALAA_NEU_H, bool(m_HalaaState & HALAA_N_H));
builder.AppendState(NA_MAP_HALAA_HORDE, bool(m_HalaaState & HALAA_H));
builder.AppendState(NA_MAP_HALAA_ALLIANCE, bool(m_HalaaState & HALAA_A));
}
开发者ID:Ayik0,项目名称:DeathCore_5.4.8,代码行数:51,代码来源:OutdoorPvPNA.cpp
注:本文中的WorldStateBuilder类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论