Instructions Jenkins Doxygen

[Added] system message when telling a pet to attack a non-player target 33/1633/1
authorIvojedi <ivojedi@swgemu.com>
Fri, 2 May 2014 18:50:12 +0000 (11:50 -0700)
committerIvojedi <ivojedi@swgemu.com>
Fri, 2 May 2014 18:54:46 +0000 (11:54 -0700)
[Reduced] the chance for babies to spawn

Change-Id: I768cabb8132cccf3614d4d0138f8e4516674e5fd

MMOCoreORB/src/server/zone/managers/creature/LairObserverImplementation.cpp
MMOCoreORB/src/server/zone/managers/mission/DestroyMissionLairObserverImplementation.cpp
MMOCoreORB/src/server/zone/objects/creature/commands/pet/PetAttackCommand.h

index f0f4c2d..4e220af 100644 (file)
@@ -331,11 +331,11 @@ bool LairObserverImplementation::checkForNewSpawns(TangibleObject* lair, Tangibl
 
                        if (tamingChance > 0) {
                                if (babiesSpawned == 0) {
-                                       if (System::random(250) < (tamingChance * 100.0f)) {
+                                       if (System::random(500) < (tamingChance * 100.0f)) {
                                                creo = creatureManager->spawnCreatureAsBaby(templateToSpawn.hashCode(), x, z, y);
                                                babiesSpawned++;
                                        }
-                               } else if (System::random(250 * babiesSpawned) < (tamingChance * 100.0f)) {
+                               } else if (System::random(500 * babiesSpawned) < (tamingChance * 100.0f)) {
                                        creo = creatureManager->spawnCreatureAsBaby(templateToSpawn.hashCode(), x, z, y);
                                        babiesSpawned++;
                                }
index d44c545..1a5f51e 100644 (file)
@@ -130,11 +130,11 @@ bool DestroyMissionLairObserverImplementation::checkForNewSpawns(TangibleObject*
 
                        if (tamingChance > 0) {
                                if (babiesSpawned == 0) {
-                                       if (System::random(500) < (tamingChance * 100.0f)) {
+                                       if (System::random(1000) < (tamingChance * 100.0f)) {
                                                creo = creatureManager->spawnCreatureAsBaby(templateToSpawn.hashCode(), x, z, y);
                                                babiesSpawned++;
                                        }
-                               } else if (System::random(500 * babiesSpawned) < (tamingChance * 100.0f)) {
+                               } else if (System::random(1000 * babiesSpawned) < (tamingChance * 100.0f)) {
                                        creo = creatureManager->spawnCreatureAsBaby(templateToSpawn.hashCode(), x, z, y);
                                        babiesSpawned++;
                                }
index 981120e..c996cb6 100644 (file)
@@ -43,6 +43,9 @@ public:
                Reference<SceneObject*> targetObject = server->getZoneServer()->getObject(target, true).castTo<SceneObject*>();
                if (targetObject == NULL || !targetObject->isPlayerCreature() ) {
                        pet->showFlyText("npc_reaction/flytext","confused", 204, 0, 0);  // "?!!?!?!"
+                       ManagedReference<CreatureObject*> player = pet->getLinkedCreature().get();
+                       if (player != NULL)
+                               player->sendSystemMessage("Pets may only attack players right now.");
                        return GENERALERROR;
                }