Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2TerritoryFlagInstance


      if(player.isTerritoryFlagEquipped())
      {
        L2ItemInstance flag = player.getActiveWeaponInstance();
        if(flag != null && flag.getCustomType1() != 77) // 77 это эвентовый флаг
        {
          L2TerritoryFlagInstance flagNpc = TerritorySiege.getNpcFlagByItemId(flag.getItemId());
          flagNpc.returnToCastle(player);
        }
      }
    }
View Full Code Here


      {
        if(onlyOne == -1 || flagCastleId == onlyOne)
        {
          SiegeSpawn info = TerritorySiegeDatabase.getSiegeFlags().get(flagCastleId).get(0);
          Location loc = points.get(i).getLoc();
          L2TerritoryFlagInstance flag = new L2TerritoryFlagInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(info.getNpcId()));
          flag.setCurrentHpMp(flag.getMaxHp(), flag.getMaxMp(), true);
          flag.setXYZInvisible(loc.correctGeoZ());
          flag.setSpawnedLoc(flag.getLoc());
          flag.setHeading(loc.h);
          flag.setItemId(info.getValue());
          flag.setBaseTerritoryId(flagCastleId);
          flag.setCurrentTerritoryId(castle.getId());
          flag.spawnMe();
          _flags.add(flag);
          setWardLoc(flagCastleId, flag.getLoc());
        }
        i++;
      }
    }
  }
View Full Code Here

        if(player.getTerritorySiege() > -1 && player.isTerritoryFlagEquipped())
        {
          L2ItemInstance flag = player.getActiveWeaponInstance();
          if(flag != null && flag.getCustomType1() != 77) // 77 это эвентовый флаг
          {
            L2TerritoryFlagInstance flagNpc = TerritorySiege.getNpcFlagByItemId(flag.getItemId());
            flagNpc.engrave(player);
          }
        }
      }
    }
  }
View Full Code Here

    if(isTerritoryFlagEquipped())
    {
      L2ItemInstance flag = getActiveWeaponInstance();
      if(flag != null && flag.getCustomType1() != 77) // 77 это эвентовый флаг
      {
        L2TerritoryFlagInstance flagNpc = TerritorySiege.getNpcFlagByItemId(flag.getItemId());
        flagNpc.drop(this);
        sendPacket(new SystemMessage(SystemMessage.YOU_HAVE_DROPPED_S1).addItemName(flag.getItemId()));
        String terrName = CastleManager.getInstance().getCastleByIndex(flagNpc.getBaseTerritoryId()).getName();
        TerritorySiege.announceToPlayer(new SystemMessage(SystemMessage.THE_CHARACTER_THAT_ACQUIRED_S1_WARD_HAS_BEEN_KILLED).addString(terrName), true);
      }
    }
    for(L2ItemInstance item : getInventory().getItemsList())
    {
View Full Code Here

      if(isTerritoryFlagEquipped())
      {
        L2ItemInstance flag = getActiveWeaponInstance();
        if(flag != null && flag.getCustomType1() != 77) // 77 это эвентовый флаг
        {
          L2TerritoryFlagInstance flagNpc = TerritorySiege.getNpcFlagByItemId(flag.getItemId());
          flagNpc.drop(this);
        }
      }
      /* TODO
      for(L2ItemInstance item : getInventory().getItemsList())
      if((item.getCustomFlags() & L2ItemInstance.FLAG_ALWAYS_DROP_ON_DIE) == L2ItemInstance.FLAG_DROP_ON_DISCONNECT)
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.instances.L2TerritoryFlagInstance

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.