L2ItemInstance it;
it = player.getInventory().getItemByItemId(_t1.idWTicket1);
if(it != null && it.getCount() >= 1)
{
player.getInventory().destroyItem("Boat", it.getObjectId(), 1, player, this);
InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(it);
player.sendPacket(iu);
_inboat.put(i, player);
i++;
}
else if(it == null && _t1.idWTicket1 == 0)
{
_inboat.put(i, player);
i++;
}
else
{
player.teleToLocation(_t1.ntx1, _t1.nty1, _t1.ntz1, false);
}
}
}
knownPlayers = null;
}
Boatrun bc = new Boatrun(0, this);
ThreadPoolManager.getInstance().scheduleGeneral(bc, 0);
bc = null;
}
else if(_cycle == 2)
{
Collection<L2PcInstance> knownPlayers = getKnownList().getKnownPlayers().values();
if(knownPlayers != null && !knownPlayers.isEmpty())
{
_inboat = new FastMap<Integer, L2PcInstance>();
int i = 0;
for(L2PcInstance player : knownPlayers)
{
if(player.isInBoat() && player.getBoat() == this)
{
L2ItemInstance it;
it = player.getInventory().getItemByItemId(_t2.idWTicket1);
if(it != null && it.getCount() >= 1)
{
player.getInventory().destroyItem("Boat", it.getObjectId(), 1, player, this);
InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(it);
player.sendPacket(iu);
_inboat.put(i, player);
i++;
}
else if(it == null && _t2.idWTicket1 == 0)