[10514] New option PetUnsummonAtMount

Make possible disable pet unsummon for non-fly mounts (1.x way work)
This commit is contained in:
VladimirMangos 2010-09-22 07:37:50 +04:00
parent b0edd807d7
commit e3d7b114c6
5 changed files with 13 additions and 2 deletions

View file

@ -7492,8 +7492,11 @@ void Unit::Mount(uint32 mount, uint32 spellId)
// Normal case (Unsummon only permanent pet)
else if (Pet* pet = GetPet())
{
if (pet->IsPermanentPetFor((Player*)this) && !((Player*)this)->InArena())
if (pet->IsPermanentPetFor((Player*)this) && !((Player*)this)->InArena() &&
sWorld.getConfig(CONFIG_BOOL_PET_UNSUMMON_AT_MOUNT))
{
((Player*)this)->UnsummonPetTemporaryIfAny();
}
else
pet->ApplyModeFlags(PET_MODE_DISABLE_ACTIONS,true);
}