void JediManager::checkForceStatusCommand(CreatureObject* creature) { Lua* lua = DirectorManager::instance()->getLuaInstance(); Reference<LuaFunction*> luaCheckForceStatusCommand = lua->createFunction(getJediManagerName(), "checkForceStatusCommand", 0); *luaCheckForceStatusCommand << creature; luaCheckForceStatusCommand->callFunction(); }
void JediManager::onPlayerLoggedOut(CreatureObject* creature) { Lua* lua = DirectorManager::instance()->getLuaInstance(); Reference<LuaFunction*> luaOnPlayerLoggedOut = lua->createFunction(getJediManagerName(), "onPlayerLoggedOut", 0); *luaOnPlayerLoggedOut << creature; luaOnPlayerLoggedOut->callFunction(); }
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; }
void JediManager::onFSTreeCompleted(CreatureObject* creature, String branch) { Lua* lua = DirectorManager::instance()->getLuaInstance(); Reference<LuaFunction*> luaStartTask = lua->createFunction(getJediManagerName(), "onFSTreeCompleted", 0); *luaStartTask << creature; *luaStartTask << branch; luaStartTask->callFunction(); }
void JediManager::useItem(SceneObject* item, const int itemType, CreatureObject* creature) { Lua* lua = DirectorManager::instance()->getLuaInstance(); Reference<LuaFunction*> luaUseItem = lua->createFunction(getJediManagerName(), "useItem", 0); *luaUseItem << item; *luaUseItem << itemType; *luaUseItem << creature; luaUseItem->callFunction(); }