本文整理汇总了C++中ManagedReference::canUseTerminals方法的典型用法代码示例。如果您正苦于以下问题:C++ ManagedReference::canUseTerminals方法的具体用法?C++ ManagedReference::canUseTerminals怎么用?C++ ManagedReference::canUseTerminals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ManagedReference
的用法示例。
在下文中一共展示了ManagedReference::canUseTerminals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleObjectMenuSelect
int TurretControlMenuComponent::handleObjectMenuSelect(SceneObject* sceneObject, CreatureObject* player, byte selectedID) {
if (sceneObject == NULL || !sceneObject->isTangibleObject() || player == NULL)
return 0;
ManagedReference<PlayerObject*> ghost = player->getPlayerObject();
if (ghost == NULL)
return 1;
ManagedReference<BuildingObject*> building = cast<BuildingObject*>(sceneObject->getParentRecursively(SceneObjectType::FACTIONBUILDING).get().get());
if(building == NULL)
return 1;
Zone* zone = building->getZone();
if(zone == NULL)
return 1;
ManagedReference<GCWManager*> gcwMan = zone->getGCWManager();
if(gcwMan == NULL)
return 1;
if(!gcwMan->canUseTerminals(player, building, sceneObject))
return 1;
if(selectedID == 222){
gcwMan->sendTurretAttackListTo(player,sceneObject);
}
return 0;
}
示例2: handleObjectMenuSelect
int HQMenuComponent::handleObjectMenuSelect(SceneObject* sceneObject, CreatureObject* creature, byte selectedID) {
if (creature->isDead() || creature->isIncapacitated())
return 1;
ManagedReference<BuildingObject*> building = cast<BuildingObject*>(sceneObject->getParentRecursively(SceneObjectType::FACTIONBUILDING).get().get());
if(building == NULL)
return 1;
Zone* zone = building->getZone();
if(zone == NULL)
return 1;
ManagedReference<GCWManager*> gcwMan = zone->getGCWManager();
if(gcwMan == NULL)
return 1;
if(!gcwMan->canUseTerminals(creature, building, sceneObject))
return 1;
if(creature->getFaction() == building->getFaction()) {
if (selectedID == 20){
gcwMan->sendStatus(building,creature);
} else if( selectedID == 228 || selectedID == 20){
gcwMan->sendBaseDefenseStatus(creature, building);
} else if ( selectedID == 38) {
gcwMan->sendResetVerification(creature, building);
} else if(selectedID == 231) {
ShutdownSequenceTask* task = new ShutdownSequenceTask(gcwMan, building, creature, false);
task->execute();
} else if (selectedID == 226)
gcwMan->sendSelectDeedToDonate(building,creature,0);
} else {
if ( selectedID == 230 ) {
if(creature->hasSkill("outdoors_squadleader_novice")) {
ShutdownSequenceTask* task = new ShutdownSequenceTask(gcwMan, building, creature, true);
task->execute();
} else
creature->sendSystemMessage(("@faction/faction_hq/faction_hq_response:terminal_response03")); // only an experienced squad leader could expect to coordinate a reactor overload
} else if ( selectedID == 20) {
if(creature->getFactionRank() >= 9) {
gcwMan->sendStatus(building,creature);
} else {
creature->sendSystemMessage("You must be at least a Warrant Officer in order to use this terminal");
}
}
}
return 0;
}
示例3: handleObjectMenuSelect
int UplinkTerminalMenuComponent::handleObjectMenuSelect(SceneObject* sceneObject, CreatureObject* player, byte selectedID) {
if (sceneObject == NULL || !sceneObject->isTangibleObject() || player == NULL || player->isDead() || player->isIncapacitated())
return 0;
ManagedReference<BuildingObject*> building = cast<BuildingObject*>(sceneObject->getParentRecursively(SceneObjectType::FACTIONBUILDING).get().get());
ManagedReference<TangibleObject*> uplinkTerminal = cast<TangibleObject*>(sceneObject);
if (building == NULL)
return 1;
Zone* zone = sceneObject->getZone();
if (zone == NULL)
return 1;
ManagedReference<GCWManager*> gcwMan = zone->getGCWManager();
if (gcwMan == NULL)
return 1;
if (!gcwMan->canUseTerminals(player, building, sceneObject))
return 1;
if (selectedID == 227 || selectedID == 20) {
if (player->getFaction() != building->getFaction()) {
if (player->hasSkill("combat_bountyhunter_investigation_02"))
gcwMan->sendJamUplinkMenu(player, building, uplinkTerminal);
else
player->sendSystemMessage("Only an experienced Bounty Hunter with Investigation experience could expect to jam the uplink");
}
}
return 0;
}