From 46fdc3af97e4c46abf029f652b76e94cc6a96fc6 Mon Sep 17 00:00:00 2001 From: Pat S Date: Fri, 7 Jan 2011 07:33:20 +0300 Subject: [PATCH] [10979] Add extra ghost speed rate for BGs: Death.Ghost.RunSpeed.Battleground Also recently added option renamed to Death.Ghost.RunSpeed.World Signed-off-by: VladimirMangos --- src/game/Unit.cpp | 2 +- src/game/World.cpp | 3 ++- src/game/World.h | 3 ++- src/mangosd/mangosd.conf.dist.in | 7 ++++++- src/shared/revision_nr.h | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3cb736794..47220694a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8271,7 +8271,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) else { if (getDeathState() == CORPSE) - speed *= sWorld.getConfig(CONFIG_FLOAT_GHOST_RUN_SPEED); + speed *= sWorld.getConfig(((Player*)this)->InBattleGround() ? CONFIG_FLOAT_GHOST_RUN_SPEED_BG : CONFIG_FLOAT_GHOST_RUN_SPEED_WORLD); } // Apply strongest slow aura mod to speed diff --git a/src/game/World.cpp b/src/game/World.cpp index 865fb4d38..9dc1beafa 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -708,7 +708,8 @@ void World::LoadConfigSettings(bool reload) setConfig(CONFIG_BOOL_DEATH_CORPSE_RECLAIM_DELAY_PVE, "Death.CorpseReclaimDelay.PvE", true); setConfig(CONFIG_BOOL_DEATH_BONES_WORLD, "Death.Bones.World", true); setConfig(CONFIG_BOOL_DEATH_BONES_BG_OR_ARENA, "Death.Bones.BattlegroundOrArena", true); - setConfigMinMax(CONFIG_FLOAT_GHOST_RUN_SPEED, "Death.Ghost.RunSpeed", 1.0f, 0.1f, 10.0f); + setConfigMinMax(CONFIG_FLOAT_GHOST_RUN_SPEED_WORLD, "Death.Ghost.RunSpeed.World", 1.0f, 0.1f, 10.0f); + setConfigMinMax(CONFIG_FLOAT_GHOST_RUN_SPEED_BG, "Death.Ghost.RunSpeed.Battleground", 1.0f, 0.1f, 10.0f); setConfig(CONFIG_FLOAT_THREAT_RADIUS, "ThreatRadius", 100.0f); diff --git a/src/game/World.h b/src/game/World.h index de7677bd9..828958a77 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -269,7 +269,8 @@ enum eConfigFloatValues CONFIG_FLOAT_CREATURE_FAMILY_ASSISTANCE_RADIUS, CONFIG_FLOAT_GROUP_XP_DISTANCE, CONFIG_FLOAT_THREAT_RADIUS, - CONFIG_FLOAT_GHOST_RUN_SPEED, + CONFIG_FLOAT_GHOST_RUN_SPEED_WORLD, + CONFIG_FLOAT_GHOST_RUN_SPEED_BG, CONFIG_FLOAT_VALUE_COUNT }; diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 80efe91ac..94ea71f7b 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1268,7 +1268,11 @@ Visibility.Distance.Grey.Object = 10 # 0 (disabled) # # Death.Ghost.RunSpeed -# Modifies the speed of player's ghosts, removed upon reviving, not permanent/saved +# Modifies the speed of player's ghosts, removed upon reviving, not permanent/saved, NOT in BGs/arenas +# Default: 1.0 (normal speed) +# +# Death.Ghost.RunSpeed.InBGOrArena +# Modifies the speed of player's ghosts, removed upon reviving, not permanent/saved, ONLY in BGs/arenas # Default: 1.0 (normal speed) # ################################################################################################################### @@ -1330,6 +1334,7 @@ Death.CorpseReclaimDelay.PvE = 1 Death.Bones.World = 1 Death.Bones.BattlegroundOrArena = 1 Death.Ghost.RunSpeed = 1.0 +Death.Ghost.RunSpeed.InBGOrArena = 1.0 ################################################################################################################### # BATTLEGROUND CONFIG diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b57bfdaa3..74e564b4e 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 "10978" + #define REVISION_NR "10979" #endif // __REVISION_NR_H__