Jump to content

[Bug] Exotic pets are being tamed without Beast Mastery talent


Sephiroth1983

Recommended Posts

Mangos Version: 7309 (all)

SD2 Version: 888

Database : UDB 0.11.0 (368)

What's wrong: Exotic pets are being tamed without having the talent Beast Mastery (53270)

How it should work: Exotic pets like Core Hound (pet family 45) should only be tameable by hunters who have latest talent in beast mastery tree which has the following effect:

Effect #1  Apply Aura: Persuaded (1)
Value: 1

Link to comment
Share on other sites

  • 4 weeks later...

Try these patches (both).

First one disallow to tame exotic pets without talent.

Second one disallow to summon exotic pets without talent.

From c4d30f295aeb9e296403fa6000b7333ce12d2d46 Mon Sep 17 00:00:00 2001
From: Sergey P. Kondratyev <[email protected]>
Date: Sat, 14 Mar 2009 21:42:57 +0600
Subject: [PATCH 1/2] Support for Beast Mastery talent

---
src/game/Creature.h |   13 +++++++++++++
src/game/Spell.cpp  |    5 +++++
2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/game/Creature.h b/src/game/Creature.h
index 90a83df..7c2024c 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -221,6 +221,19 @@ struct CreatureInfo
    {
        return type == CREATURE_TYPE_BEAST && family != 0 && (type_flags & CREATURE_TYPEFLAGS_TAMEABLE);
    }
+
+    bool isExotic() const
+    {
+        if (family == CREATURE_FAMILY_DEVILSAUR ||
+            family == CREATURE_FAMILY_CORE_HOUND ||
+            family == CREATURE_FAMILY_CHIMAERA ||
+            family == CREATURE_FAMILY_RHINO ||
+            family == CREATURE_FAMILY_SPIRIT_BEAST ||
+            family == CREATURE_FAMILY_SILITHID ||
+            family == CREATURE_FAMILY_WORM)
+                return true;
+        return false;
+    }
};

struct CreatureLocale
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 4ca8b1f..f6399e9 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4037,6 +4037,11 @@ uint8 Spell::CanCast(bool strict)
                if (!((Creature*)m_targets.getUnitTarget())->GetCreatureInfo()->isTameable ())
                    return SPELL_FAILED_BAD_TARGETS;

+                // we must have SPELL_AURA_ALLOW_TAME_PET_TYPE aura in order to tame exotic pets
+                if (((Creature*)m_targets.getUnitTarget())->GetCreatureInfo()->isExotic () 
+                        && !m_caster->HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE) )
+                    return SPELL_FAILED_BAD_TARGETS;
+
                if(m_caster->GetPetGUID())
                    return SPELL_FAILED_ALREADY_HAVE_SUMMON;

-- 
1.6.2

From 4749b6b659fee9fde467e68c3de82265f43f148c Mon Sep 17 00:00:00 2001
From: Sergey P. Kondratyev <[email protected]>
Date: Sun, 15 Mar 2009 16:27:06 +0600
Subject: [PATCH 2/2] Do not allow to Summon exotic pets without Beast Mastery talent

---
src/game/Pet.cpp |    5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index d650583..b78cec6 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -165,6 +165,11 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
        return true;
    }

+    if (cinfo->isExotic () && !owner->HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE) ) {
+        delete result;
+        return false;
+    }
+
    if(getPetType() == HUNTER_PET || (getPetType() == SUMMON_PET && cinfo->type == CREATURE_TYPE_DEMON && owner->getClass() == CLASS_WARLOCK))
        m_charmInfo->SetPetNumber(pet_number, true);
    else
-- 
1.6.2

Link to comment
Share on other sites

There has to be done some more things. E.g. when hunter resets talents and is currently using an exotic pet (or is in stable slot). Don't know what happens on offi servers in this case...

When you reset your talents with the pet active, the pet cannot be summoned, and all you can do is stable it.

You cannot take the pet out of the stables on offi without the talent.

It's kind of annoying on offi, because if you stable an exotic pet, and then change spec, you have to respec back to BM just to get rid of the pet.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 9 months later...
  • 2 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use