bool Beacon::Process() { if(remove_me) { return false; } if ( spell_timer.Enabled() && spell_timer.Check() && IsValidSpell(spell_id) ) { Mob *caster = entity_list.GetMob(caster_id); if(caster && spell_iterations-- && max_targets) { // NPCs should never be affected by an AE they cast. PB AEs shouldn't affect caster either // I don't think any other cases that get here matter bool affect_caster = (!caster->IsNPC() && !caster->IsAIControlled()) && spells[spell_id].targettype != ST_AECaster; entity_list.AESpell(caster, this, spell_id, affect_caster, resist_adjust, &max_targets); } else { // spell is done casting, or caster disappeared spell_id = 0xFFFF; spell_iterations = 0; spell_timer.Disable(); caster_id = 0; } } if(remove_timer.Enabled() && remove_timer.Check()) { return false; } return true; }
bool Beacon::Process() { if(remove_me) { return false; } if ( spell_timer.Enabled() && spell_timer.Check() && IsValidSpell(spell_id) ) { Mob *caster = entity_list.GetMob(caster_id); if(caster && spell_iterations--) { bool affect_caster = (!caster->IsNPC() && !caster->IsAIControlled()); //NPC AE spells do not affect the NPC caster entity_list.AESpell(caster, this, spell_id, affect_caster, resist_adjust); } else { // spell is done casting, or caster disappeared spell_id = 0xFFFF; spell_iterations = 0; spell_timer.Disable(); caster_id = 0; } } if(remove_timer.Enabled() && remove_timer.Check()) { return false; } return true; }