All pastes #31790 Raw Edit

Anonymous

public text v1 · immutable
#31790 ·published 2005-11-30 08:30 UTC
rendered paste body
                // If this L2Attackable is a L2MonsterInstance and it has spawne
d minions, call its minions to battle
                if (this instanceof L2MonsterInstance)
                {
                  L2MonsterInstance master = (L2MonsterInstance) this;
                  if (master.hasMinions())
                    master.callMinionsToAssist(attacker);
                  else if (this instanceof L2MinionInstance)
                  {
                    L2MonsterInstance true_master = ((L2MinionInstance)this).get
Leader();
                    if(true_master != null)
                    {
                        ((L2Attackable)true_master).addDamage(attacker,1);
                        if (true_master.hasMinions())
                          true_master.callMinionsToAssist(attacker);
                    }
                  }
                }