diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 0dd9d4a96..36018e893 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -4497,12 +4497,13 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness) // remove death flag + set aura SetByteValue(UNIT_FIELD_BYTES_1, 3, 0x00); + + SetDeathState(ALIVE); + if(getRace() == RACE_NIGHTELF) RemoveAurasDueToSpell(20584); // speed bonuses RemoveAurasDueToSpell(8326); // SPELL_AURA_GHOST - SetDeathState(ALIVE); - SetMovement(MOVE_LAND_WALK); SetMovement(MOVE_UNROOT); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 5fc674bf3..3cb736794 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8267,6 +8267,12 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) if (((Creature*)this)->HasSearchedAssistance()) speed *= 0.66f; // best guessed value, so this will be 33% reduction. Based off initial speed, mob can then "run", "walk fast" or "walk". } + // for player case, we look for some custom rates + else + { + if (getDeathState() == CORPSE) + speed *= sWorld.getConfig(CONFIG_FLOAT_GHOST_RUN_SPEED); + } // Apply strongest slow aura mod to speed int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED); diff --git a/src/game/World.cpp b/src/game/World.cpp index 2aaee164b..865fb4d38 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -708,6 +708,7 @@ 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); setConfig(CONFIG_FLOAT_THREAT_RADIUS, "ThreatRadius", 100.0f); diff --git a/src/game/World.h b/src/game/World.h index 292e4847d..de7677bd9 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -269,6 +269,7 @@ enum eConfigFloatValues CONFIG_FLOAT_CREATURE_FAMILY_ASSISTANCE_RADIUS, CONFIG_FLOAT_GROUP_XP_DISTANCE, CONFIG_FLOAT_THREAT_RADIUS, + CONFIG_FLOAT_GHOST_RUN_SPEED, CONFIG_FLOAT_VALUE_COUNT }; diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index bfddb7bb3..80efe91ac 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1267,6 +1267,10 @@ Visibility.Distance.Grey.Object = 10 # Default: 1 (enabled) # 0 (disabled) # +# Death.Ghost.RunSpeed +# Modifies the speed of player's ghosts, removed upon reviving, not permanent/saved +# Default: 1.0 (normal speed) +# ################################################################################################################### Rate.Health = 1 @@ -1325,6 +1329,7 @@ Death.CorpseReclaimDelay.PvP = 1 Death.CorpseReclaimDelay.PvE = 1 Death.Bones.World = 1 Death.Bones.BattlegroundOrArena = 1 +Death.Ghost.RunSpeed = 1.0 ################################################################################################################### # BATTLEGROUND CONFIG diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b81763284..1fadbd75d 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 "10976" + #define REVISION_NR "10977" #endif // __REVISION_NR_H__