From 8396f19e85bc112914405e7bc37d32013f329782 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 20 Jul 2016 16:26:58 -0400 Subject: [PATCH] Add buff level restrictions for pets --- zone/pets.cpp | 7 +++++++ zone/pets.h | 1 + 2 files changed, 8 insertions(+) diff --git a/zone/pets.cpp b/zone/pets.cpp index 23680cd88..28d6bdf91 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -738,3 +738,10 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) { return true; } +bool Pet::CheckSpellLevelRestriction(uint16 spell_id) +{ + auto owner = GetOwner(); + if (owner) + return owner->CheckSpellLevelRestriction(spell_id); + return true; +} diff --git a/zone/pets.h b/zone/pets.h index 32ca00eac..8d14d8a48 100644 --- a/zone/pets.h +++ b/zone/pets.h @@ -40,6 +40,7 @@ class Pet : public NPC { public: Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 power); virtual void SetTarget(Mob *mob); + virtual bool CheckSpellLevelRestriction(uint16 spell_id); };