aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGustavo <sirikfoll@hotmail.com>2017-02-24 08:20:20 -0300
committerShauren <shauren.trinity@gmail.com>2017-02-24 12:20:20 +0100
commit4224259d83c336ef46fa627a8ba0015200a788eb (patch)
tree9abd9691fca857b8d2e7144ace9222d3f4b4c10f /src
parentd93901837101b369e298155133b5add43f50545b (diff)
Core/Unit: Correct speed calculus when affected by SPELL_AURA_MOD_MINIMUM_SPEED (#18136)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp6
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 204beb26386..9bcf71db757 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -9268,7 +9268,11 @@ void Unit::UpdateSpeed(UnitMoveType mtype)
if (float minSpeedMod = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
{
- float min_speed = minSpeedMod / 100.0f;
+ float baseMinSpeed = 1.0f;
+ if (!GetOwnerGUID().IsPlayer() && !IsHunterPet() && GetTypeId() == TYPEID_UNIT)
+ baseMinSpeed = ToCreature()->GetCreatureTemplate()->speed_run;
+
+ float min_speed = CalculatePct(baseMinSpeed, minSpeedMod);
if (speed < min_speed)
speed = min_speed;
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index d769da04642..eb59c532b77 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -1452,7 +1452,6 @@ class npc_valkyr_shadowguard : public CreatureScript
_events.Reset();
me->SetReactState(REACT_PASSIVE);
DoCast(me, SPELL_WINGS_OF_THE_DAMNED, false);
- me->SetSpeedRate(MOVE_FLIGHT, 0.642857f);
}
void IsSummonedBy(Unit* /*summoner*/) override