Removed unnecessary casts.
This commit is contained in:
parent
4137824649
commit
c9b04d53f4
@ -1159,7 +1159,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100)));
|
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / player.getMaxLoad()) * 100)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
||||||
|
@ -193,7 +193,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
super.setName(_item.getName());
|
super.setName(_item.getName());
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
||||||
|
|
||||||
// Masks
|
// Masks
|
||||||
public static final byte SEND_ONE = (byte) 0x00;
|
public static final byte SEND_ONE = 0x00;
|
||||||
public static final byte SEND_DEFAULT = (byte) 0x01;
|
public static final byte SEND_DEFAULT = 0x01;
|
||||||
public static final byte SEND_MULTI = (byte) 0x04;
|
public static final byte SEND_MULTI = 0x04;
|
||||||
|
|
||||||
protected static class Relation
|
protected static class Relation
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private Relation _singled;
|
private Relation _singled;
|
||||||
private final List<Relation> _multi;
|
private final List<Relation> _multi;
|
||||||
private byte _mask = (byte) 0x00;
|
private byte _mask = 0x00;
|
||||||
|
|
||||||
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
||||||
{
|
{
|
||||||
|
@ -1178,7 +1178,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100)));
|
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / player.getMaxLoad()) * 100)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
||||||
|
@ -199,7 +199,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
super.setName(_item.getName());
|
super.setName(_item.getName());
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
||||||
|
|
||||||
// Masks
|
// Masks
|
||||||
public static final byte SEND_ONE = (byte) 0x00;
|
public static final byte SEND_ONE = 0x00;
|
||||||
public static final byte SEND_DEFAULT = (byte) 0x01;
|
public static final byte SEND_DEFAULT = 0x01;
|
||||||
public static final byte SEND_MULTI = (byte) 0x04;
|
public static final byte SEND_MULTI = 0x04;
|
||||||
|
|
||||||
protected static class Relation
|
protected static class Relation
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private Relation _singled;
|
private Relation _singled;
|
||||||
private final List<Relation> _multi;
|
private final List<Relation> _multi;
|
||||||
private byte _mask = (byte) 0x00;
|
private byte _mask = 0x00;
|
||||||
|
|
||||||
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
||||||
{
|
{
|
||||||
|
@ -1178,7 +1178,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100)));
|
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / player.getMaxLoad()) * 100)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
||||||
|
@ -199,7 +199,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
super.setName(_item.getName());
|
super.setName(_item.getName());
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
||||||
|
|
||||||
// Masks
|
// Masks
|
||||||
public static final byte SEND_ONE = (byte) 0x00;
|
public static final byte SEND_ONE = 0x00;
|
||||||
public static final byte SEND_DEFAULT = (byte) 0x01;
|
public static final byte SEND_DEFAULT = 0x01;
|
||||||
public static final byte SEND_MULTI = (byte) 0x04;
|
public static final byte SEND_MULTI = 0x04;
|
||||||
|
|
||||||
protected static class Relation
|
protected static class Relation
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private Relation _singled;
|
private Relation _singled;
|
||||||
private final List<Relation> _multi;
|
private final List<Relation> _multi;
|
||||||
private byte _mask = (byte) 0x00;
|
private byte _mask = 0x00;
|
||||||
|
|
||||||
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
||||||
{
|
{
|
||||||
|
@ -1178,7 +1178,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100)));
|
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / player.getMaxLoad()) * 100)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
||||||
|
@ -199,7 +199,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
super.setName(_item.getName());
|
super.setName(_item.getName());
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
||||||
|
|
||||||
// Masks
|
// Masks
|
||||||
public static final byte SEND_ONE = (byte) 0x00;
|
public static final byte SEND_ONE = 0x00;
|
||||||
public static final byte SEND_DEFAULT = (byte) 0x01;
|
public static final byte SEND_DEFAULT = 0x01;
|
||||||
public static final byte SEND_MULTI = (byte) 0x04;
|
public static final byte SEND_MULTI = 0x04;
|
||||||
|
|
||||||
protected static class Relation
|
protected static class Relation
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private Relation _singled;
|
private Relation _singled;
|
||||||
private final List<Relation> _multi;
|
private final List<Relation> _multi;
|
||||||
private byte _mask = (byte) 0x00;
|
private byte _mask = 0x00;
|
||||||
|
|
||||||
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
||||||
{
|
{
|
||||||
|
@ -2594,7 +2594,7 @@ public class Frintezza extends Quest
|
|||||||
startQuestTimer("remove_players", 900000, npc, null);
|
startQuestTimer("remove_players", 900000, npc, null);
|
||||||
|
|
||||||
GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DEAD);
|
GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DEAD);
|
||||||
final long respawnTime = (long) (Config.FRINTEZZA_RESP_FIRST + Rnd.get(Config.FRINTEZZA_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.FRINTEZZA_RESP_FIRST + Rnd.get(Config.FRINTEZZA_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("frintezza_unlock", respawnTime, npc, null);
|
startQuestTimer("frintezza_unlock", respawnTime, npc, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// also save the respawn time so that the info is maintained past reboots
|
||||||
final StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
|
final StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
|
||||||
|
@ -247,7 +247,7 @@ public class Orfen extends Quest
|
|||||||
{
|
{
|
||||||
GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD);
|
||||||
// time is 48hour +/- 20hour
|
// time is 48hour +/- 20hour
|
||||||
final long respawnTime = (long) (Config.ORFEN_RESP_FIRST + Rnd.get(Config.ORFEN_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ORFEN_RESP_FIRST + Rnd.get(Config.ORFEN_RESP_SECOND)) * 3600000;
|
||||||
cancelQuestTimer("ORFEN_REFRESH", npc, null);
|
cancelQuestTimer("ORFEN_REFRESH", npc, null);
|
||||||
startQuestTimer("ORFEN_SPAWN", respawnTime, null, null);
|
startQuestTimer("ORFEN_SPAWN", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// also save the respawn time so that the info is maintained past reboots
|
||||||
|
@ -615,7 +615,7 @@ public class Valakas extends Quest
|
|||||||
{
|
{
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);
|
||||||
|
|
||||||
final long respawnTime = (long) (Config.VALAKAS_RESP_FIRST + Rnd.get(Config.VALAKAS_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.VALAKAS_RESP_FIRST + Rnd.get(Config.VALAKAS_RESP_SECOND)) * 3600000;
|
||||||
|
|
||||||
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// also save the respawn time so that the info is maintained past reboots
|
||||||
|
@ -874,7 +874,7 @@ public class Zaken extends Quest
|
|||||||
{
|
{
|
||||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
||||||
// time is 36hour +/- 17hour
|
// time is 36hour +/- 17hour
|
||||||
final long respawnTime = (long) (Config.ZAKEN_RESP_FIRST + Rnd.get(Config.ZAKEN_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ZAKEN_RESP_FIRST + Rnd.get(Config.ZAKEN_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
||||||
cancelQuestTimer("1001", npc, null);
|
cancelQuestTimer("1001", npc, null);
|
||||||
cancelQuestTimer("1003", npc, null);
|
cancelQuestTimer("1003", npc, null);
|
||||||
|
@ -67,7 +67,7 @@ public class TradeController
|
|||||||
{
|
{
|
||||||
restoreCount(_timer);
|
restoreCount(_timer);
|
||||||
dataTimerSave(_timer);
|
dataTimerSave(_timer);
|
||||||
ThreadPool.schedule(new RestoreCount(_timer), (long) _timer * 60 * 60 * 1000);
|
ThreadPool.schedule(new RestoreCount(_timer), _timer * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
catch (Throwable t)
|
catch (Throwable t)
|
||||||
{
|
{
|
||||||
@ -613,7 +613,7 @@ public class TradeController
|
|||||||
|
|
||||||
protected void dataTimerSave(int time)
|
protected void dataTimerSave(int time)
|
||||||
{
|
{
|
||||||
final long timerSave = System.currentTimeMillis() + ((long) time * 60 * 60 * 1000);
|
final long timerSave = System.currentTimeMillis() + (time * 60 * 60 * 1000);
|
||||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||||
{
|
{
|
||||||
PreparedStatement statement = con.prepareStatement("UPDATE merchant_buylists SET savetimer =? WHERE time =?");
|
PreparedStatement statement = con.prepareStatement("UPDATE merchant_buylists SET savetimer =? WHERE time =?");
|
||||||
|
@ -392,7 +392,7 @@ public class DoorTable
|
|||||||
continue; // Parallel
|
continue; // Parallel
|
||||||
}
|
}
|
||||||
|
|
||||||
final float p = (float) ((doorInst.getA() * x) + (doorInst.getB() * y) + (doorInst.getC() * z) + doorInst.getD()) / (float) dk;
|
final float p = (float) ((doorInst.getA() * x) + (doorInst.getB() * y) + (doorInst.getC() * z) + doorInst.getD()) / dk;
|
||||||
|
|
||||||
final int fx = (int) (x - (l * p));
|
final int fx = (int) (x - (l * p));
|
||||||
final int fy = (int) (y - (m * p));
|
final int fy = (int) (y - (m * p));
|
||||||
|
@ -58,7 +58,7 @@ public class TradeListTable
|
|||||||
{
|
{
|
||||||
restoreCount(timer);
|
restoreCount(timer);
|
||||||
dataTimerSave(timer);
|
dataTimerSave(timer);
|
||||||
ThreadPool.schedule(new RestoreCount(timer), (long) timer * 60 * 60 * 1000);
|
ThreadPool.schedule(new RestoreCount(timer), timer * 60 * 60 * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ public class TradeListTable
|
|||||||
|
|
||||||
protected void dataTimerSave(int time)
|
protected void dataTimerSave(int time)
|
||||||
{
|
{
|
||||||
final long timerSave = System.currentTimeMillis() + ((long) time * 3600000); // 60*60*1000
|
final long timerSave = System.currentTimeMillis() + (time * 3600000); // 60*60*1000
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ public class MultilayerBlock implements IBlock
|
|||||||
|
|
||||||
private int _extractLayerNswe(short layer)
|
private int _extractLayerNswe(short layer)
|
||||||
{
|
{
|
||||||
return (byte) (layer & 0x000F);
|
return (layer & 0x000F);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _extractLayerHeight(short layer)
|
private int _extractLayerHeight(short layer)
|
||||||
|
@ -1061,7 +1061,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.valueOf(Util.roundTo(((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100, 2)));
|
adminReply.replace("%percent%", String.valueOf(Util.roundTo(((float) player.getCurrentLoad() / player.getMaxLoad()) * 100, 2)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk(null)));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk(null)));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk(null, null)));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk(null, null)));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef(null)));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef(null)));
|
||||||
|
@ -523,7 +523,7 @@ public class AdminEditNpc implements IAdminCommandHandler
|
|||||||
|
|
||||||
for (Object p : box.getAccess())
|
for (Object p : box.getAccess())
|
||||||
{
|
{
|
||||||
msg += " " + (String) p;
|
msg += " " + p;
|
||||||
}
|
}
|
||||||
|
|
||||||
activeChar.sendMessage(msg);
|
activeChar.sendMessage(msg);
|
||||||
|
@ -171,7 +171,7 @@ public class Blow implements ISkillHandler
|
|||||||
crit = true;
|
crit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
double damage = (int) Formulas.calcBlowDamage(activeChar, target, skill, shld, crit, soul);
|
double damage = Formulas.calcBlowDamage(activeChar, target, skill, shld, crit, soul);
|
||||||
|
|
||||||
// if (soul)
|
// if (soul)
|
||||||
// weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE);
|
// weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE);
|
||||||
|
@ -1605,7 +1605,7 @@ public class FourSepulchersManager extends GrandBossManager
|
|||||||
|
|
||||||
protected byte minuteSelect(byte min)
|
protected byte minuteSelect(byte min)
|
||||||
{
|
{
|
||||||
if (((double) min % 5) != 0)// if doesn't divides on 5 fully
|
if ((min % 5) != 0)// if doesn't divides on 5 fully
|
||||||
{
|
{
|
||||||
// mad table for selecting proper minutes...
|
// mad table for selecting proper minutes...
|
||||||
// may be there is a better way to do this
|
// may be there is a better way to do this
|
||||||
|
@ -918,7 +918,7 @@ public class L2Attackable extends L2NpcInstance
|
|||||||
// If the party didn't killed this L2Attackable alone
|
// If the party didn't killed this L2Attackable alone
|
||||||
if (partyDmg < getMaxHp())
|
if (partyDmg < getMaxHp())
|
||||||
{
|
{
|
||||||
partyMul = (float) partyDmg / (float) getMaxHp();
|
partyMul = (float) partyDmg / getMaxHp();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoid "over damage"
|
// Avoid "over damage"
|
||||||
@ -1290,7 +1290,7 @@ public class L2Attackable extends L2NpcInstance
|
|||||||
{ // core ring
|
{ // core ring
|
||||||
if (Config.CORE_RING_CHANCE > 0)
|
if (Config.CORE_RING_CHANCE > 0)
|
||||||
{
|
{
|
||||||
dropChance = ((float) 10000 * Config.CORE_RING_CHANCE);
|
dropChance = (10000 * Config.CORE_RING_CHANCE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1302,7 +1302,7 @@ public class L2Attackable extends L2NpcInstance
|
|||||||
{ // orfen earring
|
{ // orfen earring
|
||||||
if (Config.ORFEN_EARRING_CHANCE > 0)
|
if (Config.ORFEN_EARRING_CHANCE > 0)
|
||||||
{
|
{
|
||||||
dropChance = ((float) 10000 * Config.ORFEN_EARRING_CHANCE);
|
dropChance = (10000 * Config.ORFEN_EARRING_CHANCE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1314,7 +1314,7 @@ public class L2Attackable extends L2NpcInstance
|
|||||||
{ // zaken earring
|
{ // zaken earring
|
||||||
if (Config.ZAKEN_EARRING_CHANCE > 0)
|
if (Config.ZAKEN_EARRING_CHANCE > 0)
|
||||||
{
|
{
|
||||||
dropChance = ((float) 10000 * Config.ZAKEN_EARRING_CHANCE);
|
dropChance = (10000 * Config.ZAKEN_EARRING_CHANCE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1326,7 +1326,7 @@ public class L2Attackable extends L2NpcInstance
|
|||||||
{ // aq ring
|
{ // aq ring
|
||||||
if (Config.QA_RING_CHANCE > 0)
|
if (Config.QA_RING_CHANCE > 0)
|
||||||
{
|
{
|
||||||
dropChance = ((float) 10000 * Config.QA_RING_CHANCE);
|
dropChance = (10000 * Config.QA_RING_CHANCE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3092,14 +3092,14 @@ public class L2Attackable extends L2NpcInstance
|
|||||||
diff = -5; // makes possible to use ALT_GAME_EXPONENT configuration
|
diff = -5; // makes possible to use ALT_GAME_EXPONENT configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
xp = ((double) getExpReward() * damage) / getMaxHp();
|
xp = (getExpReward() * damage) / getMaxHp();
|
||||||
|
|
||||||
if (Config.ALT_GAME_EXPONENT_XP != 0)
|
if (Config.ALT_GAME_EXPONENT_XP != 0)
|
||||||
{
|
{
|
||||||
xp *= Math.pow(2., -diff / Config.ALT_GAME_EXPONENT_XP);
|
xp *= Math.pow(2., -diff / Config.ALT_GAME_EXPONENT_XP);
|
||||||
}
|
}
|
||||||
|
|
||||||
sp = ((double) getSpReward() * damage) / getMaxHp();
|
sp = (getSpReward() * damage) / getMaxHp();
|
||||||
|
|
||||||
if (Config.ALT_GAME_EXPONENT_SP != 0)
|
if (Config.ALT_GAME_EXPONENT_SP != 0)
|
||||||
{
|
{
|
||||||
|
@ -1525,10 +1525,10 @@ public class SevenSigns
|
|||||||
int newSealOwner = CABAL_NULL;
|
int newSealOwner = CABAL_NULL;
|
||||||
final int dawnProportion = getSealProportion(currSeal, CABAL_DAWN);
|
final int dawnProportion = getSealProportion(currSeal, CABAL_DAWN);
|
||||||
final int totalDawnMembers = getTotalMembers(CABAL_DAWN) == 0 ? 1 : getTotalMembers(CABAL_DAWN);
|
final int totalDawnMembers = getTotalMembers(CABAL_DAWN) == 0 ? 1 : getTotalMembers(CABAL_DAWN);
|
||||||
final int dawnPercent = Math.round(((float) dawnProportion / (float) totalDawnMembers) * 100);
|
final int dawnPercent = Math.round(((float) dawnProportion / totalDawnMembers) * 100);
|
||||||
final int duskProportion = getSealProportion(currSeal, CABAL_DUSK);
|
final int duskProportion = getSealProportion(currSeal, CABAL_DUSK);
|
||||||
final int totalDuskMembers = getTotalMembers(CABAL_DUSK) == 0 ? 1 : getTotalMembers(CABAL_DUSK);
|
final int totalDuskMembers = getTotalMembers(CABAL_DUSK) == 0 ? 1 : getTotalMembers(CABAL_DUSK);
|
||||||
final int duskPercent = Math.round(((float) duskProportion / (float) totalDuskMembers) * 100);
|
final int duskPercent = Math.round(((float) duskProportion / totalDuskMembers) * 100);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* - If a Seal was already closed or owned by the opponent and the new winner wants to assume ownership of the Seal, 35% or more of the members of the Cabal must have chosen the Seal. If they chose less than 35%, they cannot own the Seal. - If the Seal was owned by the winner in the
|
* - If a Seal was already closed or owned by the opponent and the new winner wants to assume ownership of the Seal, 35% or more of the members of the Cabal must have chosen the Seal. If they chose less than 35%, they cannot own the Seal. - If the Seal was owned by the winner in the
|
||||||
|
@ -190,7 +190,7 @@ public class MultiSellChoose extends L2GameClientPacket
|
|||||||
// now check if the player has sufficient items in the inventory to cover the ingredients' expences
|
// now check if the player has sufficient items in the inventory to cover the ingredients' expences
|
||||||
for (MultiSellIngredient e : _ingredientsList)
|
for (MultiSellIngredient e : _ingredientsList)
|
||||||
{
|
{
|
||||||
if (((double) e.getItemCount() * _amount) > Integer.MAX_VALUE)
|
if ((e.getItemCount() * _amount) > Integer.MAX_VALUE)
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
|
player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
|
||||||
_ingredientsList.clear();
|
_ingredientsList.clear();
|
||||||
|
@ -281,7 +281,7 @@ public final class RequestBuyItem extends L2GameClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
subTotal += (long) count * price; // Before tax
|
subTotal += count * price; // Before tax
|
||||||
tax = (int) (subTotal * taxRate);
|
tax = (int) (subTotal * taxRate);
|
||||||
|
|
||||||
// Check subTotal + tax
|
// Check subTotal + tax
|
||||||
@ -293,7 +293,7 @@ public final class RequestBuyItem extends L2GameClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
weight += (long) count * template.getWeight();
|
weight += count * template.getWeight();
|
||||||
if (!template.isStackable())
|
if (!template.isStackable())
|
||||||
{
|
{
|
||||||
slots += count;
|
slots += count;
|
||||||
|
@ -137,8 +137,8 @@ public class SSQStatus extends L2GameServerPacket
|
|||||||
|
|
||||||
if (totalOverallScore != 0)
|
if (totalOverallScore != 0)
|
||||||
{
|
{
|
||||||
dawnPercent = Math.round(((float) dawnTotalScore / (float) totalOverallScore) * 100);
|
dawnPercent = Math.round(((float) dawnTotalScore / totalOverallScore) * 100);
|
||||||
duskPercent = Math.round(((float) duskTotalScore / (float) totalOverallScore) * 100);
|
duskPercent = Math.round(((float) duskTotalScore / totalOverallScore) * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.DEBUG)
|
if (Config.DEBUG)
|
||||||
@ -246,18 +246,18 @@ public class SSQStatus extends L2GameServerPacket
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
writeC(0);
|
writeC(0);
|
||||||
writeC(Math.round(((float) dawnProportion / (float) totalDawnMembers) * 100));
|
writeC(Math.round(((float) dawnProportion / totalDawnMembers) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (totalDawnMembers == 0)
|
else if (totalDawnMembers == 0)
|
||||||
{
|
{
|
||||||
writeC(Math.round(((float) duskProportion / (float) totalDuskMembers) * 100));
|
writeC(Math.round(((float) duskProportion / totalDuskMembers) * 100));
|
||||||
writeC(0);
|
writeC(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
writeC(Math.round(((float) duskProportion / (float) totalDuskMembers) * 100));
|
writeC(Math.round(((float) duskProportion / totalDuskMembers) * 100));
|
||||||
writeC(Math.round(((float) dawnProportion / (float) totalDawnMembers) * 100));
|
writeC(Math.round(((float) dawnProportion / totalDawnMembers) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1345,7 +1345,7 @@ public final class Formulas
|
|||||||
env.skill = skill;
|
env.skill = skill;
|
||||||
env.value = damage;
|
env.value = damage;
|
||||||
func.calc(env);
|
func.calc(env);
|
||||||
damage = (int) env.value;
|
damage = env.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1069,7 +1069,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.valueOf(Util.roundTo(((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100, 2)));
|
adminReply.replace("%percent%", String.valueOf(Util.roundTo(((float) player.getCurrentLoad() / player.getMaxLoad()) * 100, 2)));
|
||||||
adminReply.replace("%patk%", String.valueOf((int) player.getPAtk(null)));
|
adminReply.replace("%patk%", String.valueOf((int) player.getPAtk(null)));
|
||||||
adminReply.replace("%matk%", String.valueOf((int) player.getMAtk(null, null)));
|
adminReply.replace("%matk%", String.valueOf((int) player.getMAtk(null, null)));
|
||||||
adminReply.replace("%pdef%", String.valueOf((int) player.getPDef(null)));
|
adminReply.replace("%pdef%", String.valueOf((int) player.getPDef(null)));
|
||||||
|
@ -1297,10 +1297,10 @@ public class SevenSigns
|
|||||||
int newSealOwner = CABAL_NULL;
|
int newSealOwner = CABAL_NULL;
|
||||||
final int dawnProportion = getSealProportion(currSeal, CABAL_DAWN);
|
final int dawnProportion = getSealProportion(currSeal, CABAL_DAWN);
|
||||||
final int totalDawnMembers = getTotalMembers(CABAL_DAWN) == 0 ? 1 : getTotalMembers(CABAL_DAWN);
|
final int totalDawnMembers = getTotalMembers(CABAL_DAWN) == 0 ? 1 : getTotalMembers(CABAL_DAWN);
|
||||||
final int dawnPercent = Math.round(((float) dawnProportion / (float) totalDawnMembers) * 100);
|
final int dawnPercent = Math.round(((float) dawnProportion / totalDawnMembers) * 100);
|
||||||
final int duskProportion = getSealProportion(currSeal, CABAL_DUSK);
|
final int duskProportion = getSealProportion(currSeal, CABAL_DUSK);
|
||||||
final int totalDuskMembers = getTotalMembers(CABAL_DUSK) == 0 ? 1 : getTotalMembers(CABAL_DUSK);
|
final int totalDuskMembers = getTotalMembers(CABAL_DUSK) == 0 ? 1 : getTotalMembers(CABAL_DUSK);
|
||||||
final int duskPercent = Math.round(((float) duskProportion / (float) totalDuskMembers) * 100);
|
final int duskPercent = Math.round(((float) duskProportion / totalDuskMembers) * 100);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If a Seal was already closed or owned by the opponent and the new winner wants to assume ownership of the Seal, 35% or more of the members of the Cabal must have chosen the Seal.<br>
|
* If a Seal was already closed or owned by the opponent and the new winner wants to assume ownership of the Seal, 35% or more of the members of the Cabal must have chosen the Seal.<br>
|
||||||
|
@ -1410,7 +1410,7 @@ public final class FourSepulchersManager
|
|||||||
|
|
||||||
protected byte minuteSelect(byte min)
|
protected byte minuteSelect(byte min)
|
||||||
{
|
{
|
||||||
if (((double) min % 5) != 0) // if doesn't divides on 5 fully
|
if ((min % 5) != 0) // if doesn't divides on 5 fully
|
||||||
{
|
{
|
||||||
// mad table for selecting proper minutes...
|
// mad table for selecting proper minutes...
|
||||||
// may be there is a better way to do this
|
// may be there is a better way to do this
|
||||||
|
@ -172,7 +172,7 @@ public class CharStat
|
|||||||
*/
|
*/
|
||||||
public int getCriticalHit(L2Character target, Skill skill)
|
public int getCriticalHit(L2Character target, Skill skill)
|
||||||
{
|
{
|
||||||
double val = (int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill);
|
double val = calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill);
|
||||||
if (!_activeChar.canOverrideCond(PcCondOverride.MAX_STATS_VALUE))
|
if (!_activeChar.canOverrideCond(PcCondOverride.MAX_STATS_VALUE))
|
||||||
{
|
{
|
||||||
val = Math.min(val, Config.MAX_PCRIT_RATE);
|
val = Math.min(val, Config.MAX_PCRIT_RATE);
|
||||||
|
@ -186,7 +186,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
_enchantLevel = 0;
|
_enchantLevel = 0;
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
@ -210,7 +210,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
setCount(1);
|
setCount(1);
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1058,7 +1058,7 @@ public final class Formulas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rate = (int) attacker.getStat().calcStat(Stats.CRITICAL_RATE_POS, attacker.getStat().getCriticalHit(target, null));
|
rate = attacker.getStat().calcStat(Stats.CRITICAL_RATE_POS, attacker.getStat().getCriticalHit(target, null));
|
||||||
}
|
}
|
||||||
return (target.getStat().calcStat(Stats.DEFENCE_CRITICAL_RATE, rate, null, null) + target.getStat().calcStat(Stats.DEFENCE_CRITICAL_RATE_ADD, 0, null, null)) > Rnd.get(1000);
|
return (target.getStat().calcStat(Stats.DEFENCE_CRITICAL_RATE, rate, null, null) + target.getStat().calcStat(Stats.DEFENCE_CRITICAL_RATE_ADD, 0, null, null)) > Rnd.get(1000);
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,6 @@ public class FuncAtkEvasion extends AbstractFunction
|
|||||||
value += (level - 69) + 2;
|
value += (level - 69) + 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (int) value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -137,8 +137,8 @@ public class SSQStatus implements IClientOutgoingPacket
|
|||||||
|
|
||||||
if (totalOverallScore != 0)
|
if (totalOverallScore != 0)
|
||||||
{
|
{
|
||||||
dawnPercent = Math.round(((float) dawnTotalScore / (float) totalOverallScore) * 100);
|
dawnPercent = Math.round(((float) dawnTotalScore / totalOverallScore) * 100);
|
||||||
duskPercent = Math.round(((float) duskTotalScore / (float) totalOverallScore) * 100);
|
duskPercent = Math.round(((float) duskTotalScore / totalOverallScore) * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DUSK */
|
/* DUSK */
|
||||||
@ -238,20 +238,20 @@ public class SSQStatus implements IClientOutgoingPacket
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
packet.writeC(0);
|
packet.writeC(0);
|
||||||
packet.writeC(Math.round(((float) dawnProportion / (float) totalDawnMembers) * 100));
|
packet.writeC(Math.round(((float) dawnProportion / totalDawnMembers) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (totalDawnMembers == 0)
|
if (totalDawnMembers == 0)
|
||||||
{
|
{
|
||||||
packet.writeC(Math.round(((float) duskProportion / (float) totalDuskMembers) * 100));
|
packet.writeC(Math.round(((float) duskProportion / totalDuskMembers) * 100));
|
||||||
packet.writeC(0);
|
packet.writeC(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
packet.writeC(Math.round(((float) duskProportion / (float) totalDuskMembers) * 100));
|
packet.writeC(Math.round(((float) duskProportion / totalDuskMembers) * 100));
|
||||||
packet.writeC(Math.round(((float) dawnProportion / (float) totalDawnMembers) * 100));
|
packet.writeC(Math.round(((float) dawnProportion / totalDawnMembers) * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1155,7 +1155,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100)));
|
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / player.getMaxLoad()) * 100)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
||||||
|
@ -199,7 +199,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
super.setName(_item.getName());
|
super.setName(_item.getName());
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
||||||
|
|
||||||
// Masks
|
// Masks
|
||||||
public static final byte SEND_ONE = (byte) 0x00;
|
public static final byte SEND_ONE = 0x00;
|
||||||
public static final byte SEND_DEFAULT = (byte) 0x01;
|
public static final byte SEND_DEFAULT = 0x01;
|
||||||
public static final byte SEND_MULTI = (byte) 0x04;
|
public static final byte SEND_MULTI = 0x04;
|
||||||
|
|
||||||
protected static class Relation
|
protected static class Relation
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private Relation _singled;
|
private Relation _singled;
|
||||||
private final List<Relation> _multi;
|
private final List<Relation> _multi;
|
||||||
private byte _mask = (byte) 0x00;
|
private byte _mask = 0x00;
|
||||||
|
|
||||||
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
||||||
{
|
{
|
||||||
|
@ -1155,7 +1155,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100)));
|
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / player.getMaxLoad()) * 100)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
||||||
|
@ -199,7 +199,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
super.setName(_item.getName());
|
super.setName(_item.getName());
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
||||||
|
|
||||||
// Masks
|
// Masks
|
||||||
public static final byte SEND_ONE = (byte) 0x00;
|
public static final byte SEND_ONE = 0x00;
|
||||||
public static final byte SEND_DEFAULT = (byte) 0x01;
|
public static final byte SEND_DEFAULT = 0x01;
|
||||||
public static final byte SEND_MULTI = (byte) 0x04;
|
public static final byte SEND_MULTI = 0x04;
|
||||||
|
|
||||||
protected static class Relation
|
protected static class Relation
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private Relation _singled;
|
private Relation _singled;
|
||||||
private final List<Relation> _multi;
|
private final List<Relation> _multi;
|
||||||
private byte _mask = (byte) 0x00;
|
private byte _mask = 0x00;
|
||||||
|
|
||||||
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
||||||
{
|
{
|
||||||
|
@ -1155,7 +1155,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
|
||||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||||
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100)));
|
adminReply.replace("%percent%", String.format("%.2f", (((float) player.getCurrentLoad() / player.getMaxLoad()) * 100)));
|
||||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
adminReply.replace("%patk%", String.valueOf(player.getPAtk()));
|
||||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
adminReply.replace("%matk%", String.valueOf(player.getMAtk()));
|
||||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
adminReply.replace("%pdef%", String.valueOf(player.getPDef()));
|
||||||
|
@ -199,7 +199,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
_type2 = 0;
|
_type2 = 0;
|
||||||
_dropTime = 0;
|
_dropTime = 0;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public final class L2ItemInstance extends L2Object
|
|||||||
super.setName(_item.getName());
|
super.setName(_item.getName());
|
||||||
_loc = ItemLocation.VOID;
|
_loc = ItemLocation.VOID;
|
||||||
_mana = _item.getDuration();
|
_mana = _item.getDuration();
|
||||||
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + ((long) _item.getTime() * 60 * 1000);
|
_time = _item.getTime() == -1 ? -1 : System.currentTimeMillis() + (_item.getTime() * 60 * 1000);
|
||||||
scheduleLifeTimeTask();
|
scheduleLifeTimeTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon
|
||||||
|
|
||||||
// Masks
|
// Masks
|
||||||
public static final byte SEND_ONE = (byte) 0x00;
|
public static final byte SEND_ONE = 0x00;
|
||||||
public static final byte SEND_DEFAULT = (byte) 0x01;
|
public static final byte SEND_DEFAULT = 0x01;
|
||||||
public static final byte SEND_MULTI = (byte) 0x04;
|
public static final byte SEND_MULTI = 0x04;
|
||||||
|
|
||||||
protected static class Relation
|
protected static class Relation
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ public final class RelationChanged implements IClientOutgoingPacket
|
|||||||
|
|
||||||
private Relation _singled;
|
private Relation _singled;
|
||||||
private final List<Relation> _multi;
|
private final List<Relation> _multi;
|
||||||
private byte _mask = (byte) 0x00;
|
private byte _mask = 0x00;
|
||||||
|
|
||||||
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
public RelationChanged(L2Playable activeChar, int relation, boolean autoattackable)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user