mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10514] New option PetUnsummonAtMount
Make possible disable pet unsummon for non-fly mounts (1.x way work)
This commit is contained in:
parent
b0edd807d7
commit
e3d7b114c6
5 changed files with 13 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue