Always add CC unit state to allow restoring CC effects if one expires (stun in case of root/confuse, and fear in case of everything else)
Fixes issue #1468 --HG-- branch : trunk
This commit is contained in:
+1
-6
@@ -14748,24 +14748,20 @@ void Unit::SetControlled(bool apply, UnitState state)
|
||||
if (hasUnitState(state))
|
||||
return;
|
||||
|
||||
addUnitState(state);
|
||||
switch(state)
|
||||
{
|
||||
case UNIT_STAT_STUNNED:
|
||||
addUnitState(state);
|
||||
SetStunned(true);
|
||||
CastStop();
|
||||
break;
|
||||
case UNIT_STAT_ROOT:
|
||||
if (!hasUnitState(UNIT_STAT_STUNNED))
|
||||
{
|
||||
addUnitState(state);
|
||||
SetRooted(true);
|
||||
}
|
||||
break;
|
||||
case UNIT_STAT_CONFUSED:
|
||||
if (!hasUnitState(UNIT_STAT_STUNNED))
|
||||
{
|
||||
addUnitState(state);
|
||||
SetConfused(true);
|
||||
CastStop();
|
||||
}
|
||||
@@ -14773,7 +14769,6 @@ void Unit::SetControlled(bool apply, UnitState state)
|
||||
case UNIT_STAT_FLEEING:
|
||||
if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
|
||||
{
|
||||
addUnitState(state);
|
||||
SetFeared(true);
|
||||
CastStop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user