本文整理汇总了C++中PlayerObject::hasActiveQuestBitSet方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerObject::hasActiveQuestBitSet方法的具体用法?C++ PlayerObject::hasActiveQuestBitSet怎么用?C++ PlayerObject::hasActiveQuestBitSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerObject
的用法示例。
在下文中一共展示了PlayerObject::hasActiveQuestBitSet方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleObjectMenuSelect
int TicketCollectorImplementation::handleObjectMenuSelect(CreatureObject* player, byte selectedID) {
if (selectedID == 20) {
player->executeObjectControllerAction(0x5DCD41A2); //boardShuttle
} else if (selectedID == 193 && JediManager::instance()->getJediProgressionType() == JediManager::VILLAGEJEDIPROGRESSION) {
Zone* thisZone = getZone();
if (thisZone == NULL)
return 0;
ManagedReference<PlanetManager*> planetManager = thisZone->getPlanetManager();
if (planetManager == NULL)
return 0;
PlanetTravelPoint* ptp = planetManager->getNearestPlanetTravelPoint(_this.getReferenceUnsafeStaticCast(), 64.f);
if (ptp != NULL && ptp->isInterplanetary()) {
PlayerObject* ghost = player->getPlayerObject();
if (ghost != NULL && ghost->hasActiveQuestBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03) && !ghost->hasCompletedQuestsBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03)) {
Lua* lua = DirectorManager::instance()->getLuaInstance();
Reference<LuaFunction*> luaObtainData = lua->createFunction("FsCrafting4", "obtainSatelliteData", 0);
*luaObtainData << player;
*luaObtainData << _this.getReferenceUnsafeStaticCast();
luaObtainData->callFunction();
}
}
}
return 0;
}
示例2: fillObjectMenuResponse
void TicketCollectorImplementation::fillObjectMenuResponse(ObjectMenuResponse* menuResponse, CreatureObject* player) {
if (JediManager::instance()->getJediProgressionType() == JediManager::VILLAGEJEDIPROGRESSION) {
Zone* thisZone = getZone();
if (thisZone == NULL)
return;
ManagedReference<PlanetManager*> pMan = thisZone->getPlanetManager();
if (pMan == NULL)
return;
PlanetTravelPoint* ptp = pMan->getNearestPlanetTravelPoint(_this.getReferenceUnsafeStaticCast(), 64.f);
if (ptp != NULL && ptp->isInterplanetary()) {
PlayerObject* ghost = player->getPlayerObject();
if (ghost != NULL && ghost->hasActiveQuestBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03) && !ghost->hasCompletedQuestsBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03))
menuResponse->addRadialMenuItem(193, 3, "@quest/force_sensitive/fs_crafting:tracking_data_menu_obtain_data"); // Obtain Satellite Data
}
}
}
示例3: notifyEnter
void FsVillageAreaImplementation::notifyEnter(SceneObject* player) {
ActiveAreaImplementation::notifyEnter(player);
if (!player->isPlayerCreature()) {
return;
}
float x = player->getPositionX();
float y = player->getPositionY();
float diffY = y - getPositionY();
float diffX = x - getPositionX();
float angle = atan2(diffY == 0.f ? 1 : diffY, diffX == 0.f ? 1 : diffX);
CreatureObject* playerCreature = cast<CreatureObject*>(player);
PlayerObject* ghost = playerCreature->getPlayerObject();
float rad = getRadius() * 1.05;
float newPosX = getPositionX() + (cos(angle) * rad);
float newPosY = getPositionY() + (sin(angle) * rad);
// Those who aren't a valid player, do not currently have or have had the Village elder quest cannot enter.
if (ghost != NULL) {
if (ghost->hasGodMode())
return;
if (!ghost->hasActiveQuestBitSet(PlayerQuestData::FS_VILLAGE_ELDER) && !ghost->hasCompletedQuestsBitSet(PlayerQuestData::FS_VILLAGE_ELDER)) {
playerCreature->teleport(newPosX, getZone()->getHeight(newPosX, newPosY), newPosY, 0);
playerCreature->sendSystemMessage("@base_player:fs_village_unavailable");
} else if (playerCreature->isInCombat()) {
playerCreature->teleport(newPosX, getZone()->getHeight(newPosX, newPosY), newPosY, 0);
playerCreature->sendSystemMessage("@base_player:fs_village_no_combat");
}
}
}