aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-04-05 13:09:28 +0200
committerthenecromancer <none@none>2010-04-05 13:09:28 +0200
commit0218e45565e5371b7b055349a347b78eb9c2c1fc (patch)
treebf43fe7f0de8dbdabc35d7f240a9bedcc90d3a62 /src/game/Unit.cpp
parenta795a1110c6b62df841b8a48d8e634ede255c486 (diff)
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
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 6f539d92646..1b85d0e566c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -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();
}