[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) // Normal case (Unsummon only permanent pet)
else if (Pet* pet = GetPet()) 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(); ((Player*)this)->UnsummonPetTemporaryIfAny();
}
else else
pet->ApplyModeFlags(PET_MODE_DISABLE_ACTIONS,true); pet->ApplyModeFlags(PET_MODE_DISABLE_ACTIONS,true);
} }

View file

@ -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_GMLEVEL, "TimerBar.Fire.GMLevel", SEC_CONSOLE);
setConfig(CONFIG_UINT32_TIMERBAR_FIRE_MAX, "TimerBar.Fire.Max", 1); 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); m_VisibleUnitGreyDistance = sConfig.GetFloatDefault("Visibility.Distance.Grey.Unit", 1);
if(m_VisibleUnitGreyDistance > MAX_VISIBILITY_DISTANCE) if(m_VisibleUnitGreyDistance > MAX_VISIBILITY_DISTANCE)
{ {

View file

@ -319,6 +319,7 @@ enum eConfigBoolValues
CONFIG_BOOL_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_BOOL_STATS_SAVE_ONLY_ON_LOGOUT,
CONFIG_BOOL_CLEAN_CHARACTER_DB, CONFIG_BOOL_CLEAN_CHARACTER_DB,
CONFIG_BOOL_VMAP_INDOOR_CHECK, CONFIG_BOOL_VMAP_INDOOR_CHECK,
CONFIG_BOOL_PET_UNSUMMON_AT_MOUNT,
CONFIG_BOOL_VALUE_COUNT CONFIG_BOOL_VALUE_COUNT
}; };

View file

@ -688,6 +688,11 @@ LogColors = ""
# Default: 0 - recheck offhand slot weapon only at zone update # Default: 0 - recheck offhand slot weapon only at zone update
# 1 - recheck offhand slot weapon at talent reset also # 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 # ClientCacheVersion
# Client cache version for client cache data reset. Use any different from DB value and not recently used for triggering reset. # 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) # Default: 0 (use DB value from world DB db_version.cache_id field)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10513" #define REVISION_NR "10514"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__