本文整理汇总了C++中Battlefield::GetData方法的典型用法代码示例。如果您正苦于以下问题:C++ Battlefield::GetData方法的具体用法?C++ Battlefield::GetData怎么用?C++ Battlefield::GetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Battlefield
的用法示例。
在下文中一共展示了Battlefield::GetData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CanBuild
bool npc_wg_demolisher_engineer::CanBuild(Creature* pCreature)
{
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return false;
switch (pCreature->GetEntry())
{
case BATTLEFIELD_WG_NPC_GOBLIN_MECHANIC_ENGINEER:
return (wintergrasp->GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_H) > wintergrasp->GetData(BATTLEFIELD_WG_DATA_VEHICLE_H));
case BATTLEFIELD_WG_NPC_GNOMISH_MECHANIC_ENGINEER:
return (wintergrasp->GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A) > wintergrasp->GetData(BATTLEFIELD_WG_DATA_VEHICLE_A));
default:
return false;
}
}
示例2: CanBuild
bool CanBuild(Creature* creature)
{
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return false;
switch (creature->GetEntry())
{
case NPC_GOBLIN_MECHANIC:
return (wintergrasp->GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_H) > wintergrasp->GetData(BATTLEFIELD_WG_DATA_VEHICLE_H));
case NPC_GNOMISH_ENGINEER:
return (wintergrasp->GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A) > wintergrasp->GetData(BATTLEFIELD_WG_DATA_VEHICLE_A));
default:
return false;
}
}