Add buff level restrictions for pets

This commit is contained in:
Michael Cook (mackal) 2016-07-20 16:26:58 -04:00
parent aadc4b5e6b
commit 8396f19e85
2 changed files with 8 additions and 0 deletions

View File

@ -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;
}

View File

@ -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);
};