Instructions Jenkins Doxygen

[Fixed] admin initiated pet storing 29/1629/1
authorIvojedi <ivojedi@swgemu.com>
Thu, 1 May 2014 00:52:04 +0000 (17:52 -0700)
committerIvojedi <ivojedi@swgemu.com>
Thu, 1 May 2014 00:52:04 +0000 (17:52 -0700)
Change-Id: I7454ac3fe42f117847ce7c6a2f6f7b9d9d54c889

MMOCoreORB/src/server/zone/objects/creature/components/PetMenuComponent.cpp

index 31a2dad..26f770c 100644 (file)
@@ -199,9 +199,13 @@ int PetMenuComponent::handleObjectMenuSelect(SceneObject* sceneObject, CreatureO
        if (!player->getPlayerObject()->isPrivileged() && pet->getLinkedCreature() != player)
                return 0;
 
+       if (pet->getLinkedCreature() != player) {
+               player = pet->getLinkedCreature().get();
+       }
+
        ManagedReference<PetControlDevice*> petControlDevice = pet->getControlDevice().get().castTo<PetControlDevice*>();
 
-       if (petControlDevice == NULL)
+       if (petControlDevice == NULL || player == NULL)
                return 0;
 
        PetManager* petManager = pet->getZoneServer()->getPetManager();