summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-09 14:58:25 -0300
committershennetsind <ind@henn.et>2013-03-09 14:58:25 -0300
commit70a3d73ac5205c0a830dc32e220bfa38f355208d (patch)
tree56c488e37ee2a96b9296d14a080e5988384352d7 /src/map/unit.c
parent496abaabbeb22b13c74a454817705736f421605c (diff)
downloadhercules-70a3d73ac5205c0a830dc32e220bfa38f355208d.tar.gz
hercules-70a3d73ac5205c0a830dc32e220bfa38f355208d.tar.bz2
hercules-70a3d73ac5205c0a830dc32e220bfa38f355208d.tar.xz
hercules-70a3d73ac5205c0a830dc32e220bfa38f355208d.zip
Dropping StatusChangeStateTable
We've discussed, and decided that this feature's improvement is not worth the hassle it creates. Gepard was right, and I was stupidly wrong. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c50
1 files changed, 39 insertions, 11 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index c9d6ab165..11f7cb8c8 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -921,17 +921,45 @@ int unit_can_move(struct block_list *bl) {
return 0; //Can't move
if (sc) {
- if( sc->cant.move /* status placed here are ones that cannot be cached by sc->cant.move for they depend on other conditions other than their availability */
- || (sc->data[SC_FEAR] && sc->data[SC_FEAR]->val2 > 0)
- || (sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1)
- || (sc->data[SC_DANCING] && sc->data[SC_DANCING]->val4 && (
- !sc->data[SC_LONGING] ||
- (sc->data[SC_DANCING]->val1&0xFFFF) == CG_MOONLIT ||
- (sc->data[SC_DANCING]->val1&0xFFFF) == CG_HERMODE
- ) )
- || (sc->data[SC_CLOAKING] && //Need wall at level 1-2
- sc->data[SC_CLOAKING]->val1 < 3 && !(sc->data[SC_CLOAKING]->val4&1))
- )
+ if( sc->count && (
+ sc->data[SC_ANKLE]
+ || sc->data[SC_AUTOCOUNTER]
+ || sc->data[SC_TRICKDEAD]
+ || sc->data[SC_BLADESTOP]
+ || sc->data[SC_BLADESTOP_WAIT]
+ || (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF) // cannot move while gospel is in effect
+ || (sc->data[SC_BASILICA] && sc->data[SC_BASILICA]->val4 == bl->id) // Basilica caster cannot move
+ || sc->data[SC_STOP]
+ || sc->data[SC_CLOSECONFINE]
+ || sc->data[SC_CLOSECONFINE2]
+ || sc->data[SC_MADNESSCANCEL]
+ || (sc->data[SC_GRAVITATION] && sc->data[SC_GRAVITATION]->val3 == BCT_SELF)
+ || sc->data[SC_WHITEIMPRISON]
+ || sc->data[SC_ELECTRICSHOCKER]
+ || sc->data[SC_BITE]
+ || sc->data[SC_THORNSTRAP]
+ || sc->data[SC_MAGNETICFIELD]
+ || sc->data[SC__MANHOLE]
+ || sc->data[SC_CURSEDCIRCLE_ATKER]
+ || sc->data[SC_CURSEDCIRCLE_TARGET]
+ || (sc->data[SC_CRYSTALIZE] && bl->type != BL_MOB)
+ || sc->data[SC_NETHERWORLD]
+ || (sc->data[SC_CAMOUFLAGE] && sc->data[SC_CAMOUFLAGE]->val1 < 3 && !(sc->data[SC_CAMOUFLAGE]->val3&1))
+ || sc->data[SC_MEIKYOUSISUI]
+ || sc->data[SC_KAGEHUMI]
+ || sc->data[SC_KYOUGAKU]
+ || sc->data[SC_PARALYSIS]
+ || sc->data[SC_VACUUM_EXTREME]
+ || (sc->data[SC_FEAR] && sc->data[SC_FEAR]->val2 > 0)
+ || (sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1)
+ || (sc->data[SC_DANCING] && sc->data[SC_DANCING]->val4 && (
+ !sc->data[SC_LONGING] ||
+ (sc->data[SC_DANCING]->val1&0xFFFF) == CG_MOONLIT ||
+ (sc->data[SC_DANCING]->val1&0xFFFF) == CG_HERMODE
+ ) )
+ || (sc->data[SC_CLOAKING] && //Need wall at level 1-2
+ sc->data[SC_CLOAKING]->val1 < 3 && !(sc->data[SC_CLOAKING]->val4&1))
+ ) )
return 0;