diff options
author | reno <none@none> | 2010-03-15 14:38:30 -0500 |
---|---|---|
committer | reno <none@none> | 2010-03-15 14:38:30 -0500 |
commit | e65dfc6a311f6c368db209c8a26d9404ddc033e7 (patch) | |
tree | df9e69223ea4da2ffb844c0092ae57baeb4647f8 /src | |
parent | b0b17e56de08e563a7b5f15d4f19a4070c8d0dbb (diff) |
attempt to stop mobs casting and fleeing while stunned or confused
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a758e836845..edbeaf4c9ec 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -14789,24 +14789,37 @@ 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)) - SetRooted(true); + { + addUnitState(state); + SetRooted(true); + } break; case UNIT_STAT_CONFUSED: if (!hasUnitState(UNIT_STAT_STUNNED)) + { + addUnitState(state); SetConfused(true); + CastStop(); + } break; case UNIT_STAT_FLEEING: if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED)) + { + addUnitState(state); SetFeared(true); + CastStop(); + } break; default: break; |