mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9165] Implement speed reduction at creatures DoFleeToGetAssistance
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
1e8e8f5fd2
commit
23a77a1d36
4 changed files with 23 additions and 6 deletions
|
|
@ -8174,7 +8174,12 @@ bool Unit::AttackStop(bool targetSwitch /*=false*/)
|
|||
if(!targetSwitch && GetTypeId()==TYPEID_UNIT )
|
||||
{
|
||||
((Creature*)this)->SetNoCallAssistance(false);
|
||||
((Creature*)this)->SetNoSearchAssistance(false);
|
||||
|
||||
if (((Creature*)this)->HasSearchedAssistance())
|
||||
{
|
||||
((Creature*)this)->SetNoSearchAssistance(false);
|
||||
UpdateSpeed(MOVE_RUN, false);
|
||||
}
|
||||
}
|
||||
|
||||
SendMeleeAttackStop(victim);
|
||||
|
|
@ -10464,6 +10469,13 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
|
|||
break;
|
||||
}
|
||||
|
||||
// for creature case, we check explicit if mob searched for assistance
|
||||
if (GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
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".
|
||||
}
|
||||
|
||||
// Apply strongest slow aura mod to speed
|
||||
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
|
||||
if (slow)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue