mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10977] Add ghost speed rate in config: Death.Ghost.RunSpeed.
Also clarify context for remove ghost auras place after set alive state. This let get more expected results at remove ghost speed aura. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
7aab4eecdf
commit
af50b352b2
6 changed files with 17 additions and 3 deletions
|
|
@ -4497,12 +4497,13 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||||
|
|
||||||
// remove death flag + set aura
|
// remove death flag + set aura
|
||||||
SetByteValue(UNIT_FIELD_BYTES_1, 3, 0x00);
|
SetByteValue(UNIT_FIELD_BYTES_1, 3, 0x00);
|
||||||
|
|
||||||
|
SetDeathState(ALIVE);
|
||||||
|
|
||||||
if(getRace() == RACE_NIGHTELF)
|
if(getRace() == RACE_NIGHTELF)
|
||||||
RemoveAurasDueToSpell(20584); // speed bonuses
|
RemoveAurasDueToSpell(20584); // speed bonuses
|
||||||
RemoveAurasDueToSpell(8326); // SPELL_AURA_GHOST
|
RemoveAurasDueToSpell(8326); // SPELL_AURA_GHOST
|
||||||
|
|
||||||
SetDeathState(ALIVE);
|
|
||||||
|
|
||||||
SetMovement(MOVE_LAND_WALK);
|
SetMovement(MOVE_LAND_WALK);
|
||||||
SetMovement(MOVE_UNROOT);
|
SetMovement(MOVE_UNROOT);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8267,6 +8267,12 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio)
|
||||||
if (((Creature*)this)->HasSearchedAssistance())
|
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".
|
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
|
// Apply strongest slow aura mod to speed
|
||||||
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
|
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
|
||||||
|
|
|
||||||
|
|
@ -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_CORPSE_RECLAIM_DELAY_PVE, "Death.CorpseReclaimDelay.PvE", true);
|
||||||
setConfig(CONFIG_BOOL_DEATH_BONES_WORLD, "Death.Bones.World", true);
|
setConfig(CONFIG_BOOL_DEATH_BONES_WORLD, "Death.Bones.World", true);
|
||||||
setConfig(CONFIG_BOOL_DEATH_BONES_BG_OR_ARENA, "Death.Bones.BattlegroundOrArena", 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);
|
setConfig(CONFIG_FLOAT_THREAT_RADIUS, "ThreatRadius", 100.0f);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,7 @@ enum eConfigFloatValues
|
||||||
CONFIG_FLOAT_CREATURE_FAMILY_ASSISTANCE_RADIUS,
|
CONFIG_FLOAT_CREATURE_FAMILY_ASSISTANCE_RADIUS,
|
||||||
CONFIG_FLOAT_GROUP_XP_DISTANCE,
|
CONFIG_FLOAT_GROUP_XP_DISTANCE,
|
||||||
CONFIG_FLOAT_THREAT_RADIUS,
|
CONFIG_FLOAT_THREAT_RADIUS,
|
||||||
|
CONFIG_FLOAT_GHOST_RUN_SPEED,
|
||||||
CONFIG_FLOAT_VALUE_COUNT
|
CONFIG_FLOAT_VALUE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1267,6 +1267,10 @@ Visibility.Distance.Grey.Object = 10
|
||||||
# Default: 1 (enabled)
|
# Default: 1 (enabled)
|
||||||
# 0 (disabled)
|
# 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
|
Rate.Health = 1
|
||||||
|
|
@ -1325,6 +1329,7 @@ Death.CorpseReclaimDelay.PvP = 1
|
||||||
Death.CorpseReclaimDelay.PvE = 1
|
Death.CorpseReclaimDelay.PvE = 1
|
||||||
Death.Bones.World = 1
|
Death.Bones.World = 1
|
||||||
Death.Bones.BattlegroundOrArena = 1
|
Death.Bones.BattlegroundOrArena = 1
|
||||||
|
Death.Ghost.RunSpeed = 1.0
|
||||||
|
|
||||||
###################################################################################################################
|
###################################################################################################################
|
||||||
# BATTLEGROUND CONFIG
|
# BATTLEGROUND CONFIG
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10976"
|
#define REVISION_NR "10977"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue