Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Creature::onAttacking(uint32_t interval)
- {
- if(!attackedCreature)
- return;
- CreatureEventList attackEvents = getCreatureEvents(CREATURE_EVENT_ATTACK);
- for(CreatureEventList::iterator it = attackEvents.begin(); it != attackEvents.end(); ++it)
- {
- if(!(*it)->executeAttack(this, attackedCreature) && attackedCreature)
- {
- setAttackedCreature(NULL);
- setFollowCreature(NULL);
- onAttackedCreatureDisappear(false);
- return;
- }
- }
- if(!attackedCreature)
- return;
- onAttacked();
- attackedCreature->onAttacked();
- if(g_game.isSightClear(getPosition(), attackedCreature->getPosition(), true))
- doAttacking(interval);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement