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