void PetControlDeviceImplementation::trainAsMount(CreatureObject* player) { if (isTrainedAsMount()) return; PetManager* petManager = player->getZoneServer()->getPetManager(); if (petManager == NULL) return; if (petManager->checkMountEligibility(_this.get()) != PetManager::CANBEMOUNTTRAINED) return; ManagedReference<TangibleObject*> controlledObject = this->controlledObject.get(); if (controlledObject == NULL || !controlledObject->isAiAgent()) return; AiAgent* pet = cast<AiAgent*>(controlledObject.get()); if( pet == NULL ) return; trainedAsMount = true; pet->setOptionsBitmask(0x1080); }
void PetControlDeviceImplementation::trainAsMount(CreatureObject* player) { if (isTrainedAsMount() || !player->hasSkill("outdoors_creaturehandler_support_04")) return; PetManager* petManager = player->getZoneServer()->getPetManager(); if (petManager == NULL) return; if (petManager->checkMountEligibility(_this.getReferenceUnsafeStaticCast()) != PetManager::CANBEMOUNTTRAINED) return; ManagedReference<TangibleObject*> controlledObject = this->controlledObject.get(); if (controlledObject == NULL || !controlledObject->isAiAgent()) return; AiAgent* pet = cast<AiAgent*>(controlledObject.get()); if( pet == NULL ) return; assert(pet->isLockedByCurrentThread()); trainedAsMount = true; pet->setOptionsBitmask(0x1080); }