diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 7b0b1b9b3..8f3321e11 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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); } diff --git a/src/game/World.cpp b/src/game/World.cpp index 551fcfe81..d4042de13 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -761,6 +761,8 @@ void World::LoadConfigSettings(bool reload) setConfig(CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL, "TimerBar.Fire.GMLevel", SEC_CONSOLE); setConfig(CONFIG_UINT32_TIMERBAR_FIRE_MAX, "TimerBar.Fire.Max", 1); + setConfig(CONFIG_BOOL_PET_UNSUMMON_AT_MOUNT, "PetUnsummonAtMount", true); + m_VisibleUnitGreyDistance = sConfig.GetFloatDefault("Visibility.Distance.Grey.Unit", 1); if(m_VisibleUnitGreyDistance > MAX_VISIBILITY_DISTANCE) { diff --git a/src/game/World.h b/src/game/World.h index 2eec12ce2..8e093edf7 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -319,6 +319,7 @@ enum eConfigBoolValues CONFIG_BOOL_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_BOOL_CLEAN_CHARACTER_DB, CONFIG_BOOL_VMAP_INDOOR_CHECK, + CONFIG_BOOL_PET_UNSUMMON_AT_MOUNT, CONFIG_BOOL_VALUE_COUNT }; diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 1ab5190ef..b9ee33f5a 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -688,6 +688,11 @@ LogColors = "" # Default: 0 - recheck offhand slot weapon only at zone update # 1 - recheck offhand slot weapon at talent reset also # +# PetUnsummonAtMount +# Persmanent pet will unsummoned at player mount +# 0 - unsummon only for flying mounts +# Default: 1 - unsummon for any mount +# # ClientCacheVersion # Client cache version for client cache data reset. Use any different from DB value and not recently used for triggering reset. # Default: 0 (use DB value from world DB db_version.cache_id field) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index fdea2ddc2..09cbd2220 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10513" + #define REVISION_NR "10514" #endif // __REVISION_NR_H__