// play the get hit animation void cCombat::playGetHitAnimation( P_CHAR pChar ) { if (pChar->isHuman()) { pChar->action(20); } else { pChar->action(10); } }
cRepeatAction::cRepeatAction( P_CHAR mage, UINT8 anim, UINT32 delay ) { _mage = mage->serial(); _anim = anim; _delay = delay; mage->action( anim ); expiretime = uiCurrentTime + delay; dispellable = false; serializable = false; }
// cTimedSpellAction cTimedSpellAction::cTimedSpellAction( SERIAL serial, UI08 nAction ) { if( !isCharSerial( serial ) ) { character = INVALID_SERIAL; return; } // Display the animation once P_CHAR pc = FindCharBySerial( serial ); if( !pc ) { character = INVALID_SERIAL; return; } pc->action( nAction ); // Save our data character = serial; action = nAction; serializable = false; expiretime = uiCurrentTime + 750; }