Package com.l2jfrozen.gameserver.model.actor.instance

Examples of com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance


            {         
              boss_template = NpcTable.getInstance().getTemplate(boss_id);
             
              if (boss_template != null && getLevel() > boss_template.getLevel() + 8)
              {           
                L2MonsterInstance boss_instance = null;
               
                if (boss_template.type.equals("L2RaidBoss"))
                {           
                  StatsSet actual_boss_stat = RaidBossSpawnManager.getInstance().getStatsSet(boss_id);
                  if (actual_boss_stat != null)
                  {               
                    // alive = actual_boss_stat.getLong("respawnTime") == 0;
                    boss_instance = RaidBossSpawnManager.getInstance().getBoss(boss_id);               
                  }           
                }
                else if (boss_template.type.equals("L2GrandBoss"))
                {           
                  StatsSet actual_boss_stat = GrandBossManager.getInstance().getStatsSet(boss_id);
                  if (actual_boss_stat != null)
                  {               
                    // alive = actual_boss_stat.getLong("respawn_time") == 0;
                    boss_instance = GrandBossManager.getInstance().getBoss(boss_id);               
                  }
                }
               
                // max allowed rage into take cursed is 3000
                if (boss_instance != null/* && alive */&& boss_instance.isInsideRadius(this, 3000, false, false))
                {
                  to_be_cursed = true;
                }
              }         
            }       
View Full Code Here


                {
                  boss_template = NpcTable.getInstance().getTemplate(boss_id);
                 
                  if (boss_template != null && getLevel() > boss_template.getLevel() + 8)
                  {
                    L2MonsterInstance boss_instance = null;
                   
                    if (boss_template.type.equals("L2RaidBoss"))
                    {
                      StatsSet actual_boss_stat = RaidBossSpawnManager.getInstance().getStatsSet(boss_id);
                      if (actual_boss_stat != null)
                      {
                        // alive = actual_boss_stat.getLong("respawnTime") == 0;
                        boss_instance = RaidBossSpawnManager.getInstance().getBoss(boss_id);
                      }
                    }
                    else if (boss_template.type.equals("L2GrandBoss"))
                    {
                      StatsSet actual_boss_stat = GrandBossManager.getInstance().getStatsSet(boss_id);
                      if (actual_boss_stat != null)
                      {
                        // alive = actual_boss_stat.getLong("respawn_time") == 0;
                        boss_instance = GrandBossManager.getInstance().getBoss(boss_id);
                      }
                    }
                   
                    // max allowed rage into take cursed is 3000
                    if (boss_instance != null/* && alive */&& boss_instance.isInsideRadius(this, 3000, false, false))
                    {
                      to_be_cursed = true;
                    }
                  }
                }
View Full Code Here

    }

    // If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle
    if(this instanceof L2MonsterInstance)
    {
      L2MonsterInstance master = (L2MonsterInstance) this;

      if(this instanceof L2MinionInstance)
      {
        master = ((L2MinionInstance) this).getLeader();

        if(!master.isInCombat() && !master.isDead())
        {
          master.addDamage(attacker, 1);
        }
      }

      if(master.hasMinions())
      {
        master.callMinionsToAssist(attacker);
      }

      master = null;
    }
View Full Code Here

                    }
                }, 11100L);
                // TODO: the person who woke baium up should be knocked across the room, onto a wall, and
                // lose massive amounts of HP.
                for (int i = 0; i < ANGEL_LOCATION.length; i++) {
                    L2MonsterInstance angel = (L2MonsterInstance) addSpawn(ARCHANGEL, ANGEL_LOCATION[i][0], ANGEL_LOCATION[i][1], ANGEL_LOCATION[i][2], ANGEL_LOCATION[i][3], false, 0);
                    angel.setIsInvul(true);
                    _Minions.add(angel);
                    angel.getAttackByList().addAll(_Zone.getCharactersInside().values());
                    angel.isAggressive();
                }
            }
            // despawn the live baium after 30 minutes of inactivity
            // also check if the players are cheating, having pulled Baium outside his zone...
        } else if (event.equalsIgnoreCase("baium_despawn") && npc != null) {
View Full Code Here

    for(int index = 0; index < targets.length; index++)
    {
      if(!(targets[index] instanceof L2MonsterInstance))
        continue;

      L2MonsterInstance target = (L2MonsterInstance) targets[index];

      if(target.isSpoil())
      {
        activeChar.sendPacket(new SystemMessage(SystemMessageId.ALREDAY_SPOILED));
        continue;
      }

      // SPOIL SYSTEM by Lbaldi
      boolean spoil = false;
      if(!target.isDead())
      {
        spoil = Formulas.calcMagicSuccess(activeChar, (L2Character) targets[index], skill);

        if(spoil)
        {
          target.setSpoil(true);
          target.setIsSpoiledBy(activeChar.getObjectId());
          activeChar.sendPacket(new SystemMessage(SystemMessageId.SPOIL_SUCCESS));
        }
        else
        {
          SystemMessage sm = new SystemMessage(SystemMessageId.S1_WAS_UNAFFECTED_BY_S2);
          sm.addString(target.getName());
          sm.addSkillName(skill.getDisplayId());
          activeChar.sendPacket(sm);
          sm = null;
        }
        target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, activeChar);
      }

      target = null;
    }
  }
View Full Code Here

      player = null;
    }
    else if(Config.ALLOW_GUARDS && object instanceof L2MonsterInstance)
    {
      // Check if the object added is an aggressive L2MonsterInstance
      L2MonsterInstance mob = (L2MonsterInstance) object;

      if(mob.isAggressive())
      {
        if(Config.DEBUG)
        {
          _log.fine(getActiveChar().getObjectId() + ": Aggressive mob " + mob.getObjectId() + " entered scan range");
        }

        // Set the L2GuardInstance Intention to AI_INTENTION_ACTIVE
        if(getActiveChar().getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE)
        {
View Full Code Here

      StringTokenizer st = new StringTokenizer(params);
      mid1 = Integer.parseInt(st.nextToken());
      mid2 = Integer.parseInt(st.nextToken());

      npc1 = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getInstance().getTemplate(mid1));

      npc2 = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getInstance().getTemplate(mid2));

      st = null;
    }

    int miss1 = 0;
View Full Code Here

      player = null;
    }
    else if(Config.ALLOW_GUARDS && object instanceof L2MonsterInstance)
    {
      // Check if the object added is an aggressive L2MonsterInstance
      L2MonsterInstance mob = (L2MonsterInstance) object;

      if(mob.isAggressive())
      {
        if(Config.DEBUG)
        {
          _log.fine(getActiveChar().getObjectId() + ": Aggressive mob " + mob.getObjectId() + " entered scan range");
        }

        // Set the L2GuardInstance Intention to AI_INTENTION_ACTIVE
        if(getActiveChar().getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE)
        {
View Full Code Here

                    if (mob != null) {
                        mob.decayMe();
                    }
                }
                for (int k = 0; k < _Nurses.size(); k++) {
                    L2MonsterInstance _nurse = _Nurses.get(k);
                    if (_nurse != null)
                        _nurse.decayMe();
                }
                _Nurses.clear();
                _Minions.clear();
            }
            break;
View Full Code Here

  public void unSpawnAll()
  {
    for(String clanName : getRegisteredClans())
    {
      L2Clan clan = ClanTable.getInstance().getClanByName(clanName);
      L2MonsterInstance mob = getQuestMob(clan);
      L2DecoInstance flag = getSiegeFlag(clan);
      if(mob != null)
      {
        mob.deleteMe();
      }
      if(flag != null)
      {
        flag.deleteMe();
      }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.