Sync with L2jServer HighFive Feb 15th 2015.

This commit is contained in:
mobius
2015-02-15 23:48:35 +00:00
parent f2d6aedabe
commit 06c765ea63
45 changed files with 474 additions and 843 deletions

View File

@ -27,10 +27,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jserver.L2DatabaseFactory;
import com.l2jserver.gameserver.data.xml.impl.NpcData;
import com.l2jserver.gameserver.model.L2Spawn;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
import com.l2jserver.gameserver.model.entity.Castle;
public final class SiegeGuardManager
@ -208,28 +206,18 @@ public final class SiegeGuardManager
}
try (ResultSet rs = ps.executeQuery())
{
L2Spawn spawn1;
L2NpcTemplate template1;
while (rs.next())
{
template1 = NpcData.getInstance().getTemplate(rs.getInt("npcId"));
if (template1 != null)
{
spawn1 = new L2Spawn(template1);
spawn1.setAmount(1);
spawn1.setX(rs.getInt("x"));
spawn1.setY(rs.getInt("y"));
spawn1.setZ(rs.getInt("z"));
spawn1.setHeading(rs.getInt("heading"));
spawn1.setRespawnDelay(rs.getInt("respawnDelay"));
spawn1.setLocationId(0);
_siegeGuardSpawn.add(spawn1);
}
else
{
_log.warning(getClass().getSimpleName() + ": Missing npc data in npc table for id: " + rs.getInt("npcId"));
}
final L2Spawn spawn = new L2Spawn(rs.getInt("npcId"));
spawn.setAmount(1);
spawn.setX(rs.getInt("x"));
spawn.setY(rs.getInt("y"));
spawn.setZ(rs.getInt("z"));
spawn.setHeading(rs.getInt("heading"));
spawn.setRespawnDelay(rs.getInt("respawnDelay"));
spawn.setLocationId(0);
_siegeGuardSpawn.add(spawn);
}
}
}