public bool Attack(Object obj, object args) { CombatInterface_Npc cb = CbtInterface as CombatInterface_Npc; if (cb == null) { Log.Error("Pet", "Missing CombatInterface in Attack()"); return(false); } Unit attacker = obj as Unit; if (attacker == null) { Log.Error("Pet", "Object is NULL in Attack()"); return(false); } if (AIMode != 3 && cb.CurrentTarget == null) { AiInterface.ProcessCombatStart(attacker); } return(false); }
protected ABrain(Unit unit) { _unit = unit; Combat = (CombatInterface_Npc)unit.CbtInterface; AI = unit.AiInterface; _pet = unit as Pet; }