Proper syntax for several methods and values.

This commit is contained in:
MobiusDevelopment
2020-01-26 14:05:47 +00:00
parent 8e7ecd2ac0
commit 9d155febb7
6555 changed files with 39425 additions and 39342 deletions
@@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.actor.instance.RecipeInstance;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
@@ -204,7 +204,7 @@ public class RecipeController
_skillLevel = _player.getSkillLevel(_skillId);
_skill = _player.getKnownSkill(_skillId);
_player.setIsCrafting(true);
_player.setCrafting(true);
if (_player.isAlikeDead())
{
@@ -314,7 +314,7 @@ public class RecipeController
updateCurMp();
updateCurLoad();
_player.setIsCrafting(false);
_player.setCrafting(false);
_isValid = true;
}
@@ -459,7 +459,7 @@ public class RecipeController
updateCurMp();
updateCurLoad();
_activeMakers.remove(_player);
_player.setIsCrafting(false);
_player.setCrafting(false);
_target.sendPacket(new ItemList(_target, false));
}
@@ -594,7 +594,7 @@ public class RecipeController
private void abort()
{
updateMakeInfo(false);
_player.setIsCrafting(false);
_player.setCrafting(false);
_activeMakers.remove(_player);
}
@@ -712,7 +712,7 @@ public class RecipeController
// you can use ALT_GAME_CREATION_XP_RATE/SP to
// modify XP/SP gained (default = 1)
_player.addExpAndSp((int) _player.calcStat(Stats.EXPSP_RATE, exp * Config.ALT_GAME_CREATION_XP_RATE * Config.ALT_GAME_CREATION_SPEED, null, null), (int) _player.calcStat(Stats.EXPSP_RATE, sp * Config.ALT_GAME_CREATION_SP_RATE * Config.ALT_GAME_CREATION_SPEED, null, null));
_player.addExpAndSp((int) _player.calcStat(Stat.EXPSP_RATE, exp * Config.ALT_GAME_CREATION_XP_RATE * Config.ALT_GAME_CREATION_SPEED, null, null), (int) _player.calcStat(Stat.EXPSP_RATE, sp * Config.ALT_GAME_CREATION_SP_RATE * Config.ALT_GAME_CREATION_SPEED, null, null));
}
updateMakeInfo(true); // success
}
@@ -725,7 +725,7 @@ public class RecipeController
if ((recipeList == null) || (recipeList.getRecipes().length == 0))
{
player.sendMessage("No recipe for: " + id);
player.setIsCrafting(false);
player.setCrafting(false);
return null;
}
return recipeList;
@@ -592,14 +592,14 @@ public class AttackableAI extends CreatureAI
if (distance2 > (Config.MAX_DRIFT_RANGE * Config.MAX_DRIFT_RANGE))
{
npc.setisReturningToSpawnPoint(true);
npc.setReturningToSpawnPoint(true);
final float delay = (float) Math.sqrt(distance2) / Config.MAX_DRIFT_RANGE;
x1 = _actor.getX() + (int) ((x1 - _actor.getX()) / delay);
y1 = _actor.getY() + (int) ((y1 - _actor.getY()) / delay);
}
else
{
npc.setisReturningToSpawnPoint(false);
npc.setReturningToSpawnPoint(false);
}
}
else
@@ -422,7 +422,7 @@ public class CreatureAI extends AbstractAI
return;
}
if (_actor.isImobilised() || _actor.isRooted())
if (_actor.isImmobilized() || _actor.isRooted())
{
// Cancel action client side by sending Server->Client packet ActionFailed to the PlayerInstance actor
clientActionFailed();
@@ -162,7 +162,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
@Override
public void changeIntention(CtrlIntention intention, Object arg0, Object arg1)
{
((Attackable) _actor).setisReturningToSpawnPoint(false);
((Attackable) _actor).setReturningToSpawnPoint(false);
if (intention == AI_INTENTION_IDLE /* || intention == AI_INTENTION_ACTIVE */) // active becomes idle if only a summon is present
{
@@ -265,7 +265,7 @@ public class OfflineTradeTable
player.sitDown();
if (Config.OFFLINE_MODE_SET_INVULNERABLE)
{
player.setIsInvul(true);
player.setInvul(true);
}
if (Config.OFFLINE_SET_NAME_COLOR)
{
@@ -522,13 +522,13 @@ public class MapRegionTable
{
// If Teleporting to castle or
// If is on caslte with siege and player's clan is defender
if ((teleportWhere == TeleportWhereType.Castle) || ((teleportWhere == TeleportWhereType.Castle) && castle.getSiege().getIsInProgress() && (castle.getSiege().getDefenderClan(player.getClan()) != null)))
if ((teleportWhere == TeleportWhereType.Castle) || ((teleportWhere == TeleportWhereType.Castle) && castle.getSiege().isInProgress() && (castle.getSiege().getDefenderClan(player.getClan()) != null)))
{
coord = castle.getZone().getSpawn();
return new Location(coord[0], coord[1], coord[2]);
}
if ((teleportWhere == TeleportWhereType.SiegeFlag) && castle.getSiege().getIsInProgress())
if ((teleportWhere == TeleportWhereType.SiegeFlag) && castle.getSiege().isInProgress())
{
// Check if player's clan is attacker
final List<NpcInstance> flags = castle.getSiege().getFlag(player.getClan());
@@ -545,13 +545,13 @@ public class MapRegionTable
{
// teleporting to castle or fortress
// is on caslte with siege and player's clan is defender
if ((teleportWhere == TeleportWhereType.Fortress) || ((teleportWhere == TeleportWhereType.Fortress) && fort.getSiege().getIsInProgress() && (fort.getSiege().getDefenderClan(player.getClan()) != null)))
if ((teleportWhere == TeleportWhereType.Fortress) || ((teleportWhere == TeleportWhereType.Fortress) && fort.getSiege().isInProgress() && (fort.getSiege().getDefenderClan(player.getClan()) != null)))
{
coord = fort.getZone().getSpawn();
return new Location(coord[0], coord[1], coord[2]);
}
if ((teleportWhere == TeleportWhereType.SiegeFlag) && fort.getSiege().getIsInProgress())
if ((teleportWhere == TeleportWhereType.SiegeFlag) && fort.getSiege().isInProgress())
{
// check if player's clan is attacker
final List<NpcInstance> flags = fort.getSiege().getFlag(player.getClan());
@@ -36,8 +36,8 @@ import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.StatsSet;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.base.ClassId;
import org.l2jmobius.gameserver.model.skills.BaseStats;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.BaseStat;
import org.l2jmobius.gameserver.model.skills.Stat;
/**
* @version $Revision: 1.8.2.6.2.9 $ $Date: 2005/04/06 16:13:25 $
@@ -504,12 +504,12 @@ public class NpcTable
npcDat.set("baseRunSpd", npcData.getInt("runspd"));
// constants, until we have stats in DB
npcDat.safeSet("baseSTR", npcData.getInt("str"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseCON", npcData.getInt("con"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseDEX", npcData.getInt("dex"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseINT", npcData.getInt("int"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseWIT", npcData.getInt("wit"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseMEN", npcData.getInt("men"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseSTR", npcData.getInt("str"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseCON", npcData.getInt("con"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseDEX", npcData.getInt("dex"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseINT", npcData.getInt("int"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseWIT", npcData.getInt("wit"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.safeSet("baseMEN", npcData.getInt("men"), 0, BaseStat.MAX_STAT_VALUE, "Loading npc template id: " + npcData.getInt("idTemplate"));
npcDat.set("baseCpMax", 0);
@@ -522,9 +522,9 @@ public class NpcTable
npcDat.set("absorb_type", npcData.getString("absorb_type"));
final NpcTemplate template = new NpcTemplate(npcDat, custom);
template.addVulnerability(Stats.BOW_WPN_VULN, 1);
template.addVulnerability(Stats.BLUNT_WPN_VULN, 1);
template.addVulnerability(Stats.DAGGER_WPN_VULN, 1);
template.addVulnerability(Stat.BOW_WPN_VULN, 1);
template.addVulnerability(Stat.BLUNT_WPN_VULN, 1);
template.addVulnerability(Stat.DAGGER_WPN_VULN, 1);
_npcs.put(id, template);
}
@@ -60,7 +60,7 @@ public class TeleportLocationTable
teleport.setY(rset.getInt("loc_y"));
teleport.setZ(rset.getInt("loc_z"));
teleport.setPrice(rset.getInt("price"));
teleport.setIsForNoble(rset.getInt("fornoble") == 1);
teleport.setForNoble(rset.getInt("fornoble") == 1);
_teleports.put(teleport.getTeleId(), teleport);
}
@@ -93,7 +93,7 @@ public class TeleportLocationTable
teleport.setY(rset.getInt("loc_y"));
teleport.setZ(rset.getInt("loc_z"));
teleport.setPrice(rset.getInt("price"));
teleport.setIsForNoble(rset.getInt("fornoble") == 1);
teleport.setForNoble(rset.getInt("fornoble") == 1);
_teleports.put(teleport.getTeleId(), teleport);
}
@@ -339,14 +339,13 @@ public class AdminData implements IXmlReader
public boolean isGmOnline(boolean includeHidden)
{
for (boolean b : _gmList.values())
for (boolean value : _gmList.values())
{
if (includeHidden || !b)
if (includeHidden || !value)
{
return true;
}
}
return false;
}
@@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.datatables.SkillTable;
import org.l2jmobius.gameserver.model.Augmentation;
import org.l2jmobius.gameserver.model.Skill;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
/**
* This class manages the augmentation data and can also create new augmentations.
@@ -260,7 +260,7 @@ public class AugmentationData
}
// store this stat
_augmentationStats[(i - 1)].add(new augmentationStat(Stats.valueOfXml(statName), soloValues, combinedValues));
_augmentationStats[(i - 1)].add(new augmentationStat(Stat.valueOfXml(statName), soloValues, combinedValues));
}
}
}
@@ -452,16 +452,16 @@ public class AugmentationData
public class AugStat
{
private final Stats _stat;
private final Stat _stat;
private final float _value;
public AugStat(Stats stat, float value)
public AugStat(Stat stat, float value)
{
_stat = stat;
_value = value;
}
public Stats getStat()
public Stat getStat()
{
return _stat;
}
@@ -546,7 +546,7 @@ public class AugmentationData
// get 2nd stat
as = _augmentationStats[block].get(rescales + stats[i]);
if (as.getStat() == Stats.CRITICAL_DAMAGE)
if (as.getStat() == Stat.CRITICAL_DAMAGE)
{
temp.add(new AugStat(as.getStat(), as.getCombinedStatValue(subblock)));
}
@@ -563,22 +563,22 @@ public class AugmentationData
{
case BASESTAT_STR:
{
temp.add(new AugStat(Stats.STAT_STR, 1.0f));
temp.add(new AugStat(Stat.STAT_STR, 1.0f));
break;
}
case BASESTAT_CON:
{
temp.add(new AugStat(Stats.STAT_CON, 1.0f));
temp.add(new AugStat(Stat.STAT_CON, 1.0f));
break;
}
case BASESTAT_INT:
{
temp.add(new AugStat(Stats.STAT_INT, 1.0f));
temp.add(new AugStat(Stat.STAT_INT, 1.0f));
break;
}
case BASESTAT_MEN:
{
temp.add(new AugStat(Stats.STAT_MEN, 1.0f));
temp.add(new AugStat(Stat.STAT_MEN, 1.0f));
break;
}
}
@@ -619,13 +619,13 @@ public class AugmentationData
public class augmentationStat
{
private final Stats _stat;
private final Stat _stat;
private final int _singleSize;
private final int _combinedSize;
private final float[] _singleValues;
private final float[] _combinedValues;
public augmentationStat(Stats stat, float[] sValues, float[] cValues)
public augmentationStat(Stat stat, float[] sValues, float[] cValues)
{
_stat = stat;
_singleSize = sValues.length;
@@ -664,7 +664,7 @@ public class AugmentationData
return _combinedValues[i];
}
public Stats getStat()
public Stat getStat()
{
return _stat;
}
@@ -42,7 +42,7 @@ import org.l2jmobius.gameserver.model.items.Weapon;
import org.l2jmobius.gameserver.model.items.type.ArmorType;
import org.l2jmobius.gameserver.model.items.type.WeaponType;
import org.l2jmobius.gameserver.model.skills.Env;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.model.skills.conditions.Condition;
import org.l2jmobius.gameserver.model.skills.conditions.ConditionElementSeed;
import org.l2jmobius.gameserver.model.skills.conditions.ConditionForceBuff;
@@ -207,7 +207,7 @@ public abstract class DocumentBase
protected void attachFunc(Node n, Object template, String name, Condition attachCond)
{
final Stats stat = Stats.valueOfXml(n.getAttributes().getNamedItem("stat").getNodeValue());
final Stat stat = Stat.valueOfXml(n.getAttributes().getNamedItem("stat").getNodeValue());
final String order = n.getAttributes().getNamedItem("order").getNodeValue();
final Lambda lambda = getLambda(n, template);
final int ord = Integer.decode(getValue(order, template));
@@ -752,7 +752,7 @@ public abstract class DocumentBase
protected Condition parseSkillCondition(Node n)
{
final NamedNodeMap attrs = n.getAttributes();
final Stats stat = Stats.valueOfXml(attrs.getNamedItem("stat").getNodeValue());
final Stat stat = Stat.valueOfXml(attrs.getNamedItem("stat").getNodeValue());
return new ConditionSkillStats(stat);
}
@@ -902,22 +902,22 @@ public abstract class DocumentBase
{
if (val.equalsIgnoreCase("$player_level"))
{
return new LambdaStats(LambdaStats.StatsType.PLAYER_LEVEL);
return new LambdaStats(LambdaStats.StatType.PLAYER_LEVEL);
}
if (val.equalsIgnoreCase("$target_level"))
{
return new LambdaStats(LambdaStats.StatsType.TARGET_LEVEL);
return new LambdaStats(LambdaStats.StatType.TARGET_LEVEL);
}
if (val.equalsIgnoreCase("$player_max_hp"))
{
return new LambdaStats(LambdaStats.StatsType.PLAYER_MAX_HP);
return new LambdaStats(LambdaStats.StatType.PLAYER_MAX_HP);
}
if (val.equalsIgnoreCase("$player_max_mp"))
{
return new LambdaStats(LambdaStats.StatsType.PLAYER_MAX_MP);
return new LambdaStats(LambdaStats.StatType.PLAYER_MAX_MP);
}
// try to find value out of item fields
@@ -203,7 +203,7 @@ public class AdminCTFEngine implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, Min lvl must be lower then Max");
return false;
}
if (CTF.set_minlvl(lvl))
if (CTF.setMinLvl(lvl))
{
showMainPage(activeChar);
return true;
@@ -234,7 +234,7 @@ public class AdminCTFEngine implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, Max lvl must be higher then Min");
return false;
}
if (CTF.setMaxlvl(lvl))
if (CTF.setMaxLvl(lvl))
{
showMainPage(activeChar);
return true;
@@ -336,7 +336,7 @@ public class AdminCTFEngine implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Usage: //ctf_reward <reward_id>");
return false;
}
if (CTF.set_rewardId(id))
if (CTF.setRewardId(id))
{
showMainPage(activeChar);
return true;
@@ -361,7 +361,7 @@ public class AdminCTFEngine implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Usage: //ctf_reward_amount <reward_amount>");
return false;
}
if (CTF.set_rewardAmount(amount))
if (CTF.setRewardAmount(amount))
{
showMainPage(activeChar);
return true;
@@ -754,18 +754,18 @@ public class AdminCTFEngine implements IAdminCommandHandler
replyMSG.append("Joining NPC ID:&nbsp;<font color=\"00FF00\">" + CTF.getNpcId() + " on pos " + npcLoc.getX() + "," + npcLoc.getY() + "," + npcLoc.getZ() + "</font><br1>");
replyMSG.append("<button value=\"Tele->NPC\" action=\"bypass -h admin_ctf_tele_npc\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"><br>");
replyMSG.append("Reward ID:&nbsp;<font color=\"00FF00\">" + CTF.get_rewardId() + "</font><br1>");
if (ItemTable.getInstance().getTemplate(CTF.get_rewardId()) != null)
replyMSG.append("Reward ID:&nbsp;<font color=\"00FF00\">" + CTF.getRewardId() + "</font><br1>");
if (ItemTable.getInstance().getTemplate(CTF.getRewardId()) != null)
{
replyMSG.append("Reward Item:&nbsp;<font color=\"00FF00\">" + ItemTable.getInstance().getTemplate(CTF.get_rewardId()).getName() + "</font><br1>");
replyMSG.append("Reward Item:&nbsp;<font color=\"00FF00\">" + ItemTable.getInstance().getTemplate(CTF.getRewardId()).getName() + "</font><br1>");
}
else
{
replyMSG.append("Reward Item:&nbsp;<font color=\"00FF00\">(unknown)</font><br1>");
}
replyMSG.append("Reward Amount:&nbsp;<font color=\"00FF00\">" + CTF.get_rewardAmount() + "</font><br>");
replyMSG.append("Min lvl:&nbsp;<font color=\"00FF00\">" + CTF.get_minlvl() + "</font><br1>");
replyMSG.append("Max lvl:&nbsp;<font color=\"00FF00\">" + CTF.getMaxlvl() + "</font><br><br>");
replyMSG.append("Reward Amount:&nbsp;<font color=\"00FF00\">" + CTF.getRewardAmount() + "</font><br>");
replyMSG.append("Min lvl:&nbsp;<font color=\"00FF00\">" + CTF.getMinLvl() + "</font><br1>");
replyMSG.append("Max lvl:&nbsp;<font color=\"00FF00\">" + CTF.getMaxLvl() + "</font><br><br>");
replyMSG.append("Min Players:&nbsp;<font color=\"00FF00\">" + CTF.getMinPlayers() + "</font><br1>");
replyMSG.append("Max Players:&nbsp;<font color=\"00FF00\">" + CTF.getMaxPlayers() + "</font><br>");
replyMSG.append("Joining Time:&nbsp;<font color=\"00FF00\">" + CTF.getJoinTime() + "</font><br1>");
@@ -306,18 +306,18 @@ public class AdminDMEngine implements IAdminCommandHandler
replyMSG.append("Max lvl:&nbsp;<font color=\"00FF00\">" + DM.getMaxlvl() + "</font><br><br>");
replyMSG.append("Death Match Color:&nbsp;<font color=\"00FF00\">" + DM.getPlayerColors() + "</font><br>");
final Location playerLoc = DM.get_playersSpawnLocation();
final Location playerLoc = DM.getPlayersSpawnLocation();
replyMSG.append("Death Match Spawn Pos:&nbsp;<font color=\"00FF00\">" + playerLoc.getX() + "," + playerLoc.getY() + "," + playerLoc.getZ() + "</font><br><br>");
replyMSG.append("Current players:<br1>");
if (!DM.is_started())
if (!DM.hasStarted())
{
replyMSG.append("<br1>");
replyMSG.append(DM._players.size() + " players participating.");
replyMSG.append("<br><br>");
}
else if (DM.is_started())
else if (DM.hasStarted())
{
replyMSG.append("<br1>");
replyMSG.append(DM._players.size() + " players in fighting event.");
@@ -70,14 +70,14 @@ public class AdminDelete implements IAdminCommandHandler
{
spawn.stopRespawn();
if (RaidBossSpawnManager.getInstance().isDefined(spawn.getNpcId()) && !spawn.is_customBossInstance())
if (RaidBossSpawnManager.getInstance().isDefined(spawn.getNpcId()) && !spawn.isCustomBossInstance())
{
RaidBossSpawnManager.getInstance().deleteSpawn(spawn, true);
}
else
{
boolean update = true;
if (GrandBossManager.getInstance().isDefined(spawn.getNpcId()) && spawn.is_customBossInstance())
if (GrandBossManager.getInstance().isDefined(spawn.getNpcId()) && spawn.isCustomBossInstance())
{
update = false;
}
@@ -243,7 +243,7 @@ public class AdminEffects implements IAdminCommandHandler
{
creature.startAbnormalEffect(0x0800);
}
creature.setIsParalyzed(true);
creature.setParalyzed(true);
final StopMove sm = new StopMove(creature);
creature.sendPacket(sm);
creature.broadcastPacket(sm);
@@ -263,7 +263,7 @@ public class AdminEffects implements IAdminCommandHandler
{
creature = (Creature) target;
creature.stopAbnormalEffect((short) 0x0400);
creature.setIsParalyzed(false);
creature.setParalyzed(false);
}
}
catch (Exception e)
@@ -279,7 +279,7 @@ public class AdminEffects implements IAdminCommandHandler
if (!player.isGM())
{
player.startAbnormalEffect(0x0400);
player.setIsParalyzed(true);
player.setParalyzed(true);
final StopMove sm = new StopMove(player);
player.sendPacket(sm);
player.broadcastPacket(sm);
@@ -297,7 +297,7 @@ public class AdminEffects implements IAdminCommandHandler
for (PlayerInstance player : activeChar.getKnownList().getKnownPlayers().values())
{
player.stopAbnormalEffect(0x0400);
player.setIsParalyzed(false);
player.setParalyzed(false);
}
}
catch (Exception e)
@@ -72,12 +72,12 @@ public class AdminInvul implements IAdminCommandHandler
String text;
if (activeChar.isInvul())
{
activeChar.setIsInvul(false);
activeChar.setInvul(false);
text = activeChar.getName() + " is now mortal.";
}
else
{
activeChar.setIsInvul(true);
activeChar.setInvul(true);
text = activeChar.getName() + " is now invulnerable.";
}
BuilderUtil.sendSysMessage(activeChar, text);
@@ -439,7 +439,7 @@ public class AdminSkill implements IAdminCommandHandler
showMainPage(activeChar);
}
private void adminAddSkill(PlayerInstance activeChar, String val)
private void adminAddSkill(PlayerInstance activeChar, String value)
{
final WorldObject target = activeChar.getTarget();
PlayerInstance player = null;
@@ -464,7 +464,7 @@ public class AdminSkill implements IAdminCommandHandler
return;
}
final StringTokenizer st = new StringTokenizer(val);
final StringTokenizer st = new StringTokenizer(value);
if (st.countTokens() != 2)
{
@@ -314,7 +314,7 @@ public class AdminSpawn implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "It will be spawned but not saved on Database");
BuilderUtil.sendSysMessage(activeChar, "After server restart or raid dead, the spawned npc will desappear");
permanent = false;
spawn.set_customBossInstance(true); // for raids, this value is used in order to segnalate to not save respawn time - status for custom instance
spawn.setCustomBossInstance(true); // for raids, this value is used in order to segnalate to not save respawn time - status for custom instance
}
if (RaidBossSpawnManager.getInstance().getValidTemplate(spawn.getNpcId()) != null)
@@ -611,7 +611,7 @@ public class AdminTeleport implements IAdminCommandHandler
}
final int respawnTime = spawn.getRespawnDelay() / 1000;
final boolean custom_boss_spawn = spawn.is_customBossInstance();
final boolean custom_boss_spawn = spawn.isCustomBossInstance();
target.deleteMe();
spawn.stopRespawn();
@@ -437,7 +437,7 @@ public class AdminTvTEngine implements IAdminCommandHandler
replyMSG.append("Max Players:&nbsp;<font color=\"00FF00\">" + TvT.getMaxPlayers() + "</font><br><br>");
replyMSG.append("Joining Time:&nbsp;<font color=\"00FF00\">" + TvT.getJoinTime() + "</font><br>");
replyMSG.append("Event Timer:&nbsp;<font color=\"00FF00\">" + TvT.getEventTime() + "</font><br><br>");
replyMSG.append("Interval Time:&nbsp;<font color=\"00FF00\">" + TvT.get_intervalBetweenMatches() + "</font><br><br>");
replyMSG.append("Interval Time:&nbsp;<font color=\"00FF00\">" + TvT.getIntervalBetweenMatches() + "</font><br><br>");
replyMSG.append("Current teams:<br1>");
replyMSG.append("<center><table border=\"0\">");
@@ -115,7 +115,7 @@ public class MercTicket implements IItemHandler
return;
}
if ((castle == null) || castle.getSiege().getIsInProgress())
if ((castle == null) || castle.getSiege().isInProgress())
{
player.sendMessage("You cannot hire mercenary while siege is in progress!");
return;
@@ -215,7 +215,7 @@ public class Potions implements IItemHandler
return;
}
if (activeChar._inEventDM && DM.is_started() && !Config.DM_ALLOW_POTIONS)
if (activeChar._inEventDM && DM.hasStarted() && !Config.DM_ALLOW_POTIONS)
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
@@ -137,7 +137,7 @@ public class Remedy implements IItemHandler
}
}
player.setIsImobilised(false);
player.setImmobilized(false);
if (player.getFirstEffect(Effect.EffectType.ROOT) == null)
{
@@ -109,7 +109,7 @@ public class ScrollOfEscape implements IItemHandler
return;
}
if (player._inEventDM && DM.is_started())
if (player._inEventDM && DM.hasStarted())
{
player.sendMessage("You can't use Scroll of Escape in DM.");
return;
@@ -229,7 +229,7 @@ public class ScrollOfEscape implements IItemHandler
_player.enableAllSkills();
_player.setIsIn7sDungeon(false);
_player.setIn7sDungeon(false);
try
{
@@ -103,7 +103,7 @@ public class ScrollOfResurrection implements IItemHandler
castle = CastleManager.getInstance().getCastle(targetPet.getX(), targetPet.getY(), targetPet.getZ());
}
if ((castle != null) && castle.getSiege().getIsInProgress())
if ((castle != null) && castle.getSiege().isInProgress())
{
condGood = false;
player.sendPacket(SystemMessageId.CANNOT_BE_RESURRECTED_DURING_SIEGE);
@@ -23,7 +23,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.items.Item;
import org.l2jmobius.gameserver.model.items.Weapon;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ExAutoSoulShot;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
@@ -97,7 +97,7 @@ public class SoulShots implements IItemHandler
}
// Consume Soulshots if player has enough of them
final int saSSCount = (int) player.getStat().calcStat(Stats.SOULSHOT_COUNT, 0, null, null);
final int saSSCount = (int) player.getStat().calcStat(Stat.SOULSHOT_COUNT, 0, null, null);
final int SSCount = saSSCount == 0 ? weaponItem.getSoulShotCount() : saSSCount;
if (!Config.DONT_DESTROY_SS && !player.destroyItemWithoutTrace("Consume", item.getObjectId(), SSCount, null, false))
@@ -67,7 +67,7 @@ public class SummonItems implements IItemHandler
return;
}
if (player._inEventDM && DM.is_started() && !Config.DM_ALLOW_SUMMON)
if (player._inEventDM && DM.hasStarted() && !Config.DM_ALLOW_SUMMON)
{
final ActionFailed af = ActionFailed.STATIC_PACKET;
player.sendPacket(af);
@@ -30,9 +30,9 @@ import org.l2jmobius.gameserver.model.actor.instance.SummonInstance;
import org.l2jmobius.gameserver.model.entity.olympiad.Olympiad;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.items.type.WeaponType;
import org.l2jmobius.gameserver.model.skills.BaseStats;
import org.l2jmobius.gameserver.model.skills.BaseStat;
import org.l2jmobius.gameserver.model.skills.Formulas;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@@ -147,7 +147,7 @@ public class Blow implements ISkillHandler
{
crit = true; // if there is not critical condition, calculate critical chance
}
else if (Formulas.calcCrit(skill.getBaseCritRate() * 10 * BaseStats.DEX.calcBonus(creature)))
else if (Formulas.calcCrit(skill.getBaseCritRate() * 10 * BaseStat.DEX.calcBonus(creature)))
{
crit = true;
}
@@ -172,7 +172,7 @@ public class Blow implements ISkillHandler
final Summon summon = player.getPet();
if ((summon instanceof SummonInstance) && Util.checkIfInRange(900, player, summon, true))
{
int tDmg = ((int) damage * (int) player.getStat().calcStat(Stats.TRANSFER_DAMAGE_PERCENT, 0, null, null)) / 100;
int tDmg = ((int) damage * (int) player.getStat().calcStat(Stat.TRANSFER_DAMAGE_PERCENT, 0, null, null)) / 100;
// Only transfer dmg up to current HP, it should not be killed
if (summon.getCurrentHp() < tDmg)
@@ -199,7 +199,7 @@ public class Blow implements ISkillHandler
player.abortAttack();
player.abortCast();
player.getStatus().stopHpMpRegeneration();
// player.setIsDead(true);
// player.setDead(true);
player.setIsPendingRevive(true);
if (player.getPet() != null)
{
@@ -68,7 +68,7 @@ public class ClanGate implements ISkillHandler
ThreadPool.schedule(new RemoveClanGate(castle.getCastleId(), player), skill.getTotalLifeTime());
castle.createClanGate(player.getX(), player.getY(), player.getZ() + 20);
player.getClan().broadcastToOnlineMembers(new SystemMessage(SystemMessageId.COURT_MAGICIAN_CREATED_PORTAL));
player.setIsParalyzed(true);
player.setParalyzed(true);
}
}
@@ -96,7 +96,7 @@ public class ClanGate implements ISkillHandler
{
if (player != null)
{
player.setIsParalyzed(false);
player.setParalyzed(false);
}
CastleManager.getInstance().getCastleById(castle).destroyClanGate();
}
@@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PetInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummonInstance;
import org.l2jmobius.gameserver.model.skills.Formulas;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@@ -233,7 +233,7 @@ public class Disablers implements ISkillHandler
if (target instanceof Attackable)
{
skill.getEffects(creature, target, ss, sps, bss);
final double aggdiff = ((Attackable) target).getHating(creature) - target.calcStat(Stats.AGGRESSION, ((Attackable) target).getHating(creature), target, skill);
final double aggdiff = ((Attackable) target).getHating(creature) - target.calcStat(Stat.AGGRESSION, ((Attackable) target).getHating(creature), target, skill);
if (skill.getPower() > 0)
{
((Attackable) target).reduceHate(null, (int) skill.getPower());
@@ -441,7 +441,7 @@ public class Disablers implements ISkillHandler
{
landrate = 90 - (4 * (target.getLevel() - lvlmodifier));
}
landrate = (int) target.calcStat(Stats.CANCEL_VULN, landrate, target, null);
landrate = (int) target.calcStat(Stat.CANCEL_VULN, landrate, target, null);
if (Rnd.get(100) < landrate)
{
final Effect[] effects = target.getAllEffects();
@@ -506,7 +506,7 @@ public class Disablers implements ISkillHandler
}
int landrate = (int) skill.getPower();
landrate = (int) target.calcStat(Stats.CANCEL_VULN, landrate, target, null);
landrate = (int) target.calcStat(Stat.CANCEL_VULN, landrate, target, null);
if (Rnd.get(100) < landrate)
{
final Effect[] effects = target.getAllEffects();
@@ -594,7 +594,7 @@ public class Disablers implements ISkillHandler
{
landrate = 90 - (4 * (target.getLevel() - lvlmodifier));
}
landrate = (int) target.calcStat(Stats.CANCEL_VULN, landrate, target, null);
landrate = (int) target.calcStat(Stat.CANCEL_VULN, landrate, target, null);
if (Rnd.get(100) < landrate)
{
negateEffect(target, SkillType.BUFF, -1);
@@ -697,7 +697,7 @@ public class Disablers implements ISkillHandler
{
landrate = 90 - (4 * (target.getLevel() - lvlmodifier));
}
landrate = (int) target.calcStat(Stats.CANCEL_VULN, landrate, target, null);
landrate = (int) target.calcStat(Stat.CANCEL_VULN, landrate, target, null);
if (Rnd.get(100) < landrate)
{
target.stopEffects(effectType);
@@ -28,7 +28,7 @@ import org.l2jmobius.gameserver.model.actor.instance.GrandBossInstance;
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.actor.instance.RaidBossInstance;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@@ -138,7 +138,7 @@ public class Heal implements ISkillHandler
}
else if (skill.getSkillType() != SkillType.HEAL_PERCENT)
{
hp *= target.calcStat(Stats.HEAL_EFFECTIVNESS, 100, null, null) / 100;
hp *= target.calcStat(Stat.HEAL_EFFECTIVNESS, 100, null, null) / 100;
}
target.setCurrentHp(hp + target.getCurrentHp());
@@ -22,7 +22,7 @@ import org.l2jmobius.gameserver.model.Skill.SkillType;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@@ -53,7 +53,7 @@ public class ManaHeal implements ISkillHandler
}
else
{
mp = (skill.getSkillType() == SkillType.MANARECHARGE) ? target.calcStat(Stats.RECHARGE_MP_RATE, mp, null, null) : mp;
mp = (skill.getSkillType() == SkillType.MANARECHARGE) ? target.calcStat(Stat.RECHARGE_MP_RATE, mp, null, null) : mp;
}
target.setLastHealAmount((int) mp);
@@ -34,7 +34,7 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.items.type.WeaponType;
import org.l2jmobius.gameserver.model.skills.BaseStats;
import org.l2jmobius.gameserver.model.skills.BaseStat;
import org.l2jmobius.gameserver.model.skills.Formulas;
import org.l2jmobius.gameserver.model.skills.effects.EffectCharge;
import org.l2jmobius.gameserver.network.SystemMessageId;
@@ -111,7 +111,7 @@ public class Pdam implements ISkillHandler
boolean crit = false;
if (skill.getBaseCritRate() > 0)
{
crit = Formulas.calcCrit(skill.getBaseCritRate() * 10 * BaseStats.STR.calcBonus(creature));
crit = Formulas.calcCrit(skill.getBaseCritRate() * 10 * BaseStat.STR.calcBonus(creature));
}
boolean soul = false;
@@ -93,7 +93,7 @@ public class Recall implements ISkillHandler
continue;
}
if ((targetChar._inEventCTF && CTF.isStarted()) || (targetChar._inEventTvT && TvT.isStarted()) || (targetChar._inEventDM && DM.is_started()) || (targetChar._inEventVIP && VIP._started))
if ((targetChar._inEventCTF && CTF.isStarted()) || (targetChar._inEventTvT && TvT.isStarted()) || (targetChar._inEventDM && DM.hasStarted()) || (targetChar._inEventVIP && VIP._started))
{
targetChar.sendMessage("You can't use escape skill in Event.");
continue;
@@ -85,8 +85,8 @@ public class SiegeFlag implements ISkillHandler
if (skill.isAdvancedFlag())
{
flag.set_advanceFlag(true);
flag.set_advanceMultiplier(skill.getAdvancedMultiplier());
flag.setAdvanceFlag(true);
flag.setAdvanceMultiplier(skill.getAdvancedMultiplier());
}
flag.setTitle(player.getClan().getName());
@@ -152,7 +152,7 @@ public class SiegeFlag implements ISkillHandler
{
sm.addString("You must be on castle ground to place a flag");
}
else if (!castle.getSiege().getIsInProgress())
else if (!castle.getSiege().isInProgress())
{
sm.addString("You can only place a flag during a siege.");
}
@@ -198,7 +198,7 @@ public class SiegeFlag implements ISkillHandler
{
sm.addString("You must be on fort ground to place a flag");
}
else if (!fort.getSiege().getIsInProgress())
else if (!fort.getSiege().isInProgress())
{
sm.addString("You can only place a flag during a siege.");
}
@@ -74,7 +74,7 @@ public class Spoil implements ISkillHandler
if (spoil)
{
target.setSpoil(true);
target.setIsSpoiledBy(creature.getObjectId());
target.setSpoiledBy(creature.getObjectId());
creature.sendPacket(new SystemMessage(SystemMessageId.SPOIL_SUCCESS));
}
else
@@ -192,7 +192,7 @@ public class StrSiegeAssault implements ISkillHandler
{
sm.addString("You must be on castle ground to use strider siege assault");
}
else if (!castle.getSiege().getIsInProgress())
else if (!castle.getSiege().isInProgress())
{
sm.addString("You can only use strider siege assault during a siege.");
}
@@ -231,7 +231,7 @@ public class StrSiegeAssault implements ISkillHandler
{
sm.addString("You must be on fort ground to use strider siege assault");
}
else if (!fort.getSiege().getIsInProgress())
else if (!fort.getSiege().isInProgress())
{
sm.addString("You can only use strider siege assault during a siege.");
}
@@ -71,7 +71,7 @@ public class SummonFriend implements ISkillHandler
activePlayer.sendMessage("You cannot use this skill in Event.");
return;
}
if (activePlayer._inEventDM && DM.is_started())
if (activePlayer._inEventDM && DM.hasStarted())
{
activePlayer.sendMessage("You cannot use this skill in Event.");
return;
@@ -138,7 +138,7 @@ public class TakeCastle implements ISkillHandler
{
sm.addString("You can only use this skill on an artifact");
}
else if (!castle.getSiege().getIsInProgress())
else if (!castle.getSiege().isInProgress())
{
sm.addString("You can only use this skill during a siege.");
}
@@ -190,7 +190,7 @@ public class TakeCastle implements ISkillHandler
{
sm.addString("You can only use this skill on an flagpole");
}
else if (!fort.getSiege().getIsInProgress())
else if (!fort.getSiege().isInProgress())
{
sm.addString("You can only use this skill during a siege.");
}
@@ -32,7 +32,7 @@ package org.l2jmobius.gameserver.handler.skillhandlers;
/*
* public static boolean checkIfOkToCastFlagDisplay(Creature creature, boolean isCheckOnly) { return checkIfOkToCastFlagDisplay(activeChar, FortManager.getInstance().getFort(activeChar), isCheckOnly); } public static boolean checkIfOkToCastFlagDisplay(Creature creature, Fort fort, boolean
* isCheckOnly) { if (activeChar == null || !(activeChar instanceof PlayerInstance)) return false; SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); PlayerInstance player = (PlayerInstance)activeChar; if (fort == null || fort.getFortId() <= 0)
* sm.addString("You must be on fort ground to use this skill"); else if (player.getTarget() == null && !(player.getTarget() instanceof ArtefactInstance)) sm.addString("You can only use this skill on an flagpole"); else if (!fort.getSiege().getIsInProgress())
* sm.addString("You must be on fort ground to use this skill"); else if (player.getTarget() == null && !(player.getTarget() instanceof ArtefactInstance)) sm.addString("You can only use this skill on an flagpole"); else if (!fort.getSiege().isInProgress())
* sm.addString("You can only use this skill during a siege."); else if (!Util.checkIfInRange(200, player, player.getTarget(), true)) sm.addString("You are not in range of the flagpole."); else if (fort.getSiege().getAttackerClan(player.getClan()) == null)
* sm.addString("You must be an attacker to use this skill"); else { if (!isCheckOnly) fort.getSiege().announceToPlayer("Clan " + player.getClan().getName() + " has begun to raise flag.", true); return true; } if (!isCheckOnly) { player.sendPacket(sm); } return false; } }
*/
@@ -68,7 +68,7 @@ public class Escape implements IUserCommandHandler
}
// Check to see if the current player is in DM Event.
if (player._inEventDM && DM.is_started())
if (player._inEventDM && DM.hasStarted())
{
player.sendMessage("You may not use an escape skill in DM.");
return false;
@@ -171,7 +171,7 @@ public class Escape implements IUserCommandHandler
return;
}
_player.setIsIn7sDungeon(false);
_player.setIn7sDungeon(false);
_player.enableAllSkills();
try
@@ -75,7 +75,7 @@ public class AwayCmd implements IVoicedCommandHandler
}
// Check if player is in Siege
if ((siege != null) && siege.getIsInProgress())
if ((siege != null) && siege.isInProgress())
{
activeChar.sendMessage("You are in siege, you can't go Afk.");
return false;
@@ -83,12 +83,12 @@ public class CTFCmd implements IVoicedCommandHandler
activeChar.sendMessage("You are not allowed to participate to the event because you are in Olympiad.");
return false;
}
else if (activeChar.getLevel() < CTF.get_minlvl())
else if (activeChar.getLevel() < CTF.getMinLvl())
{
activeChar.sendMessage("You are not allowed to participate to the event because your level is too low.");
return false;
}
else if (activeChar.getLevel() > CTF.getMaxlvl())
else if (activeChar.getLevel() > CTF.getMaxLvl())
{
activeChar.sendMessage("You are not allowed to participate to the event because your level is too high.");
return false;
@@ -162,16 +162,16 @@ public class CTFCmd implements IVoicedCommandHandler
if (CTF._playersShuffle.size() == 1)
{
activeChar.sendMessage("There is " + CTF._playersShuffle.size() + " player participating in this event.");
activeChar.sendMessage("Reward: " + CTF.get_rewardAmount() + " " + ItemTable.getInstance().getTemplate(CTF.get_rewardId()).getName() + " !");
activeChar.sendMessage("Player Min lvl: " + CTF.get_minlvl() + ".");
activeChar.sendMessage("Player Max lvl: " + CTF.getMaxlvl() + ".");
activeChar.sendMessage("Reward: " + CTF.getRewardAmount() + " " + ItemTable.getInstance().getTemplate(CTF.getRewardId()).getName() + " !");
activeChar.sendMessage("Player Min lvl: " + CTF.getMinLvl() + ".");
activeChar.sendMessage("Player Max lvl: " + CTF.getMaxLvl() + ".");
}
else
{
activeChar.sendMessage("There are " + CTF._playersShuffle.size() + " players participating in this event.");
activeChar.sendMessage("Reward: " + CTF.get_rewardAmount() + " " + ItemTable.getInstance().getTemplate(CTF.get_rewardId()).getName() + " !");
activeChar.sendMessage("Player Min lvl: " + CTF.get_minlvl() + ".");
activeChar.sendMessage("Player Max lvl: " + CTF.getMaxlvl() + ".");
activeChar.sendMessage("Reward: " + CTF.getRewardAmount() + " " + ItemTable.getInstance().getTemplate(CTF.getRewardId()).getName() + " !");
activeChar.sendMessage("Player Min lvl: " + CTF.getMinLvl() + ".");
activeChar.sendMessage("Player Max lvl: " + CTF.getMaxLvl() + ".");
}
return true;
}
@@ -98,7 +98,7 @@ public class DMCmd implements IVoicedCommandHandler
activeChar.sendMessage("You are not allowed to participate to the event because you have Karma.");
return false;
}
else if (DM.isTeleport() || DM.is_started())
else if (DM.isTeleport() || DM.hasStarted())
{
activeChar.sendMessage("DeathMatch Event registration period is over. You can't register now.");
return false;
@@ -123,7 +123,7 @@ public class DMCmd implements IVoicedCommandHandler
activeChar.sendMessage("There is no DeathMatch Event in progress.");
return false;
}
else if ((DM.isTeleport() || DM.is_started()) && activeChar._inEventDM)
else if ((DM.isTeleport() || DM.hasStarted()) && activeChar._inEventDM)
{
activeChar.sendMessage("You can not leave now because DeathMatch event has started.");
return false;
@@ -152,7 +152,7 @@ public class DMCmd implements IVoicedCommandHandler
activeChar.sendMessage("There is no DeathMatch Event in progress.");
return false;
}
else if (DM.isTeleport() || DM.is_started())
else if (DM.isTeleport() || DM.hasStarted())
{
activeChar.sendMessage("I can't provide you this info. Command available only in joining period.");
return false;
@@ -116,7 +116,7 @@ public class FarmPvpCmd implements IVoicedCommandHandler
}
final SetupGauge sg = new SetupGauge(SetupGauge.BLUE, 15000);
activeChar.sendPacket(sg);
activeChar.setIsImobilised(true);
activeChar.setImmobilized(true);
ThreadPool.schedule(new teleportTask(activeChar, placex, placey, placez, message), 15000);
@@ -156,7 +156,7 @@ public class FarmPvpCmd implements IVoicedCommandHandler
_player.teleToLocation(_x, _y, _z);
_player.sendMessage(_message);
_player.setIsImobilised(false);
_player.setImmobilized(false);
}
}
}
@@ -303,7 +303,7 @@ public class Wedding implements IVoicedCommandHandler
activeChar.sendMessage("Your partner is in the observation.");
return false;
}
else if ((partner.getClan() != null) && (CastleManager.getInstance().getCastleByOwner(partner.getClan()) != null) && CastleManager.getInstance().getCastleByOwner(partner.getClan()).getSiege().getIsInProgress())
else if ((partner.getClan() != null) && (CastleManager.getInstance().getCastleByOwner(partner.getClan()) != null) && CastleManager.getInstance().getCastleByOwner(partner.getClan()).getSiege().isInProgress())
{
activeChar.sendMessage("Your partner is in siege, you can't go to your partner.");
return false;
@@ -333,7 +333,7 @@ public class Wedding implements IVoicedCommandHandler
activeChar.sendMessage("You may not use go to love in CTF.");
return false;
}
if (activeChar._inEventDM && DM.is_started())
if (activeChar._inEventDM && DM.hasStarted())
{
activeChar.sendMessage("You may not use go to love in DM.");
return false;
@@ -353,7 +353,7 @@ public class Wedding implements IVoicedCommandHandler
activeChar.sendMessage("You are in the observation.");
return false;
}
else if ((activeChar.getClan() != null) && (CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null) && CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress())
else if ((activeChar.getClan() != null) && (CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null) && CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().isInProgress())
{
activeChar.sendMessage("You are in siege, you can't go to your partner.");
return false;
@@ -428,7 +428,7 @@ public class Wedding implements IVoicedCommandHandler
return;
}
_player.setIsIn7sDungeon(_to7sDungeon);
_player.setIn7sDungeon(_to7sDungeon);
_player.enableAllSkills();
try
@@ -69,13 +69,13 @@ public class AwayManager
public void setAway(PlayerInstance player, String text)
{
player.set_awaying(true);
player.setAwaying(true);
player.broadcastPacket(new SocialAction(player.getObjectId(), 9));
player.sendMessage("Your status is Away in " + Config.AWAY_TIMER + " Sec.");
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
final SetupGauge sg = new SetupGauge(SetupGauge.BLUE, Config.AWAY_TIMER * 1000);
player.sendPacket(sg);
player.setIsImobilised(true);
player.setImmobilized(true);
ThreadPool.schedule(new setPlayerAwayTask(player, text), Config.AWAY_TIMER * 1000);
}
@@ -132,7 +132,7 @@ public class AwayManager
_player.abortAttack();
_player.abortCast();
_player.setTarget(null);
_player.setIsImobilised(false);
_player.setImmobilized(false);
if (!_player.isSitting())
{
_player.sitDown();
@@ -158,9 +158,9 @@ public class AwayManager
}
_player.broadcastUserInfo();
_player.setIsParalyzed(true);
_player.setIsAway(true);
_player.set_awaying(false);
_player.setParalyzed(true);
_player.setAway(true);
_player.setAwaying(false);
}
}
@@ -187,9 +187,9 @@ public class AwayManager
return;
}
_player.setIsParalyzed(false);
_player.setParalyzed(false);
_player.enableAllSkills();
_player.setIsAway(false);
_player.setAway(false);
if (rd.isSitForced())
{
@@ -101,7 +101,7 @@ public class FortSiegeManager
{
sm.addString("You must be on fort ground to summon this");
}
else if (!fort.getSiege().getIsInProgress())
else if (!fort.getSiege().isInProgress())
{
sm.addString("You can only summon this during a siege.");
}
@@ -439,7 +439,7 @@ public class FortSiegeManager
{
for (Fort fort : FortManager.getInstance().getForts())
{
if (checkIsRegistered(clan, fort.getFortId()) && (fort.getSiege() != null) && fort.getSiege().getIsInProgress())
if (checkIsRegistered(clan, fort.getFortId()) && (fort.getSiege() != null) && fort.getSiege().isInProgress())
{
return true;
}
@@ -712,7 +712,7 @@ public class MercTicketManager
if (NPC_IDS[i] == npcId) // Find the index of the item used
{
// only handle tickets if a siege is not ongoing in this npc's castle
if ((castle != null) && !castle.getSiege().getIsInProgress())
if ((castle != null) && !castle.getSiege().isInProgress())
{
itemId = ITEM_IDS[i];
// create the ticket in the gameworld
@@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.model.StatsSet;
import org.l2jmobius.gameserver.model.actor.instance.RaidBossInstance;
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
import org.l2jmobius.gameserver.model.entity.Announcements;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.model.spawn.Spawn;
/**
@@ -241,7 +241,7 @@ public class RaidBossSpawnManager
final RaidBossInstance raidboss = bossId == 25328 ? DayNightSpawnManager.getInstance().handleBoss(spawnDat) : (RaidBossInstance) spawnDat.doSpawn();
if (raidboss != null)
{
final double bonus = raidboss.getStat().calcStat(Stats.MAX_HP, 1, raidboss, null);
final double bonus = raidboss.getStat().calcStat(Stat.MAX_HP, 1, raidboss, null);
// if new spawn, the currentHp is equal to maxHP/bonus, so set it to max
if ((int) (bonus * currentHP) == raidboss.getMaxHp())
@@ -67,8 +67,8 @@ public class SiegeManager
private int _siegeClanMinLevel = 4; // Changeable in siege.config
private int _siegeLength = 120; // Time in minute. Changeable in siege.config
private boolean _teleport_to_siege = false;
private boolean _teleport_to_siege_town = false;
private boolean _teleportToSiege = false;
private boolean _teleportToSiegeTown = false;
private SiegeManager()
{
@@ -103,7 +103,7 @@ public class SiegeManager
{
sm.addString("You must be on castle ground to summon this");
}
else if (!castle.getSiege().getIsInProgress())
else if (!castle.getSiege().isInProgress())
{
sm.addString("You can only summon this during a siege.");
}
@@ -129,7 +129,7 @@ public class SiegeManager
for (Castle castle : CastleManager.getInstance().getCastles())
{
if (checkIsRegistered(clan, castle.getCastleId()) && (castle.getSiege() != null) && castle.getSiege().getIsInProgress())
if (checkIsRegistered(clan, castle.getCastleId()) && (castle.getSiege() != null) && castle.getSiege().isInProgress())
{
return true;
}
@@ -208,8 +208,8 @@ public class SiegeManager
_siegeLength = Integer.decode(siegeSettings.getProperty("SiegeLength", "120"));
// Siege Teleports
_teleport_to_siege = Boolean.parseBoolean(siegeSettings.getProperty("AllowTeleportToSiege", "false"));
_teleport_to_siege_town = Boolean.parseBoolean(siegeSettings.getProperty("AllowTeleportToSiegeTown", "false"));
_teleportToSiege = Boolean.parseBoolean(siegeSettings.getProperty("AllowTeleportToSiege", "false"));
_teleportToSiegeTown = Boolean.parseBoolean(siegeSettings.getProperty("AllowTeleportToSiegeTown", "false"));
// Siege spawns settings
_controlTowerSpawnList = new HashMap<>();
@@ -384,19 +384,19 @@ public class SiegeManager
}
/**
* @return the _teleport_to_siege
* @return the _teleportToSiege
*/
public boolean is_teleport_to_siege_allowed()
public boolean isTeleportToSiegeAllowed()
{
return _teleport_to_siege;
return _teleportToSiege;
}
/**
* @return the _teleport_to_siege_town
* @return the _teleportToSiegeTown
*/
public boolean is_teleport_to_siege_town_allowed()
public boolean isTeleportToSiegeTownAllowed()
{
return _teleport_to_siege_town;
return _teleportToSiegeTown;
}
public class SiegeSpawn
@@ -234,7 +234,7 @@ public class TownManager
final Castle castle = CastleManager.getInstance().getCastles().get(CastleManager.getInstance().getCastleIndex(castleIndex));
if (castle != null)
{
return castle.getSiege().getIsInProgress();
return castle.getSiege().isInProgress();
}
}
return false;
@@ -272,7 +272,7 @@ public class TownManager
final Castle castle = CastleManager.getInstance().getCastles().get(CastleManager.getInstance().getCastleIndex(castleIndex));
if (castle != null)
{
return castle.getSiege().getIsInProgress();
return castle.getSiege().isInProgress();
}
}
return false;
@@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.datatables.SkillTable;
import org.l2jmobius.gameserver.datatables.xml.AugmentationData;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.model.skills.funcs.FuncAdd;
import org.l2jmobius.gameserver.model.skills.funcs.LambdaConst;
@@ -65,7 +65,7 @@ public class Augmentation
public class augmentationStatBonus
{
private final Stats[] _stats;
private final Stat[] _stats;
private final float[] _values;
private boolean _active;
@@ -74,7 +74,7 @@ public class Augmentation
_active = false;
final List<AugmentationData.AugStat> as = AugmentationData.getInstance().getAugStatsById(augmentationId);
_stats = new Stats[as.size()];
_stats = new Stat[as.size()];
_values = new float[as.size()];
int i = 0;
@@ -152,9 +152,9 @@ public class BlockList
return blockList.isBlockAll() || blockList.isInBlockList(targetId);
}
private void setBlockAll(boolean state)
private void setBlockAll(boolean value)
{
_owner.setInRefusalMode(state);
_owner.setInRefusalMode(value);
}
public List<Integer> getBlockList()
@@ -679,7 +679,7 @@ public abstract class Effect
return _template.showIcon;
}
public EffectState get_state()
public EffectState getState()
{
return _state;
}
@@ -95,7 +95,7 @@ public abstract class Inventory extends ItemContainer
final PlayerInstance owner = (PlayerInstance) getOwner();
if (item.getItemId() == 6408)
{
owner.setIsWearingFormalWear(false);
owner.setWearingFormalWear(false);
}
}
@@ -112,7 +112,7 @@ public abstract class Inventory extends ItemContainer
// If player equip Formal Wear unequip weapons and abort cast/attack
if (item.getItemId() == 6408)
{
owner.setIsWearingFormalWear(true);
owner.setWearingFormalWear(true);
if (owner.isCastingNow())
{
owner.abortCast();
@@ -33,9 +33,9 @@ public class NpcWalkerNode
private boolean _running;
public void setRunning(boolean val)
public void setRunning(boolean value)
{
_running = val;
_running = value;
}
public void setRouteId(int id)
@@ -48,34 +48,34 @@ public class NpcWalkerNode
_npcId = id;
}
public void setMovePoint(String val)
public void setMovePoint(String value)
{
_movePoint = val;
_movePoint = value;
}
public void setChatText(String val)
public void setChatText(String value)
{
_chatText = val;
_chatText = value;
}
public void setMoveX(int val)
public void setMoveX(int value)
{
_moveX = val;
_moveX = value;
}
public void setMoveY(int val)
public void setMoveY(int value)
{
_moveY = val;
_moveY = value;
}
public void setMoveZ(int val)
public void setMoveZ(int value)
{
_moveZ = val;
_moveZ = value;
}
public void setDelay(int val)
public void setDelay(int value)
{
_delay = val;
_delay = value;
}
public int getRouteId()
@@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.model.entity.sevensigns.SevenSignsFestival;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.partymatching.PartyMatchRoom;
import org.l2jmobius.gameserver.model.partymatching.PartyMatchRoomList;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import org.l2jmobius.gameserver.network.serverpackets.ExCloseMPCC;
@@ -125,11 +125,11 @@ public class Party
/**
* set invitation process flag and store time for expiration happens when: player join party or player decline to join
* @param val
* @param value
*/
public void setPendingInvitation(boolean val)
public void setPendingInvitation(boolean value)
{
_pendingInvitation = val;
_pendingInvitation = value;
_pendingInviteTimeout = GameTimeController.getGameTicks() + (PlayerInstance.REQUEST_TIMEOUT * GameTimeController.TICKS_PER_SECOND);
}
@@ -765,7 +765,7 @@ public class Party
// Add the XP/SP points to the requested party member
if (!member.isDead())
{
member.addExpAndSp(Math.round(member.calcStat(Stats.EXPSP_RATE, xpReward * preCalculation, null, null)), (int) member.calcStat(Stats.EXPSP_RATE, spReward * preCalculation, null, null));
member.addExpAndSp(Math.round(member.calcStat(Stat.EXPSP_RATE, xpReward * preCalculation, null, null)), (int) member.calcStat(Stat.EXPSP_RATE, spReward * preCalculation, null, null));
}
}
else
@@ -49,10 +49,10 @@ import org.l2jmobius.gameserver.model.entity.event.CTF;
import org.l2jmobius.gameserver.model.entity.event.DM;
import org.l2jmobius.gameserver.model.entity.event.TvT;
import org.l2jmobius.gameserver.model.entity.siege.Siege;
import org.l2jmobius.gameserver.model.skills.BaseStats;
import org.l2jmobius.gameserver.model.skills.BaseStat;
import org.l2jmobius.gameserver.model.skills.Env;
import org.l2jmobius.gameserver.model.skills.Formulas;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.model.skills.conditions.Condition;
import org.l2jmobius.gameserver.model.skills.effects.EffectCharge;
import org.l2jmobius.gameserver.model.skills.effects.EffectTemplate;
@@ -454,11 +454,11 @@ public abstract class Skill
private final boolean _ispotion;
private final int _element;
private final BaseStats _saveVs;
private final BaseStat _saveVs;
private final boolean _isSuicideAttack;
private final Stats _stat;
private final Stat _stat;
private final int _condition;
private final int _conditionValue;
@@ -560,7 +560,7 @@ public abstract class Skill
_negateId = set.getInt("negateId", 0);
_magicLevel = set.getInt("magicLvl", SkillTreeTable.getInstance().getMinSkillLevel(_id, _level));
_levelDepend = set.getInt("lvlDepend", 0);
_stat = set.getEnum("stat", Stats.class, null);
_stat = set.getEnum("stat", Stat.class, null);
_skillType = set.getEnum("skillType", SkillType.class);
_effectType = set.getEnum("effectType", SkillType.class, null);
@@ -569,7 +569,7 @@ public abstract class Skill
_effectLvl = set.getInt("effectLevel", 0);
_element = set.getInt("element", 0);
_saveVs = set.getEnum("saveVs", BaseStats.class, null);
_saveVs = set.getEnum("saveVs", BaseStat.class, null);
_condition = set.getInt("condition", 0);
_conditionValue = set.getInt("conditionValue", 0);
@@ -735,7 +735,7 @@ public abstract class Skill
return _skillType == SkillType.SIGNET_CASTTIME;
}
public BaseStats getSavevs()
public BaseStat getSavevs()
{
return _saveVs;
}
@@ -932,7 +932,7 @@ public abstract class Skill
/**
* @return the skill type (ex : BLEED, SLEEP, WATER...).
*/
public Stats getStat()
public Stat getStat()
{
return _stat;
}
@@ -2046,7 +2046,7 @@ public abstract class Skill
continue;
}
// check if allow interference is allowed if player is not on event but target is on event
if (((TvT.isStarted() && !Config.TVT_ALLOW_INTERFERENCE) || (CTF.isStarted() && !Config.CTF_ALLOW_INTERFERENCE) || (DM.is_started() && !Config.DM_ALLOW_INTERFERENCE))/* && !player.isGM() */)
if (((TvT.isStarted() && !Config.TVT_ALLOW_INTERFERENCE) || (CTF.isStarted() && !Config.CTF_ALLOW_INTERFERENCE) || (DM.hasStarted() && !Config.DM_ALLOW_INTERFERENCE))/* && !player.isGM() */)
{
if ((partyMember._inEventTvT && !player._inEventTvT) || (!partyMember._inEventTvT && player._inEventTvT))
{
@@ -2302,7 +2302,7 @@ public abstract class Skill
{
// check target is not in a active siege zone
final Siege siege = SiegeManager.getInstance().getSiege(newTarget);
if ((siege != null) && siege.getIsInProgress())
if ((siege != null) && siege.isInProgress())
{
continue;
}
@@ -69,11 +69,11 @@ public class TeleportLocation
}
/**
* @param val
* @param value
*/
public void setIsForNoble(boolean val)
public void setForNoble(boolean value)
{
_forNoble = val;
_forNoble = value;
}
/**
@@ -119,7 +119,7 @@ public class TeleportLocation
/**
* @return
*/
public boolean getIsForNoble()
public boolean isForNoble()
{
return _forNoble;
}
@@ -626,7 +626,7 @@ public class TradeList
}
final PlayerInstance player = (PlayerInstance) World.getInstance().findObject(_owner.getObjectId());
if ((player == null) || (player.get_instanceLoginTime() != _owner.get_instanceLoginTime()))
if ((player == null) || (player.getInstanceLoginTime() != _owner.getInstanceLoginTime()))
{
LOGGER.warning("Invalid owner of TradeList");
return false;
@@ -58,7 +58,7 @@ import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
import org.l2jmobius.gameserver.model.quest.EventType;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.Say2;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
@@ -297,7 +297,7 @@ public class Attackable extends NpcInstance
return _isReturningToSpawnPoint;
}
public void setisReturningToSpawnPoint(boolean value)
public void setReturningToSpawnPoint(boolean value)
{
_isReturningToSpawnPoint = value;
}
@@ -798,7 +798,7 @@ public class Attackable extends NpcInstance
// Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead())
{
attacker.addExpAndSp(Math.round(attacker.calcStat(Stats.EXPSP_RATE, exp, null, null)), (int) attacker.calcStat(Stats.EXPSP_RATE, sp, null, null));
attacker.addExpAndSp(Math.round(attacker.calcStat(Stat.EXPSP_RATE, exp, null, null)), (int) attacker.calcStat(Stat.EXPSP_RATE, sp, null, null));
}
}
}
@@ -1964,7 +1964,7 @@ public class Attackable extends NpcInstance
}
// Instant Item Drop :>
final double rateHp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
final double rateHp = getStat().calcStat(Stat.MAX_HP, 1, this, null);
if ((rateHp < 2) && npcTemplate.getType().contentEquals("Monster")) // only Monster with <= 1x HP can drop herbs
{
boolean hp = false;
@@ -101,7 +101,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.skills.Calculator;
import org.l2jmobius.gameserver.model.skills.Formulas;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.model.skills.effects.EffectCharge;
import org.l2jmobius.gameserver.model.skills.funcs.Func;
import org.l2jmobius.gameserver.model.skills.holders.ISkillsHolder;
@@ -167,9 +167,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
private boolean _isFlying = false; // Is flying Wyvern?
private boolean _isFallsdown = false; // Falls down
private boolean _isMuted = false; // Cannot use magic
private boolean _isPsychicalMuted = false; // Cannot use psychical skills
private boolean _isPhysicalMuted = false; // Cannot use psychical skills
private boolean _isKilledAlready = false;
private int _isImobilised = 0;
private int _isImmobilized = 0;
private boolean _isOverloaded = false; // the char is carrying too much
private boolean _isParalyzed = false;
private boolean _isRiding = false; // Is Riding strider?
@@ -290,7 +290,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
if (!Config.NPC_ATTACKABLE || (!(this instanceof Attackable) && !(this instanceof ControlTowerInstance) && !(this instanceof SiegeFlagInstance) && !(this instanceof EffectPointInstance)))
{
setIsInvul(true);
setInvul(true);
}
}
else // not NpcInstance
@@ -299,12 +299,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
_skills = new ConcurrentHashMap<>();
// If Creature is a PlayerInstance or a Summon, create the basic calculator set
_calculators = new Calculator[Stats.NUM_STATS];
_calculators = new Calculator[Stat.NUM_STATS];
Formulas.getInstance().addFuncsToNewCharacter(this);
if (!(this instanceof Attackable) && !isAttackable() && !(this instanceof DoorInstance))
{
setIsInvul(true);
setInvul(true);
}
}
}
@@ -359,7 +359,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
spawnMe(getPosition().getX(), getPosition().getY(), getPosition().getZ());
}
setIsTeleporting(false);
setTeleporting(false);
if (_isPendingRevive)
{
@@ -680,7 +680,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
abortAttack();
abortCast();
setIsTeleporting(true);
setTeleporting(true);
setTarget(null);
// Remove from world regions zones
@@ -998,7 +998,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
if (_disableBowAttackEndTime <= GameTimeController.getGameTicks())
{
// Verify if PlayerInstance owns enough MP
final int saMpConsume = (int) getStat().calcStat(Stats.MP_CONSUME, 0, null, null);
final int saMpConsume = (int) getStat().calcStat(Stat.MP_CONSUME, 0, null, null);
final int mpConsume = saMpConsume == 0 ? weaponItem.getMpConsume() : saMpConsume;
if (getStatus().getCurrentMp() < mpConsume)
@@ -1367,8 +1367,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
double angleChar;
double angleTarget;
final int maxRadius = (int) getStat().calcStat(Stats.POWER_ATTACK_RANGE, 66, null, null);
final int maxAngleDiff = (int) getStat().calcStat(Stats.POWER_ATTACK_ANGLE, 120, null, null);
final int maxRadius = (int) getStat().calcStat(Stat.POWER_ATTACK_RANGE, 66, null, null);
final int maxAngleDiff = (int) getStat().calcStat(Stat.POWER_ATTACK_ANGLE, 120, null, null);
if (_target == null)
{
@@ -1380,7 +1380,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
angleChar = Util.convertHeadingToDegree(_heading);
double attackpercent = 85;
final int attackcountmax = (int) getStat().calcStat(Stats.ATTACK_COUNT_MAX, 3, null, null);
final int attackcountmax = (int) getStat().calcStat(Stat.ATTACK_COUNT_MAX, 3, null, null);
int attackcount = 0;
if (angleChar <= 0)
@@ -1549,7 +1549,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
}
// Check if the skill is psychical and if the Creature is not psychical_muted
if (!skill.isMagic() && _isPsychicalMuted && !skill.isPotion())
if (!skill.isMagic() && _isPhysicalMuted && !skill.isPotion())
{
getAI().notifyEvent(CtrlEvent.EVT_CANCEL);
return;
@@ -1857,15 +1857,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
if (skill.isDance())
{
getStatus().reduceMp(calcStat(Stats.DANCE_MP_CONSUME_RATE, initmpcons, null, null));
getStatus().reduceMp(calcStat(Stat.DANCE_MP_CONSUME_RATE, initmpcons, null, null));
}
else if (skill.isMagic())
{
getStatus().reduceMp(calcStat(Stats.MAGICAL_MP_CONSUME_RATE, initmpcons, null, null));
getStatus().reduceMp(calcStat(Stat.MAGICAL_MP_CONSUME_RATE, initmpcons, null, null));
}
else
{
getStatus().reduceMp(calcStat(Stats.PHYSICAL_MP_CONSUME_RATE, initmpcons, null, null));
getStatus().reduceMp(calcStat(Stat.PHYSICAL_MP_CONSUME_RATE, initmpcons, null, null));
}
su.addAttribute(StatusUpdate.CUR_MP, (int) getStatus().getCurrentMp());
@@ -1984,7 +1984,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
return false;
}
setIsKilledAlready(true);
setKilledAlready(true);
}
// Set target to null and cancel Attack or Cast
setTarget(null);
@@ -2029,7 +2029,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
final PlayerInstance player = (PlayerInstance) this;
// to avoid Event Remove buffs on die
if (player._inEventDM && DM.is_started())
if (player._inEventDM && DM.hasStarted())
{
if (Config.DM_REMOVE_BUFFS_ON_DIE)
{
@@ -2323,7 +2323,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is afraid.
* @param value the new checks if is afraid
*/
public void setIsAfraid(boolean value)
public void setAfraid(boolean value)
{
_isAfraid = value;
}
@@ -2377,7 +2377,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is confused.
* @param value the new checks if is confused
*/
public void setIsConfused(boolean value)
public void setConfused(boolean value)
{
_isConfused = value;
}
@@ -2404,7 +2404,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is fake death.
* @param value the new checks if is fake death
*/
public void setIsFakeDeath(boolean value)
public void setFakeDeath(boolean value)
{
_isFakeDeath = value;
}
@@ -2422,54 +2422,54 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Set the Creature flying mode to True.
* @param mode the new checks if is flying
*/
public void setIsFlying(boolean mode)
public void setFlying(boolean mode)
{
_isFlying = mode;
}
/**
* Checks if is fallsdown.
* @return true, if is fallsdown
* Checks if is falling.
* @return true, if is falling
*/
public boolean isFallsdown()
public boolean isFalling()
{
return _isFallsdown;
}
/**
* Sets the checks if is fallsdown.
* @param value the new checks if is fallsdown
* Sets the checks if is falling.
* @param value the new checks if is falling
*/
public void setIsFallsdown(boolean value)
public void setFalling(boolean value)
{
_isFallsdown = value;
}
/**
* Checks if is imobilised.
* @return true, if is imobilised
* Checks if is immobilized.
* @return true, if is immobilized
*/
public boolean isImobilised()
public boolean isImmobilized()
{
return _isImobilised > 0;
return _isImmobilized > 0;
}
/**
* Sets the checks if is imobilised.
* @param value the new checks if is imobilised
* Sets the checks if is immobilized.
* @param value the new checks if is immobilized
*/
public void setIsImobilised(boolean value)
public void setImmobilized(boolean value)
{
// Stop this if he is moving
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
if (value)
{
_isImobilised++;
_isImmobilized++;
}
else
{
_isImobilised--;
_isImmobilized--;
}
}
@@ -2522,7 +2522,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is killed already.
* @param value the new checks if is killed already
*/
public void setIsKilledAlready(boolean value)
public void setKilledAlready(boolean value)
{
_isKilledAlready = value;
}
@@ -2540,27 +2540,27 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is muted.
* @param value the new checks if is muted
*/
public void setIsMuted(boolean value)
public void setMuted(boolean value)
{
_isMuted = value;
}
/**
* Checks if is psychical muted.
* @return true, if is psychical muted
* Checks if is physical muted.
* @return true, if is physical muted
*/
public boolean isPsychicalMuted()
public boolean isPhysicalMuted()
{
return _isPsychicalMuted;
return _isPhysicalMuted;
}
/**
* Sets the checks if is psychical muted.
* @param value the new checks if is psychical muted
* Sets the checks if is physical muted.
* @param value the new checks if is physical muted
*/
public void setIsPsychicalMuted(boolean value)
public void setPhysicalMuted(boolean value)
{
_isPsychicalMuted = value;
_isPhysicalMuted = value;
}
/**
@@ -2569,7 +2569,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public boolean isMovementDisabled()
{
return _isImmobileUntilAttacked || _isStunned || _isRooted || _isSleeping || _isOverloaded || _isParalyzed || isImobilised() || _isFakeDeath || _isFallsdown;
return _isImmobileUntilAttacked || _isStunned || _isRooted || _isSleeping || _isOverloaded || _isParalyzed || isImmobilized() || _isFakeDeath || _isFallsdown;
}
/**
@@ -2594,7 +2594,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Set the overloaded status of the Creature is overloaded (if True, the PlayerInstance can't take more item).
* @param value the new checks if is overloaded
*/
public void setIsOverloaded(boolean value)
public void setOverloaded(boolean value)
{
_isOverloaded = value;
}
@@ -2612,7 +2612,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is paralyzed.
* @param value the new checks if is paralyzed
*/
public void setIsParalyzed(boolean value)
public void setParalyzed(boolean value)
{
if (_petrified)
{
@@ -2666,7 +2666,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Set the Creature riding mode to True.
* @param mode the new checks if is riding
*/
public void setIsRiding(boolean mode)
public void setRiding(boolean mode)
{
_isRiding = mode;
}
@@ -2684,7 +2684,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is rooted.
* @param value the new checks if is rooted
*/
public void setIsRooted(boolean value)
public void setRooted(boolean value)
{
_isRooted = value;
}
@@ -2702,7 +2702,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is running.
* @param value the new checks if is running
*/
public void setIsRunning(boolean value)
public void setRunning(boolean value)
{
_isRunning = value;
broadcastPacket(new ChangeMoveType(this));
@@ -2715,7 +2715,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (!_isRunning)
{
setIsRunning(true);
setRunning(true);
}
}
@@ -2732,7 +2732,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is immobile until attacked.
* @param value the new checks if is immobile until attacked
*/
public void setIsImmobileUntilAttacked(boolean value)
public void setImmobileUntilAttacked(boolean value)
{
_isImmobileUntilAttacked = value;
}
@@ -2750,7 +2750,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is sleeping.
* @param value the new checks if is sleeping
*/
public void setIsSleeping(boolean value)
public void setSleeping(boolean value)
{
_isSleeping = value;
}
@@ -2768,7 +2768,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is stunned.
* @param value the new checks if is stunned
*/
public void setIsStunned(boolean value)
public void setStunned(boolean value)
{
_isStunned = value;
}
@@ -2786,7 +2786,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is betrayed.
* @param value the new checks if is betrayed
*/
public void setIsBetrayed(boolean value)
public void setBetrayed(boolean value)
{
_isBetrayed = value;
}
@@ -2804,23 +2804,23 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is teleporting.
* @param value the new checks if is teleporting
*/
public void setIsTeleporting(boolean value)
public void setTeleporting(boolean value)
{
_isTeleporting = value;
}
/**
* Sets the checks if is invul.
* @param b the new checks if is invul
* @param value the new checks if is invul
*/
public void setIsInvul(boolean b)
public void setInvul(boolean value)
{
if (_petrified)
{
return;
}
_isInvul = b;
_isInvul = value;
}
/**
@@ -2966,7 +2966,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (_isRunning)
{
setIsRunning(false);
setRunning(false);
}
}
@@ -3589,7 +3589,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startImmobileUntilAttacked()
{
setIsImmobileUntilAttacked(true);
setImmobileUntilAttacked(true);
abortAttack();
abortCast();
getAI().notifyEvent(CtrlEvent.EVT_SLEEPING);
@@ -3602,7 +3602,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startConfused()
{
setIsConfused(true);
setConfused(true);
getAI().notifyEvent(CtrlEvent.EVT_CONFUSED);
updateAbnormalEffect();
}
@@ -3613,8 +3613,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startFakeDeath()
{
setIsFallsdown(true);
setIsFakeDeath(true);
setFalling(true);
setFakeDeath(true);
/* Aborts any attacks/casts if fake dead */
abortAttack();
abortCast();
@@ -3629,7 +3629,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startFear()
{
setIsAfraid(true);
setAfraid(true);
getAI().notifyEvent(CtrlEvent.EVT_AFFRAID);
updateAbnormalEffect();
}
@@ -3640,7 +3640,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startMuted()
{
setIsMuted(true);
setMuted(true);
/* Aborts any casts if muted */
abortCast();
getAI().notifyEvent(CtrlEvent.EVT_MUTED);
@@ -3653,7 +3653,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startPsychicalMuted()
{
setIsPsychicalMuted(true);
setPhysicalMuted(true);
getAI().notifyEvent(CtrlEvent.EVT_MUTED);
updateAbnormalEffect();
}
@@ -3664,7 +3664,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startRooted()
{
setIsRooted(true);
setRooted(true);
stopMove(null);
getAI().notifyEvent(CtrlEvent.EVT_ROOTED, null);
updateAbnormalEffect();
@@ -3676,7 +3676,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startSleeping()
{
setIsSleeping(true);
setSleeping(true);
/* Aborts any attacks/casts if sleeped */
abortAttack();
abortCast();
@@ -3702,7 +3702,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
return;
}
setIsStunned(true);
setStunned(true);
/* Aborts any attacks/casts if stunned */
abortAttack();
abortCast();
@@ -3717,7 +3717,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void startBetray()
{
setIsBetrayed(true);
setBetrayed(true);
getAI().notifyEvent(CtrlEvent.EVT_BETRAYED, null);
updateAbnormalEffect();
}
@@ -3728,7 +3728,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
public void stopBetray()
{
stopEffects(Effect.EffectType.BETRAY);
setIsBetrayed(false);
setBetrayed(false);
updateAbnormalEffect();
}
@@ -3796,7 +3796,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
stopSkillEffects(effect.getSkill().getNegateId());
}
setIsImmobileUntilAttacked(false);
setImmobileUntilAttacked(false);
getAI().notifyEvent(CtrlEvent.EVT_THINK);
updateAbnormalEffect();
}
@@ -3824,7 +3824,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsConfused(false);
setConfused(false);
getAI().notifyEvent(CtrlEvent.EVT_THINK, null);
updateAbnormalEffect();
}
@@ -3960,8 +3960,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsFakeDeath(false);
setIsFallsdown(false);
setFakeDeath(false);
setFalling(false);
// if this is a player instance, start the grace period for this character (grace from mobs only)!
if (this instanceof PlayerInstance)
{
@@ -3997,7 +3997,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsAfraid(false);
setAfraid(false);
updateAbnormalEffect();
}
@@ -4024,7 +4024,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsMuted(false);
setMuted(false);
updateAbnormalEffect();
}
@@ -4043,7 +4043,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsPsychicalMuted(false);
setPhysicalMuted(false);
updateAbnormalEffect();
}
@@ -4070,7 +4070,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsRooted(false);
setRooted(false);
getAI().notifyEvent(CtrlEvent.EVT_THINK, null);
updateAbnormalEffect();
}
@@ -4098,7 +4098,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsSleeping(false);
setSleeping(false);
getAI().notifyEvent(CtrlEvent.EVT_THINK, null);
updateAbnormalEffect();
}
@@ -4131,7 +4131,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
removeEffect(effect);
}
setIsStunned(false);
setStunned(false);
getAI().notifyEvent(CtrlEvent.EVT_THINK, null);
updateAbnormalEffect();
}
@@ -4329,7 +4329,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
ae |= ABNORMAL_EFFECT_AFRAID;
}
if (_isPsychicalMuted)
if (_isPhysicalMuted)
{
ae |= ABNORMAL_EFFECT_MUTED;
}
@@ -4756,9 +4756,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
if (_calculators == NPC_STD_CALCULATOR)
{
// Create a copy of the standard NPC Calculator set
_calculators = new Calculator[Stats.NUM_STATS];
_calculators = new Calculator[Stat.NUM_STATS];
for (int i = 0; i < Stats.NUM_STATS; i++)
for (int i = 0; i < Stat.NUM_STATS; i++)
{
if (NPC_STD_CALCULATOR[i] != null)
{
@@ -4798,7 +4798,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public synchronized void addStatFuncs(Func[] funcs)
{
final List<Stats> modifiedStats = new ArrayList<>();
final List<Stat> modifiedStats = new ArrayList<>();
for (Func f : funcs)
{
@@ -4855,7 +4855,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
int i = 0;
for (; i < Stats.NUM_STATS; i++)
for (; i < Stat.NUM_STATS; i++)
{
if (!Calculator.equalsCals(_calculators[i], NPC_STD_CALCULATOR[i]))
{
@@ -4863,7 +4863,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
}
}
if (i >= Stats.NUM_STATS)
if (i >= Stat.NUM_STATS)
{
_calculators = NPC_STD_CALCULATOR;
}
@@ -4888,7 +4888,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public synchronized void removeStatFuncs(Func[] funcs)
{
final List<Stats> modifiedStats = new ArrayList<>();
final List<Stat> modifiedStats = new ArrayList<>();
for (Func f : funcs)
{
@@ -4924,7 +4924,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public void removeStatsOwner(Object owner)
{
List<Stats> modifiedStats = null;
List<Stat> modifiedStats = null;
int i = 0;
// Go through the Calculator set
@@ -4956,7 +4956,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
if (this instanceof NpcInstance)
{
i = 0;
for (; i < Stats.NUM_STATS; i++)
for (; i < Stat.NUM_STATS; i++)
{
if (!Calculator.equalsCals(_calculators[i], NPC_STD_CALCULATOR[i]))
{
@@ -4964,7 +4964,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
}
}
if (i >= Stats.NUM_STATS)
if (i >= Stat.NUM_STATS)
{
_calculators = NPC_STD_CALCULATOR;
}
@@ -4981,7 +4981,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Broadcast modified stats.
* @param stats the stats
*/
public void broadcastModifiedStats(List<Stats> stats)
public void broadcastModifiedStats(List<Stat> stats)
{
if ((stats == null) || stats.isEmpty())
{
@@ -4992,9 +4992,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
boolean otherStats = false;
StatusUpdate su = null;
for (Stats stat : stats)
for (Stat stat : stats)
{
if (stat == Stats.POWER_ATTACK_SPEED)
if (stat == Stat.POWER_ATTACK_SPEED)
{
if (su == null)
{
@@ -5003,7 +5003,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
su.addAttribute(StatusUpdate.ATK_SPD, getStat().getPAtkSpd());
}
else if (stat == Stats.MAGIC_ATTACK_SPEED)
else if (stat == Stat.MAGIC_ATTACK_SPEED)
{
if (su == null)
{
@@ -5012,7 +5012,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
su.addAttribute(StatusUpdate.CAST_SPD, getStat().getMAtkSpd());
}
else if (stat == Stats.MAX_CP)
else if (stat == Stat.MAX_CP)
{
if (this instanceof PlayerInstance)
{
@@ -5024,7 +5024,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
su.addAttribute(StatusUpdate.MAX_CP, getStat().getMaxCp());
}
}
else if (stat == Stats.RUN_SPEED)
else if (stat == Stat.RUN_SPEED)
{
broadcastFull = true;
}
@@ -5162,38 +5162,38 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
/**
* Sets the client x.
* @param val the new client x
* @param value the new client x
*/
public void setClientX(int val)
public void setClientX(int value)
{
_clientX = val;
_clientX = value;
}
/**
* Sets the client y.
* @param val the new client y
* @param value the new client y
*/
public void setClientY(int val)
public void setClientY(int value)
{
_clientY = val;
_clientY = value;
}
/**
* Sets the client z.
* @param val the new client z
* @param value the new client z
*/
public void setClientZ(int val)
public void setClientZ(int value)
{
_clientZ = val;
_clientZ = value;
}
/**
* Sets the client heading.
* @param val the new client heading
* @param value the new client heading
*/
public void setClientHeading(int val)
public void setClientHeading(int value)
{
_clientHeading = val;
_clientHeading = value;
}
/**
@@ -6674,7 +6674,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
if (!isBow) // Do not reflect or absorb if weapon is of type bow
{
// Absorb HP from the damage inflicted
final double absorbPercent = getStat().calcStat(Stats.ABSORB_DAMAGE_PERCENT, 0, null, null);
final double absorbPercent = getStat().calcStat(Stat.ABSORB_DAMAGE_PERCENT, 0, null, null);
if (absorbPercent > 0)
{
@@ -6693,7 +6693,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
}
// Reduce HP of the target and calculate reflection damage to reduce HP of attacker if necessary
final double reflectPercent = target.getStat().calcStat(Stats.REFLECT_DAMAGE_PERCENT, 0, null, null);
final double reflectPercent = target.getStat().calcStat(Stat.REFLECT_DAMAGE_PERCENT, 0, null, null);
if (reflectPercent > 0)
{
@@ -7907,15 +7907,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (skill.isDance())
{
getStatus().reduceMp(calcStat(Stats.DANCE_MP_CONSUME_RATE, mpConsume, null, null));
getStatus().reduceMp(calcStat(Stat.DANCE_MP_CONSUME_RATE, mpConsume, null, null));
}
else if (skill.isMagic())
{
getStatus().reduceMp(calcStat(Stats.MAGICAL_MP_CONSUME_RATE, mpConsume, null, null));
getStatus().reduceMp(calcStat(Stat.MAGICAL_MP_CONSUME_RATE, mpConsume, null, null));
}
else
{
getStatus().reduceMp(calcStat(Stats.PHYSICAL_MP_CONSUME_RATE, mpConsume, null, null));
getStatus().reduceMp(calcStat(Stat.PHYSICAL_MP_CONSUME_RATE, mpConsume, null, null));
}
su.addAttribute(StatusUpdate.CUR_MP, (int) getStatus().getCurrentMp());
@@ -7927,7 +7927,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
double consumeHp;
consumeHp = calcStat(Stats.HP_CONSUME_RATE, skill.getHpConsume(), null, null);
consumeHp = calcStat(Stat.HP_CONSUME_RATE, skill.getHpConsume(), null, null);
if ((consumeHp + 1) >= getStatus().getCurrentHp())
{
@@ -8998,7 +8998,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* @param skill the skill
* @return the double
*/
public double calcStat(Stats stat, double init, Creature target, Skill skill)
public double calcStat(Stat stat, double init, Creature target, Skill skill)
{
return getStat().calcStat(stat, init, target, skill);
}
@@ -9727,7 +9727,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
/**
* @return the _advanceFlag
*/
public boolean is_advanceFlag()
public boolean isAdvanceFlag()
{
return _advanceFlag;
}
@@ -9735,7 +9735,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
/**
* @param advanceFlag
*/
public void set_advanceFlag(boolean advanceFlag)
public void setAdvanceFlag(boolean advanceFlag)
{
_advanceFlag = advanceFlag;
}
@@ -9743,7 +9743,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
/**
* @param advanceMultiplier
*/
public void set_advanceMultiplier(int advanceMultiplier)
public void setAdvanceMultiplier(int advanceMultiplier)
{
_advanceMultiplier = advanceMultiplier;
}
@@ -9755,7 +9755,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
*/
public boolean reflectSkill(Skill skill)
{
return Rnd.get(100) < calcStat(skill.isMagic() ? Stats.REFLECT_SKILL_MAGIC : Stats.REFLECT_SKILL_PHYSIC, 0, null, null);
return Rnd.get(100) < calcStat(skill.isMagic() ? Stat.REFLECT_SKILL_MAGIC : Stat.REFLECT_SKILL_PHYSIC, 0, null, null);
}
/**
@@ -9767,7 +9767,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (!skill.isMagic() && (skill.getCastRange() <= 40))
{
final double venganceChance = calcStat(Stats.VENGEANCE_SKILL_PHYSICAL_DAMAGE, 0, null, skill);
final double venganceChance = calcStat(Stat.VENGEANCE_SKILL_PHYSICAL_DAMAGE, 0, null, skill);
if (venganceChance > Rnd.get(100))
{
return true;
@@ -9918,15 +9918,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
if (petrified)
{
setIsParalyzed(petrified);
setIsInvul(petrified);
setParalyzed(petrified);
setInvul(petrified);
_petrified = petrified;
}
else
{
_petrified = petrified;
setIsParalyzed(petrified);
setIsInvul(petrified);
setParalyzed(petrified);
setInvul(petrified);
}
}
@@ -10117,7 +10117,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Sets the checks if is buff protected.
* @param value the new checks if is buff protected
*/
public void setIsBuffProtected(boolean value)
public void setBuffProtected(boolean value)
{
_isBuffProtected = value;
}
@@ -10135,7 +10135,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* Gets the _triggered skills.
* @return the _triggeredSkills
*/
public Map<Integer, Skill> get_triggeredSkills()
public Map<Integer, Skill> getTriggeredSkills()
{
return _triggeredSkills;
}
@@ -10178,7 +10178,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
/**
* @param value the _isKillable to set
*/
public void setIsUnkillable(boolean value)
public void setUnkillable(boolean value)
{
_isUnkillable = value;
}
@@ -10194,7 +10194,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
/**
* @param value the _isAttackDisabled to set
*/
public void setIsAttackDisabled(boolean value)
public void setAttackDisabled(boolean value)
{
_isAttackDisabled = value;
}
@@ -211,7 +211,7 @@ public abstract class Playable extends Creature
* Sets the checks if is noblesse blessed.
* @param value the new checks if is noblesse blessed
*/
public void setIsNoblesseBlessed(boolean value)
public void setNoblesseBlessed(boolean value)
{
_isNoblesseBlessed = value;
}
@@ -223,7 +223,7 @@ public abstract class Playable extends Creature
public void startNoblesseBlessing(Effect effect)
{
_lastNoblessEffect = effect;
setIsNoblesseBlessed(true);
setNoblesseBlessed(true);
updateAbnormalEffect();
}
@@ -248,7 +248,7 @@ public abstract class Playable extends Creature
removeEffect(effect);
}
setIsNoblesseBlessed(false);
setNoblesseBlessed(false);
updateAbnormalEffect();
_lastNoblessEffect = null;
@@ -327,7 +327,7 @@ public abstract class Playable extends Creature
* Sets the checks if is phoenix blessed.
* @param value the new checks if is phoenix blessed
*/
public void setIsPhoenixBlessed(boolean value)
public void setPhoenixBlessed(boolean value)
{
_isPhoenixBlessed = value;
}
@@ -339,7 +339,7 @@ public abstract class Playable extends Creature
public void startPhoenixBlessing(Effect effect)
{
_lastPhoenixBlessedEffect = effect;
setIsPhoenixBlessed(true);
setPhoenixBlessed(true);
updateAbnormalEffect();
}
@@ -363,7 +363,7 @@ public abstract class Playable extends Creature
removeEffect(effect);
}
setIsPhoenixBlessed(false);
setPhoenixBlessed(false);
updateAbnormalEffect();
_lastPhoenixBlessedEffect = null;
}
@@ -450,9 +450,9 @@ public abstract class Summon extends Playable
_attackRange = range;
}
public void setFollowStatus(boolean state)
public void setFollowStatus(boolean value)
{
_follow = state;
_follow = value;
if (_follow)
{
@@ -735,9 +735,9 @@ public abstract class Summon extends Playable
}
@Override
public void setIsImobilised(boolean value)
public void setImmobilized(boolean value)
{
super.setIsImobilised(value);
super.setImmobilized(value);
if (value)
{
@@ -85,17 +85,17 @@ public class AdventurerInstance extends FolkInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
if (val == 0)
if (value == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
pom = npcId + "-" + value;
}
return "data/html/adventurer_guildsman/" + pom + ".htm";
@@ -645,7 +645,7 @@ public class AuctioneerInstance extends FolkInstance
{
if ((getCastle() != null) && (getCastle().getCastleId() > 0))
{
if (getCastle().getSiege().getIsInProgress())
if (getCastle().getSiege().isInProgress())
{
return COND_BUSY_BECAUSE_OF_SIEGE; // Busy because of siege
}
@@ -41,16 +41,16 @@ public class BlacksmithInstance extends FolkInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
if (val == 0)
if (value == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
pom = npcId + "-" + value;
}
return "data/html/blacksmith/" + pom + ".htm";
@@ -102,7 +102,7 @@ public class CastleBlacksmithInstance extends FolkInstance
}
}
private void showMessageWindow(PlayerInstance player, int val)
private void showMessageWindow(PlayerInstance player, int value)
{
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename = "data/html/castleblacksmith/castleblacksmith-no.htm";
@@ -117,13 +117,13 @@ public class CastleBlacksmithInstance extends FolkInstance
else if (condition == COND_OWNER)
{
// Clan owns castle
if (val == 0)
if (value == 0)
{
filename = "data/html/castleblacksmith/castleblacksmith.htm";
}
else
{
filename = "data/html/castleblacksmith/castleblacksmith-" + val + ".htm";
filename = "data/html/castleblacksmith/castleblacksmith-" + value + ".htm";
}
}
}
@@ -145,7 +145,7 @@ public class CastleBlacksmithInstance extends FolkInstance
if ((getCastle() != null) && (getCastle().getCastleId() > 0) && (player.getClan() != null))
{
if (getCastle().getSiege().getIsInProgress())
if (getCastle().getSiege().isInProgress())
{
return COND_BUSY_BECAUSE_OF_SIEGE; // Busy because of siege
}
@@ -627,7 +627,7 @@ public class CastleChamberlainInstance extends FolkInstance
{
if ((getCastle() != null) && (getCastle().getCastleId() > 0) && (player.getClan() != null))
{
if (getCastle().getSiege().getIsInProgress())
if (getCastle().getSiege().isInProgress())
{
return COND_BUSY_BECAUSE_OF_SIEGE; // Busy because of siege
}
@@ -34,7 +34,7 @@ public class CastleMagicianInstance extends NpcInstance
protected static final int COND_OWNER = 2;
/**
* Instantiates a new l2 castle magician instance.
* Instantiates a new castle magician instance.
* @param objectId the object id
* @param template the template
*/
@@ -44,7 +44,7 @@ public class CastleMagicianInstance extends NpcInstance
}
@Override
public void showChatWindow(PlayerInstance player, int val)
public void showChatWindow(PlayerInstance player, int value)
{
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename = "data/html/castlemagician/magician-no.htm";
@@ -58,13 +58,13 @@ public class CastleMagicianInstance extends NpcInstance
}
else if (condition == COND_OWNER) // Clan owns castle
{
if (val == 0)
if (value == 0)
{
filename = "data/html/castlemagician/magician.htm";
}
else
{
filename = "data/html/castlemagician/magician-" + val + ".htm";
filename = "data/html/castlemagician/magician-" + value + ".htm";
}
}
}
@@ -34,7 +34,7 @@ public class CastleTeleporterInstance extends NpcInstance
private boolean _currentTask = false;
/**
* Instantiates a new l2 castle teleporter instance.
* Instantiates a new castle teleporter instance.
* @param objectId the object id
* @param template the template
*/
@@ -54,7 +54,7 @@ public class CastleTeleporterInstance extends NpcInstance
int delay;
if (!_currentTask)
{
if (getCastle().getSiege().getIsInProgress() && (getCastle().getSiege().getControlTowerCount() == 0))
if (getCastle().getSiege().isInProgress() && (getCastle().getSiege().getControlTowerCount() == 0))
{
delay = 480000;
}
@@ -82,7 +82,7 @@ public class CastleTeleporterInstance extends NpcInstance
String filename;
if (!_currentTask)
{
if (getCastle().getSiege().getIsInProgress() && (getCastle().getSiege().getControlTowerCount() == 0))
if (getCastle().getSiege().isInProgress() && (getCastle().getSiege().getControlTowerCount() == 0))
{
filename = "data/html/castleteleporter/MassGK-2.htm";
}
@@ -129,8 +129,8 @@ public class CastleTeleporterInstance extends NpcInstance
return _currentTask;
}
public void setTask(boolean state)
public void setTask(boolean value)
{
_currentTask = state;
_currentTask = value;
}
}
@@ -35,7 +35,7 @@ public class CastleWarehouseInstance extends FolkInstance
protected static final int COND_OWNER = 2;
/**
* Instantiates a new l2 castle warehouse instance.
* Instantiates a new castle warehouse instance.
* @param objectId the object id
* @param template the template
*/
@@ -171,7 +171,7 @@ public class CastleWarehouseInstance extends FolkInstance
}
@Override
public void showChatWindow(PlayerInstance player, int val)
public void showChatWindow(PlayerInstance player, int value)
{
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename = "data/html/castlewarehouse/castlewarehouse-no.htm";
@@ -185,13 +185,13 @@ public class CastleWarehouseInstance extends FolkInstance
}
else if (condition == COND_OWNER) // Clan owns castle
{
if (val == 0)
if (value == 0)
{
filename = "data/html/castlewarehouse/castlewarehouse.htm";
}
else
{
filename = "data/html/castlewarehouse/castlewarehouse-" + val + ".htm";
filename = "data/html/castlewarehouse/castlewarehouse-" + value + ".htm";
}
}
}
@@ -216,7 +216,7 @@ public class CastleWarehouseInstance extends FolkInstance
}
if ((getCastle() != null) && (getCastle().getCastleId() > 0) && (player.getClan() != null))
{
if (getCastle().getSiege().getIsInProgress())
if (getCastle().getSiege().isInProgress())
{
return COND_BUSY_BECAUSE_OF_SIEGE; // Busy because of siege
}
@@ -54,7 +54,7 @@ public class ClanHallManagerInstance extends FolkInstance
private int _clanHallId = -1;
/**
* Instantiates a new l2 clan hall manager instance.
* Instantiates a new clan hall manager instance.
* @param objectId the object id
* @param template the template
*/
@@ -1047,11 +1047,11 @@ public class ClanHallManagerInstance extends FolkInstance
/**
* Do teleport.
* @param player the player
* @param val the val
* @param value the value
*/
private void doTeleport(PlayerInstance player, int val)
private void doTeleport(PlayerInstance player, int value)
{
final TeleportLocation list = TeleportLocationTable.getInstance().getTemplate(val);
final TeleportLocation list = TeleportLocationTable.getInstance().getTemplate(value);
if (list != null)
{
// you cannot teleport to village that is in siege Not sure about this one though
@@ -1067,7 +1067,7 @@ public class ClanHallManagerInstance extends FolkInstance
}
else
{
LOGGER.warning("No teleport destination with id:" + val);
LOGGER.warning("No teleport destination with id:" + value);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
}
@@ -1075,20 +1075,20 @@ public class ClanHallManagerInstance extends FolkInstance
/**
* Show buy window.
* @param player the player
* @param val the val
* @param value the value
*/
private void showBuyWindow(PlayerInstance player, int val)
private void showBuyWindow(PlayerInstance player, int value)
{
double taxRate = 0;
if (getIsInTown())
if (isInTown())
{
taxRate = getCastle().getTaxRate();
}
player.tempInvetoryDisable();
final StoreTradeList list = TradeController.getInstance().getBuyList(val);
final StoreTradeList list = TradeController.getInstance().getBuyList(value);
if ((list != null) && list.getNpcId().equals(String.valueOf(getNpcId())))
{
@@ -1098,7 +1098,7 @@ public class ClanHallManagerInstance extends FolkInstance
else
{
LOGGER.warning("possible client hacker: " + player.getName() + " attempting to buy from GM shop! (PledgeHallManagerInstance)");
LOGGER.warning("buylist id:" + val);
LOGGER.warning("buylist id:" + value);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
@@ -345,19 +345,19 @@ public class ClanHallSiegeInfInstance extends NpcInstance
player.sendPacket(html);
}
public void showMessageWindow(PlayerInstance player, int val)
public void showMessageWindow(PlayerInstance player, int value)
{
player.sendPacket(ActionFailed.STATIC_PACKET);
long startSiege = 0;
final int npcId = getTemplate().getNpcId();
String filename;
if (val == 0)
if (value == 0)
{
filename = "data/html/default/" + npcId + ".htm";
}
else
{
filename = "data/html/default/" + npcId + "-" + val + ".htm";
filename = "data/html/default/" + npcId + "-" + value + ".htm";
}
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
html.setFile(filename);
@@ -35,7 +35,7 @@ public class ClassMasterInstance extends FolkInstance
private static ClassMasterInstance _instance;
/**
* Instantiates a new l2 class master instance.
* Instantiates a new class master instance.
* @param objectId the object id
* @param template the template
*/
@@ -669,11 +669,11 @@ public class ClassMasterInstance extends FolkInstance
/**
* Change class.
* @param player the player
* @param val the val
* @param value the value
*/
private void changeClass(PlayerInstance player, int val)
private void changeClass(PlayerInstance player, int value)
{
player.setClassId(val);
player.setClassId(value);
if (player.isSubClassActive())
{
@@ -47,7 +47,7 @@ public class CommanderInstance extends Attackable
public boolean isAutoAttackable(Creature attacker)
{
// Attackable during siege by all except defenders
return (attacker instanceof PlayerInstance) && (getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().getIsInProgress() && !getFort().getSiege().checkIsDefender(((PlayerInstance) attacker).getClan());
return (attacker instanceof PlayerInstance) && (getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().isInProgress() && !getFort().getSiege().checkIsDefender(((PlayerInstance) attacker).getClan());
}
@Override
@@ -82,7 +82,7 @@ public class CommanderInstance extends Attackable
return false;
}
if (getFort().getSiege().getIsInProgress())
if (getFort().getSiege().isInProgress())
{
getFort().getSiege().killedCommander(this);
}
@@ -117,7 +117,7 @@ public class CommanderInstance extends Attackable
{
if (!isInsideRadius(_homeX, _homeY, 40, false))
{
setisReturningToSpawnPoint(true);
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -43,14 +43,14 @@ public class ControlTowerInstance extends NpcInstance
public boolean isAttackable()
{
// Attackable during siege by attacker only
return (getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().getIsInProgress();
return (getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().isInProgress();
}
@Override
public boolean isAutoAttackable(Creature attacker)
{
// Attackable during siege by attacker only
return (attacker instanceof PlayerInstance) && (getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().getIsInProgress() && getCastle().getSiege().checkIsAttacker(((PlayerInstance) attacker).getClan());
return (attacker instanceof PlayerInstance) && (getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().isInProgress() && getCastle().getSiege().checkIsAttacker(((PlayerInstance) attacker).getClan());
}
@Override
@@ -99,7 +99,7 @@ public class ControlTowerInstance extends NpcInstance
public void onDeath()
{
if (getCastle().getSiege().getIsInProgress())
if (getCastle().getSiege().isInProgress())
{
getCastle().getSiege().killedCT(this);
@@ -84,6 +84,7 @@ public class ControllableMobInstance extends MonsterInstance
return _isInvul;
}
@Override
public void setInvul(boolean isInvul)
{
_isInvul = isInvul;
@@ -80,7 +80,7 @@ public class CubicInstance
private Future<?> _actionTask;
/**
* Instantiates a new l2 cubic instance.
* Instantiates a new cubic instance.
* @param owner the owner
* @param id the id
* @param level the level
@@ -182,7 +182,7 @@ public class DoorInstance extends Creature
}
/**
* Instantiates a new l2 door instance.
* Instantiates a new door instance.
* @param objectId the object id
* @param template the template
* @param doorId the door id
@@ -418,8 +418,8 @@ public class DoorInstance extends Creature
}
final Clan clan = player.getClan();
final boolean isCastle = (getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().getIsInProgress() && getCastle().getSiege().checkIsAttacker(clan);
final boolean isFort = (getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().getIsInProgress() && getFort().getSiege().checkIsAttacker(clan);
final boolean isCastle = (getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().isInProgress() && getCastle().getSiege().checkIsAttacker(clan);
final boolean isFort = (getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().isInProgress() && getFort().getSiege().checkIsAttacker(clan);
if (isFort)
{
if ((clan != null) && (clan == getFort().getOwnerClan()))
@@ -434,7 +434,7 @@ public class DoorInstance extends Creature
return false;
}
}
return isCastle || isFort || DevastatedCastle.getInstance().getIsInProgress();
return isCastle || isFort || DevastatedCastle.getInstance().isInProgress();
}
/**
@@ -908,8 +908,8 @@ public class DoorInstance extends Creature
return false;
}
final boolean isFort = ((getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().getIsInProgress());
final boolean isCastle = ((getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().getIsInProgress());
final boolean isFort = ((getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().isInProgress());
final boolean isCastle = ((getCastle() != null) && (getCastle().getCastleId() > 0) && getCastle().getSiege().isInProgress());
if (isFort || isCastle)
{
@@ -44,7 +44,7 @@ public class FestivalGuideInstance extends FolkInstance
protected int _redStonesNeeded;
/**
* Instantiates a new l2 festival guide instance.
* Instantiates a new festival guide instance.
* @param objectId the object id
* @param template the template
*/
@@ -446,15 +446,15 @@ public class FestivalGuideInstance extends FolkInstance
/**
* Show chat window.
* @param player the player
* @param val the val
* @param value the value
* @param suffix the suffix
* @param isDescription the is description
*/
private void showChatWindow(PlayerInstance player, int val, String suffix, boolean isDescription)
private void showChatWindow(PlayerInstance player, int value, String suffix, boolean isDescription)
{
String filename = SevenSigns.SEVEN_SIGNS_HTML_PATH + "festival/";
filename += isDescription ? "desc_" : "festival_";
filename += suffix != null ? val + suffix + ".htm" : val + ".htm";
filename += suffix != null ? value + suffix + ".htm" : value + ".htm";
// Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
@@ -462,23 +462,23 @@ public class FestivalGuideInstance extends FolkInstance
html.replace("%objectId%", String.valueOf(getObjectId()));
html.replace("%festivalType%", SevenSignsFestival.getFestivalName(_festivalType));
html.replace("%cycleMins%", String.valueOf(SevenSignsFestival.getInstance().getMinsToNextCycle()));
if (!isDescription && "2b".equals(val + suffix))
if (!isDescription && "2b".equals(value + suffix))
{
html.replace("%minFestivalPartyMembers%", String.valueOf(Config.ALT_FESTIVAL_MIN_PLAYER));
}
// If the stats or bonus table is required, construct them.
if (val == 5)
if (value == 5)
{
html.replace("%statsTable%", getStatsTable());
}
if (val == 6)
if (value == 6)
{
html.replace("%bonusTable%", getBonusTable());
}
// festival's fee
if (val == 1)
if (value == 1)
{
html.replace("%blueStoneNeeded%", String.valueOf(_blueStonesNeeded));
html.replace("%greenStoneNeeded%", String.valueOf(_greenStonesNeeded));
@@ -43,31 +43,31 @@ public class FishermanInstance extends FolkInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
if (val == 0)
if (value == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
pom = npcId + "-" + value;
}
return "data/html/fisherman/" + pom + ".htm";
}
private void showBuyWindow(PlayerInstance player, int val)
private void showBuyWindow(PlayerInstance player, int value)
{
double taxRate = 0;
if (getIsInTown())
if (isInTown())
{
taxRate = getCastle().getTaxRate();
}
player.tempInvetoryDisable();
final StoreTradeList list = TradeController.getInstance().getBuyList(val);
final StoreTradeList list = TradeController.getInstance().getBuyList(value);
if ((list != null) && list.getNpcId().equals(String.valueOf(getNpcId())))
{
@@ -77,7 +77,7 @@ public class FishermanInstance extends FolkInstance
else
{
LOGGER.warning("possible client hacker: " + player.getName() + " attempting to buy from GM shop! (L2FishermanInstance)");
LOGGER.warning("buylist id:" + val);
LOGGER.warning("buylist id:" + value);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
@@ -41,7 +41,7 @@ public class FolkInstance extends NpcInstance
private final List<ClassId> _classesToTeach;
/**
* Instantiates a new l2 folk instance.
* Instantiates a new folk instance.
* @param objectId the object id
* @param template the template
*/
@@ -249,7 +249,7 @@ public class FortManagerInstance extends MerchantInstance
{
if ((getFort() != null) && (getFort().getFortId() > 0) && (player.getClan() != null))
{
if (getFort().getSiege().getIsInProgress())
if (getFort().getSiege().isInProgress())
{
return COND_BUSY_BECAUSE_OF_SIEGE; // Busy because of siege
}
@@ -109,19 +109,19 @@ public class FortMerchantInstance extends NpcWalkerInstance
showMessageWindow(player, 0);
}
private void showMessageWindow(PlayerInstance player, int val)
private void showMessageWindow(PlayerInstance player, int value)
{
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename;
if (val == 0)
if (value == 0)
{
filename = "data/html/fortress/merchant.htm";
}
else
{
filename = "data/html/fortress/merchant-" + val + ".htm";
filename = "data/html/fortress/merchant-" + value + ".htm";
}
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
@@ -149,7 +149,7 @@ public class FortMerchantInstance extends NpcWalkerInstance
public void showSiegeInfoWindow(PlayerInstance player)
{
final FortSiege siege = getFort().getSiege();
if (siege.getIsInProgress())
if (siege.isInProgress())
{
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
html.setFile("data/html/fortress/merchant-busy.htm");
@@ -83,11 +83,11 @@ public class FortSiegeGuardInstance extends Attackable
boolean isFort = false;
if (attacker instanceof PlayerInstance)
{
isFort = ((getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().getIsInProgress() && !getFort().getSiege().checkIsDefender(((PlayerInstance) attacker).getClan()));
isFort = ((getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().isInProgress() && !getFort().getSiege().checkIsDefender(((PlayerInstance) attacker).getClan()));
}
else
{
isFort = ((getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().getIsInProgress() && !getFort().getSiege().checkIsDefender(((Summon) attacker).getOwner().getClan()));
isFort = ((getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().isInProgress() && !getFort().getSiege().checkIsDefender(((Summon) attacker).getOwner().getClan()));
}
// Attackable during siege by all except defenders
@@ -111,7 +111,7 @@ public class FortSiegeGuardInstance extends Attackable
}
if (!isInsideRadius(getSpawn().getX(), getSpawn().getY(), 40, false))
{
setisReturningToSpawnPoint(true);
setReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
@@ -180,7 +180,7 @@ public class FortWyvernManagerInstance extends NpcInstance
{
if ((getFort() != null) && (getFort().getFortId() > 0) && (player.getClan() != null))
{
if (getFort().getSiege().getIsInProgress())
if (getFort().getSiege().isInProgress())
{
return COND_BUSY_BECAUSE_OF_SIEGE; // Busy because of siege
}
@@ -86,7 +86,7 @@ public class GrandBossInstance extends MonsterInstance
public void onSpawn()
{
super.onSpawn();
if (!getSpawn().is_customBossInstance())
if (!getSpawn().isCustomBossInstance())
{
GrandBossManager.getInstance().addBoss(this);
}
@@ -163,20 +163,20 @@ public class GuardInstance extends Attackable
* <li>if page number > 0 : <B>data/html/guard/12006-1.htm</B> (npcId-page number)</li><BR>
* <BR>
* @param npcId The Identifier of the NpcInstance whose text must be display
* @param val The number of the page to display
* @param value The number of the page to display
* @return the html path
*/
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
if (val == 0)
if (value == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
pom = npcId + "-" + value;
}
return "data/html/guard/" + pom + ".htm";
}
@@ -101,12 +101,12 @@ public class ManorManagerInstance extends MerchantInstance
player.sendPacket(ActionFailed.STATIC_PACKET);
}
private void showBuyWindow(PlayerInstance player, String val)
private void showBuyWindow(PlayerInstance player, String value)
{
final double taxRate = 0;
player.tempInvetoryDisable();
final StoreTradeList list = TradeController.getInstance().getBuyList(Integer.parseInt(val));
final StoreTradeList list = TradeController.getInstance().getBuyList(Integer.parseInt(value));
if (list != null)
{
@@ -117,7 +117,7 @@ public class ManorManagerInstance extends MerchantInstance
else
{
LOGGER.info("possible client hacker: " + player.getName() + " attempting to buy from GM shop! (L2ManorManagerIntance)");
LOGGER.info("buylist id:" + val);
LOGGER.info("buylist id:" + value);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
@@ -256,7 +256,7 @@ public class ManorManagerInstance extends MerchantInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
return "data/html/manormanager/manager.htm"; // Used only in parent method to return from "Territory status" to initial screen.
}
@@ -114,10 +114,10 @@ public class MercManagerInstance extends FolkInstance
super.onBypassFeedback(player, command);
}
private void showBuyWindow(PlayerInstance player, int val)
private void showBuyWindow(PlayerInstance player, int value)
{
player.tempInvetoryDisable();
final StoreTradeList list = TradeController.getInstance().getBuyList(val);
final StoreTradeList list = TradeController.getInstance().getBuyList(value);
if ((list != null) && list.getNpcId().equals(String.valueOf(getNpcId())))
{
final BuyList bl = new BuyList(list, player.getAdena(), 0);
@@ -126,7 +126,7 @@ public class MercManagerInstance extends FolkInstance
else
{
LOGGER.warning("possible client hacker: " + player.getName() + " attempting to buy from GM shop! (L2MercManagerIntance)");
LOGGER.warning("buylist id:" + val);
LOGGER.warning("buylist id:" + value);
}
}
@@ -156,7 +156,7 @@ public class MercManagerInstance extends FolkInstance
{
if ((getCastle() != null) && (getCastle().getCastleId() > 0) && (player.getClan() != null))
{
if (getCastle().getSiege().getIsInProgress())
if (getCastle().getSiege().isInProgress())
{
return COND_BUSY_BECAUSE_OF_SIEGE; // Busy because of siege
}
@@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.WearList;
public class MerchantInstance extends FolkInstance
{
/**
* Instantiates a new l2 merchant instance.
* Instantiates a new merchant instance.
* @param objectId the object id
* @param template the template
*/
@@ -46,17 +46,17 @@ public class MerchantInstance extends FolkInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
if (val == 0)
if (value == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
pom = npcId + "-" + value;
}
return "data/html/merchant/" + pom + ".htm";
@@ -65,12 +65,12 @@ public class MerchantInstance extends FolkInstance
/**
* Show wear window.
* @param player the player
* @param val the val
* @param value the value
*/
private void showWearWindow(PlayerInstance player, int val)
private void showWearWindow(PlayerInstance player, int value)
{
player.tempInvetoryDisable();
final StoreTradeList list = TradeController.getInstance().getBuyList(val);
final StoreTradeList list = TradeController.getInstance().getBuyList(value);
if (list != null)
{
@@ -79,7 +79,7 @@ public class MerchantInstance extends FolkInstance
}
else
{
LOGGER.warning("no buylist with id:" + val);
LOGGER.warning("no buylist with id:" + value);
player.sendPacket(ActionFailed.STATIC_PACKET);
}
}
@@ -87,20 +87,20 @@ public class MerchantInstance extends FolkInstance
/**
* Show buy window.
* @param player the player
* @param val the val
* @param value the value
*/
private void showBuyWindow(PlayerInstance player, int val)
private void showBuyWindow(PlayerInstance player, int value)
{
double taxRate = 0;
if (getIsInTown())
if (isInTown())
{
taxRate = getCastle().getTaxRate();
}
player.tempInvetoryDisable();
final StoreTradeList list = TradeController.getInstance().getBuyList(val);
final StoreTradeList list = TradeController.getInstance().getBuyList(value);
if ((list != null) && list.getNpcId().equals(String.valueOf(getNpcId())))
{
final BuyList bl = new BuyList(list, player.getAdena(), taxRate);
@@ -109,7 +109,7 @@ public class MerchantInstance extends FolkInstance
else
{
LOGGER.warning("possible client hacker: " + player.getName() + " attempting to buy from GM shop! (L2MechantInstance)");
LOGGER.warning("buylist id:" + val);
LOGGER.warning("buylist id:" + value);
}
player.sendPacket(ActionFailed.STATIC_PACKET);
@@ -225,9 +225,9 @@ public class MerchantInstance extends FolkInstance
/**
* Try rent pet.
* @param player the player
* @param val the val
* @param value the value
*/
public void tryRentPet(PlayerInstance player, int val)
public void tryRentPet(PlayerInstance player, int value)
{
if ((player == null) || (player.getPet() != null) || player.isMounted() || player.isRentedPet())
{
@@ -255,10 +255,10 @@ public class MerchantInstance extends FolkInstance
1800
};
if (val > 10)
if (value > 10)
{
petId = 12526;
val -= 10;
value -= 10;
price /= 2;
}
else
@@ -266,13 +266,13 @@ public class MerchantInstance extends FolkInstance
petId = 12621;
}
if ((val < 1) || (val > 4))
if ((value < 1) || (value > 4))
{
return;
}
price *= cost[val - 1];
final int time = ridetime[val - 1];
price *= cost[value - 1];
final int time = ridetime[value - 1];
if (!player.reduceAdena("Rent", (int) price, player.getLastFolkNPC(), true))
{
@@ -74,7 +74,7 @@ import org.l2jmobius.gameserver.model.quest.EventType;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.model.spawn.Spawn;
import org.l2jmobius.gameserver.model.zone.type.TownZone;
import org.l2jmobius.gameserver.network.GameClient;
@@ -242,14 +242,14 @@ public class NpcInstance extends Creature
return _scriptValue;
}
public void setScriptValue(int val)
public void setScriptValue(int value)
{
_scriptValue = val;
_scriptValue = value;
}
public boolean isScriptValue(int val)
public boolean isScriptValue(int value)
{
return _scriptValue == val;
return _scriptValue == value;
}
@Override
@@ -514,7 +514,7 @@ public class NpcInstance extends Creature
* Gets the checks if is spoiled by.
* @return the checks if is spoiled by
*/
public int getIsSpoiledBy()
public int getSpoiledBy()
{
return _isSpoiledBy;
}
@@ -523,7 +523,7 @@ public class NpcInstance extends Creature
* Sets the checks if is spoiled by.
* @param value the new checks if is spoiled by
*/
public void setIsSpoiledBy(int value)
public void setSpoiledBy(int value)
{
_isSpoiledBy = value;
}
@@ -866,7 +866,7 @@ public class NpcInstance extends Creature
html1.append("<font color=\"LEVEL\">Combat</font>");
html1.append("<table border=\"0\" width=\"100%\">");
html1.append("<tr><td>Current HP</td><td>" + getCurrentHp() + "</td><td>Current MP</td><td>" + getCurrentMp() + "</td></tr>");
html1.append("<tr><td>Max.HP</td><td>" + (int) (getMaxHp() / getStat().calcStat(Stats.MAX_HP, 1, this, null)) + "*" + getStat().calcStat(Stats.MAX_HP, 1, this, null) + "</td><td>Max.MP</td><td>" + getMaxMp() + "</td></tr>");
html1.append("<tr><td>Max.HP</td><td>" + (int) (getMaxHp() / getStat().calcStat(Stat.MAX_HP, 1, this, null)) + "*" + getStat().calcStat(Stat.MAX_HP, 1, this, null) + "</td><td>Max.MP</td><td>" + getMaxMp() + "</td></tr>");
html1.append("<tr><td>P.Atk.</td><td>" + getPAtk(null) + "</td><td>M.Atk.</td><td>" + getMAtk(null, null) + "</td></tr>");
html1.append("<tr><td>P.Def.</td><td>" + getPDef(null) + "</td><td>M.Def.</td><td>" + getMDef(null, null) + "</td></tr>");
html1.append("<tr><td>Accuracy</td><td>" + getAccuracy() + "</td><td>Evasion</td><td>" + getEvasionRate(null) + "</td></tr>");
@@ -916,7 +916,7 @@ public class NpcInstance extends Creature
html1.append("<br><center><font color=\"LEVEL\">[Combat Stats]</font></center>");
html1.append("<table border=0 width=\"100%\">");
html1.append("<tr><td>Max.HP</td><td>" + (int) (getMaxHp() / getStat().calcStat(Stats.MAX_HP, 1, this, null)) + "*" + (int) getStat().calcStat(Stats.MAX_HP, 1, this, null) + "</td><td>Max.MP</td><td>" + getMaxMp() + "</td></tr>");
html1.append("<tr><td>Max.HP</td><td>" + (int) (getMaxHp() / getStat().calcStat(Stat.MAX_HP, 1, this, null)) + "*" + (int) getStat().calcStat(Stat.MAX_HP, 1, this, null) + "</td><td>Max.MP</td><td>" + getMaxMp() + "</td></tr>");
html1.append("<tr><td>P.Atk.</td><td>" + getPAtk(null) + "</td><td>M.Atk.</td><td>" + getMAtk(null, null) + "</td></tr>");
html1.append("<tr><td>P.Def.</td><td>" + getPDef(null) + "</td><td>M.Def.</td><td>" + getMDef(null, null) + "</td></tr>");
html1.append("<tr><td>Accuracy</td><td>" + getAccuracy() + "</td><td>Evasion</td><td>" + getEvasionRate(null) + "</td></tr>");
@@ -1186,7 +1186,7 @@ public class NpcInstance extends Creature
* Gets the checks if is in town.
* @return the checks if is in town
*/
public boolean getIsInTown()
public boolean isInTown()
{
if (_castleIndex < 0)
{
@@ -1699,20 +1699,20 @@ public class NpcInstance extends Creature
* <li>GuardInstance : Set the pathfile to data/html/guard/12006-1.htm (npcId-page number)</li><BR>
* <BR>
* @param npcId The Identifier of the NpcInstance whose text must be display
* @param val The number of the page to display
* @param value The number of the page to display
* @return the html path
*/
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
if (val == 0)
if (value == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
pom = npcId + "-" + value;
}
final String temp = "data/html/default/" + pom + ".htm";
@@ -1937,7 +1937,7 @@ public class NpcInstance extends Creature
* <li>Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance</li>
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><BR>
* @param player The PlayerInstance that talk with the NpcInstance
* @param val The number of the page of the NpcInstance to display
* @param value The number of the page of the NpcInstance to display
*/
// 0 - first buy lottery ticket window
// 1-20 - buttons
@@ -1946,19 +1946,19 @@ public class NpcInstance extends Creature
// 23 - current lottery jackpot
// 24 - Previous winning numbers/Prize claim
// >24 - check lottery ticket by item object id
public void showLotoWindow(PlayerInstance player, int val)
public void showLotoWindow(PlayerInstance player, int value)
{
final int npcId = getTemplate().getNpcId();
String filename;
SystemMessage sm;
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
if (val == 0) // 0 - first buy lottery ticket window
if (value == 0) // 0 - first buy lottery ticket window
{
filename = getHtmlPath(npcId, 1);
html.setFile(filename);
}
else if ((val >= 1) && (val <= 21)) // 1-20 - buttons, 21 - second buy lottery ticket window
else if ((value >= 1) && (value <= 21)) // 1-20 - buttons, 21 - second buy lottery ticket window
{
if (!Lottery.getInstance().isStarted())
{
@@ -1981,7 +1981,7 @@ public class NpcInstance extends Creature
// counting buttons and unsetting button if found
for (int i = 0; i < 5; i++)
{
if (player.getLoto(i) == val)
if (player.getLoto(i) == value)
{
// unsetting button
player.setLoto(i, 0);
@@ -1994,13 +1994,13 @@ public class NpcInstance extends Creature
}
// if not rearched limit 5 and not unseted value
if ((count < 5) && (found == 0) && (val <= 20))
if ((count < 5) && (found == 0) && (value <= 20))
{
for (int i = 0; i < 5; i++)
{
if (player.getLoto(i) == 0)
{
player.setLoto(i, val);
player.setLoto(i, value);
break;
}
}
@@ -2031,7 +2031,7 @@ public class NpcInstance extends Creature
html.replace(search, replace);
}
}
else if (val == 22) // 22 - selected ticket with 5 numbers
else if (value == 22) // 22 - selected ticket with 5 numbers
{
if (!Lottery.getInstance().isStarted())
{
@@ -2100,12 +2100,12 @@ public class NpcInstance extends Creature
filename = getHtmlPath(npcId, 3);
html.setFile(filename);
}
else if (val == 23) // 23 - current lottery jackpot
else if (value == 23) // 23 - current lottery jackpot
{
filename = getHtmlPath(npcId, 3);
html.setFile(filename);
}
else if (val == 24) // 24 - Previous winning numbers/Prize claim
else if (value == 24) // 24 - Previous winning numbers/Prize claim
{
filename = getHtmlPath(npcId, 4);
html.setFile(filename);
@@ -2163,10 +2163,10 @@ public class NpcInstance extends Creature
}
html.replace("%result%", message);
}
else if (val > 24) // >24 - check lottery ticket by item object id
else if (value > 24) // >24 - check lottery ticket by item object id
{
final int lotonumber = Lottery.getInstance().getId();
final ItemInstance item = player.getInventory().getItemByObjectId(val);
final ItemInstance item = player.getInventory().getItemByObjectId(value);
if ((item == null) || (item.getItemId() != 4442) || (item.getCustomType1() >= lotonumber))
{
return;
@@ -2357,9 +2357,9 @@ public class NpcInstance extends Creature
* <li>Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance</li>
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><BR>
* @param player The PlayerInstance that talk with the NpcInstance
* @param val The number of the page of the NpcInstance to display
* @param value The number of the page of the NpcInstance to display
*/
public void showChatWindow(PlayerInstance player, int val)
public void showChatWindow(PlayerInstance player, int value)
{
// Like L2OFF if char is dead, is sitting, is in trade or is in fakedeath can't speak with npcs
if (player.isSitting() || player.isDead() || player.isFakeDeath() || (player.getActiveTradeList() != null))
@@ -2399,7 +2399,7 @@ public class NpcInstance extends Creature
}
}
if ((getTemplate().getType() == "Auctioneer") && (val == 0))
if ((getTemplate().getType() == "Auctioneer") && (value == 0))
{
return;
}
@@ -2595,19 +2595,19 @@ public class NpcInstance extends Creature
}
case SevenSigns.CABAL_NULL:
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
break;
}
}
}
else
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
}
}
else
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
}
}
else if (playerCabal == SevenSigns.CABAL_NULL)
@@ -2616,7 +2616,7 @@ public class NpcInstance extends Creature
}
else
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
}
break;
}
@@ -2649,19 +2649,19 @@ public class NpcInstance extends Creature
}
case SevenSigns.CABAL_NULL:
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
break;
}
}
}
else
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
}
}
else
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
}
}
else if (playerCabal == SevenSigns.CABAL_NULL)
@@ -2670,7 +2670,7 @@ public class NpcInstance extends Creature
}
else
{
filename = getHtmlPath(npcId, val); // do the default!
filename = getHtmlPath(npcId, value); // do the default!
}
break;
}
@@ -2811,7 +2811,7 @@ public class NpcInstance extends Creature
}
else
{
filename = getHtmlPath(npcId, val);
filename = getHtmlPath(npcId, value);
}
break;
}
@@ -2824,7 +2824,7 @@ public class NpcInstance extends Creature
}
else
{
filename = getHtmlPath(npcId, val);
filename = getHtmlPath(npcId, value);
}
break;
}
@@ -2839,7 +2839,7 @@ public class NpcInstance extends Creature
}
else
{
filename = getHtmlPath(npcId, val);
filename = getHtmlPath(npcId, value);
}
break;
}
@@ -2855,7 +2855,7 @@ public class NpcInstance extends Creature
return;
}
// Get the text of the selected HTML file in function of the npcId and of the page number
filename = getHtmlPath(npcId, val);
filename = getHtmlPath(npcId, value);
break;
}
}
@@ -2911,7 +2911,7 @@ public class NpcInstance extends Creature
*/
public int getExpReward()
{
final double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
final double rateXp = getStat().calcStat(Stat.MAX_HP, 1, this, null);
return (int) (getTemplate().getRewardExp() * rateXp * Config.RATE_XP);
}
@@ -2922,7 +2922,7 @@ public class NpcInstance extends Creature
*/
public int getSpReward()
{
final double rateSp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
final double rateSp = getStat().calcStat(Stat.MAX_HP, 1, this, null);
return (int) (getTemplate().getRewardSp() * rateSp * Config.RATE_SP);
}
@@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
public class ObservationInstance extends FolkInstance
{
/**
* Instantiates a new l2 observation instance.
* Instantiates a new observation instance.
* @param objectId the object id
* @param template the template
*/
@@ -95,16 +95,16 @@ public class ObservationInstance extends FolkInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
if (val == 0)
if (value == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
pom = npcId + "-" + value;
}
return "data/html/observation/" + pom + ".htm";
@@ -113,11 +113,11 @@ public class ObservationInstance extends FolkInstance
/**
* Do observe.
* @param player the player
* @param val the val
* @param value the value
*/
private void doObserve(PlayerInstance player, String val)
private void doObserve(PlayerInstance player, String value)
{
final StringTokenizer st = new StringTokenizer(val);
final StringTokenizer st = new StringTokenizer(value);
st.nextToken(); // Command
final int x = Integer.parseInt(st.nextToken());
final int y = Integer.parseInt(st.nextToken());
@@ -245,11 +245,11 @@ public class OlympiadManagerInstance extends FolkInstance
}
}
private void showChatWindow(PlayerInstance player, int val, String suffix)
private void showChatWindow(PlayerInstance player, int value, String suffix)
{
String filename = Olympiad.OLYMPIAD_HTML_PATH;
filename += "noble_desc" + val;
filename += "noble_desc" + value;
filename += (suffix != null) ? suffix + ".htm" : ".htm";
if (filename.equals(Olympiad.OLYMPIAD_HTML_PATH + "noble_desc0.htm"))
@@ -202,7 +202,7 @@ public class PetInstance extends Summon
}
/**
* Instantiates a new l2 pet instance.
* Instantiates a new pet instance.
* @param objectId the object id
* @param template the template
* @param owner the owner
@@ -159,9 +159,9 @@ import org.l2jmobius.gameserver.model.quest.EventType;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.model.skills.BaseStats;
import org.l2jmobius.gameserver.model.skills.BaseStat;
import org.l2jmobius.gameserver.model.skills.Formulas;
import org.l2jmobius.gameserver.model.skills.Stats;
import org.l2jmobius.gameserver.model.skills.Stat;
import org.l2jmobius.gameserver.model.skills.effects.EffectCharge;
import org.l2jmobius.gameserver.model.skills.handlers.SkillSummon;
import org.l2jmobius.gameserver.model.variables.AccountVariables;
@@ -1187,7 +1187,7 @@ public class PlayerInstance extends Playable
}
/**
* Instantiates a new l2 pc instance.
* Instantiates a new pc instance.
* @param objectId the object id
*/
private PlayerInstance(int objectId)
@@ -1384,7 +1384,7 @@ public class PlayerInstance extends Playable
* Checks if is in craft mode.
* @param isCrafting
*/
public void setIsCrafting(boolean isCrafting)
public void setCrafting(boolean isCrafting)
{
_isCrafting = isCrafting;
}
@@ -2310,8 +2310,8 @@ public class PlayerInstance extends Playable
return 176000;
}
final double baseLoad = Math.floor(BaseStats.CON.calcBonus(this) * 69000 * Config.ALT_WEIGHT_LIMIT);
return (int) calcStat(Stats.MAX_LOAD, baseLoad, this, null);
final double baseLoad = Math.floor(BaseStat.CON.calcBonus(this) * 69000 * Config.ALT_WEIGHT_LIMIT);
return (int) calcStat(Stat.MAX_LOAD, baseLoad, this, null);
}
/**
@@ -2362,11 +2362,11 @@ public class PlayerInstance extends Playable
{
if (Config.DISABLE_WEIGHT_PENALTY)
{
setIsOverloaded(false);
setOverloaded(false);
}
else if (_dietMode)
{
setIsOverloaded(false);
setOverloaded(false);
_curWeightPenalty = 0;
super.removeSkill(getKnownSkill(4270));
sendPacket(new EtcStatusUpdate(this));
@@ -2377,7 +2377,7 @@ public class PlayerInstance extends Playable
final int maxLoad = getMaxLoad();
if (maxLoad > 0)
{
final long weightproc = (long) (((getCurrentLoad() - calcStat(Stats.WEIGHT_PENALTY, 1, this, null)) * 1000) / maxLoad);
final long weightproc = (long) (((getCurrentLoad() - calcStat(Stat.WEIGHT_PENALTY, 1, this, null)) * 1000) / maxLoad);
int newWeightPenalty;
if (weightproc < 500)
@@ -3390,11 +3390,11 @@ public class PlayerInstance extends Playable
/**
* Set _waitTypeSitting to given value.
* @param state the new checks if is sitting
* @param value the new checks if is sitting
*/
public void setIsSitting(boolean state)
public void setSitting(boolean value)
{
_waitTypeSitting = state;
_waitTypeSitting = value;
}
/**
@@ -3412,14 +3412,14 @@ public class PlayerInstance extends Playable
return;
}
if (!_waitTypeSitting && !isAttackingDisabled() && !isOutOfControl() && !isImobilised())
if (!_waitTypeSitting && !isAttackingDisabled() && !isOutOfControl() && !isImmobilized())
{
breakAttack();
setIsSitting(true);
setSitting(true);
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_SITTING));
// Schedule a sit down task to wait for the animation to finish
ThreadPool.schedule(new SitDownTask(this), 2500);
setIsParalyzed(true);
setParalyzed(true);
}
}
@@ -3435,8 +3435,8 @@ public class PlayerInstance extends Playable
@Override
public void run()
{
setIsSitting(true);
_player.setIsParalyzed(false);
setSitting(true);
_player.setParalyzed(false);
_player.getAI().setIntention(CtrlIntention.AI_INTENTION_REST);
}
}
@@ -3453,8 +3453,8 @@ public class PlayerInstance extends Playable
@Override
public void run()
{
_player.setIsSitting(false);
_player.setIsImobilised(false);
_player.setSitting(false);
_player.setImmobilized(false);
_player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
}
}
@@ -3468,7 +3468,7 @@ public class PlayerInstance extends Playable
{
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_STANDING));
// Schedule a stand up task to wait for the animation to finish
setIsImobilised(true);
setImmobilized(true);
ThreadPool.schedule(new StandUpTask(this), 2000);
stopFakeDeath(null);
}
@@ -3499,18 +3499,18 @@ public class PlayerInstance extends Playable
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_STANDING));
// Schedule a stand up task to wait for the animation to finish
setIsImobilised(true);
setImmobilized(true);
ThreadPool.schedule(new StandUpTask(this), 2500);
}
}
/**
* Set the value of the _relax value. Must be True if using skill Relax and False if not.
* @param val the new relax
* @param value the new relax
*/
public void setRelax(boolean val)
public void setRelax(boolean value)
{
_relax = val;
_relax = value;
}
/**
@@ -4761,7 +4761,7 @@ public class PlayerInstance extends Playable
public void onAction(PlayerInstance player)
{
// no Interaction with not participant to events
if (((TvT.isStarted() || TvT.isTeleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.isStarted() || CTF.isTeleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.is_started() || DM.isTeleport()) && !Config.DM_ALLOW_INTERFERENCE))
if (((TvT.isStarted() || TvT.isTeleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.isStarted() || CTF.isTeleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.hasStarted() || DM.isTeleport()) && !Config.DM_ALLOW_INTERFERENCE))
{
if ((_inEventTvT && !player._inEventTvT) || (!_inEventTvT && player._inEventTvT))
{
@@ -4827,7 +4827,7 @@ public class PlayerInstance extends Playable
{
final Siege siege = SiegeManager.getInstance().getSiege(player);
if ((siege != null) && siege.getIsInProgress())
if ((siege != null) && siege.isInProgress())
{
if ((player.getLevel() > 20) && (((Creature) player.getTarget()).getLevel() < 20))
{
@@ -4948,7 +4948,7 @@ public class PlayerInstance extends Playable
}
else // Like L2OFF set the target of the PlayerInstance player
{
if (((TvT.isStarted() || TvT.isTeleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.isStarted() || CTF.isTeleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.is_started() || DM.isTeleport()) && !Config.DM_ALLOW_INTERFERENCE))
if (((TvT.isStarted() || TvT.isTeleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.isStarted() || CTF.isTeleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.hasStarted() || DM.isTeleport()) && !Config.DM_ALLOW_INTERFERENCE))
{
if ((_inEventTvT && !player._inEventTvT) || (!_inEventTvT && player._inEventTvT))
{
@@ -5015,7 +5015,7 @@ public class PlayerInstance extends Playable
{
final Siege siege = SiegeManager.getInstance().getSiege(player);
if ((siege != null) && siege.getIsInProgress())
if ((siege != null) && siege.isInProgress())
{
if ((player.getLevel() > 20) && (((Creature) player.getTarget()).getLevel() < 20))
{
@@ -5177,7 +5177,7 @@ public class PlayerInstance extends Playable
public boolean isInStartedDMEvent()
{
return (DM.is_started() && _inEventDM);
return (DM.hasStarted() && _inEventDM);
}
public boolean isRegisteredInDMEvent()
@@ -5996,7 +5996,7 @@ public class PlayerInstance extends Playable
* Sets the checks if is wearing formal wear.
* @param value the new checks if is wearing formal wear
*/
public void setIsWearingFormalWear(boolean value)
public void setWearingFormalWear(boolean value)
{
_isWearingFormalWear = value;
}
@@ -6012,11 +6012,11 @@ public class PlayerInstance extends Playable
/**
* Sets the married.
* @param state the new married
* @param value the new married
*/
public void setMarried(boolean state)
public void setMarried(boolean value)
{
_married = state;
_married = value;
}
/**
@@ -6059,11 +6059,11 @@ public class PlayerInstance extends Playable
/**
* Sets the mary request.
* @param state the new mary request
* @param value the new mary request
*/
public void setMaryRequest(boolean state)
public void setMaryRequest(boolean value)
{
_marryrequest = state;
_marryrequest = value;
}
/**
@@ -6077,11 +6077,11 @@ public class PlayerInstance extends Playable
/**
* Sets the marry accepted.
* @param state the new marry accepted
* @param value the new marry accepted
*/
public void setMarryAccepted(boolean state)
public void setMarryAccepted(boolean value)
{
_marryaccepted = state;
_marryaccepted = value;
}
/**
@@ -6329,7 +6329,7 @@ public class PlayerInstance extends Playable
}
else if (_inEventDM && pk._inEventDM)
{
if (DM.isTeleport() || DM.is_started())
if (DM.isTeleport() || DM.hasStarted())
{
pk._countDMkills++;
final PlaySound ps = new PlaySound(0, "ItemSound.quest_itemget", this);
@@ -6349,7 +6349,7 @@ public class PlayerInstance extends Playable
sendMessage("You will be revived and teleported to spot in 20 seconds!");
ThreadPool.schedule(() ->
{
final Location ploc = DM.get_playersSpawnLocation();
final Location ploc = DM.getPlayersSpawnLocation();
teleToLocation(ploc.getX(), ploc.getY(), ploc.getZ(), false);
doRevive();
}, Config.DM_REVIVE_DELAY);
@@ -6357,12 +6357,12 @@ public class PlayerInstance extends Playable
}
else if (_inEventDM)
{
if (DM.isTeleport() || DM.is_started())
if (DM.isTeleport() || DM.hasStarted())
{
sendMessage("You will be revived and teleported to spot in 20 seconds!");
ThreadPool.schedule(() ->
{
final Location ploc = DM.get_playersSpawnLocation();
final Location ploc = DM.getPlayersSpawnLocation();
teleToLocation(ploc.getX(), ploc.getY(), ploc.getZ(), false);
doRevive();
}, 20000);
@@ -6505,7 +6505,7 @@ public class PlayerInstance extends Playable
*/
private void onDieDropItem(Creature killer)
{
if (atEvent || (TvT.isStarted() && _inEventTvT) || (DM.is_started() && _inEventDM) || (CTF.isStarted() && _inEventCTF) || (VIP._started && _inEventVIP) || (killer == null))
if (atEvent || (TvT.isStarted() && _inEventTvT) || (DM.hasStarted() && _inEventDM) || (CTF.isStarted() && _inEventCTF) || (VIP._started && _inEventVIP) || (killer == null))
{
return;
}
@@ -6628,7 +6628,7 @@ public class PlayerInstance extends Playable
return;
}
if ((_inEventCTF && CTF.isStarted()) || (_inEventTvT && TvT.isStarted()) || (_inEventVIP && VIP._started) || (_inEventDM && DM.is_started()))
if ((_inEventCTF && CTF.isStarted()) || (_inEventTvT && TvT.isStarted()) || (_inEventVIP && VIP._started) || (_inEventDM && DM.hasStarted()))
{
return;
}
@@ -6721,7 +6721,7 @@ public class PlayerInstance extends Playable
}
// 'No war' or 'One way war' -> 'Normal PK'
if ((!_inEventTvT || !TvT.isStarted()) || (!_inEventCTF || !CTF.isStarted()) || (!_inEventVIP || !VIP._started) || (!_inEventDM || !DM.is_started()))
if ((!_inEventTvT || !TvT.isStarted()) || (!_inEventCTF || !CTF.isStarted()) || (!_inEventVIP || !VIP._started) || (!_inEventDM || !DM.hasStarted()))
{
if (targetPlayer.getKarma() > 0) // Target player has karma
{
@@ -6750,7 +6750,7 @@ public class PlayerInstance extends Playable
Announcements.getInstance().announceToAll("Player " + getName() + " killed Player " + target.getName());
}
if (_inEventDM && DM.is_started())
if (_inEventDM && DM.hasStarted())
{
return;
}
@@ -6926,7 +6926,7 @@ public class PlayerInstance extends Playable
}
}
if ((TvT.isStarted() && _inEventTvT) || (DM.is_started() && _inEventDM) || (CTF.isStarted() && _inEventCTF) || (VIP._started && _inEventVIP))
if ((TvT.isStarted() && _inEventTvT) || (DM.hasStarted() && _inEventDM) || (CTF.isStarted() && _inEventCTF) || (VIP._started && _inEventVIP))
{
return;
}
@@ -7185,7 +7185,7 @@ public class PlayerInstance extends Playable
*/
public void increasePkKillsAndKarma(int targLVL)
{
if ((TvT.isStarted() && _inEventTvT) || (DM.is_started() && _inEventDM) || (CTF.isStarted() && _inEventCTF) || (VIP._started && _inEventVIP))
if ((TvT.isStarted() && _inEventTvT) || (DM.hasStarted() && _inEventDM) || (CTF.isStarted() && _inEventCTF) || (VIP._started && _inEventVIP))
{
return;
}
@@ -7339,7 +7339,7 @@ public class PlayerInstance extends Playable
*/
public void updatePvPStatus()
{
if ((TvT.isStarted() && _inEventTvT) || (CTF.isStarted() && _inEventCTF) || (DM.is_started() && _inEventDM) || (VIP._started && _inEventVIP))
if ((TvT.isStarted() && _inEventTvT) || (CTF.isStarted() && _inEventCTF) || (DM.hasStarted() && _inEventDM) || (VIP._started && _inEventVIP))
{
return;
}
@@ -7379,7 +7379,7 @@ public class PlayerInstance extends Playable
return;
}
if ((TvT.isStarted() && _inEventTvT && targetPlayer._inEventTvT) || (DM.is_started() && _inEventDM && targetPlayer._inEventDM) || (CTF.isStarted() && _inEventCTF && targetPlayer._inEventCTF) || (VIP._started && _inEventVIP && targetPlayer._inEventVIP))
if ((TvT.isStarted() && _inEventTvT && targetPlayer._inEventTvT) || (DM.hasStarted() && _inEventDM && targetPlayer._inEventDM) || (CTF.isStarted() && _inEventCTF && targetPlayer._inEventCTF) || (VIP._started && _inEventVIP && targetPlayer._inEventVIP))
{
return;
}
@@ -7470,7 +7470,7 @@ public class PlayerInstance extends Playable
// Calculate the Experience loss
long lostExp = 0;
if (!atEvent && (!_inEventTvT || !TvT.isStarted()) && (!_inEventDM || !DM.is_started()) && (!_inEventCTF || !CTF.isStarted()) && (!_inEventVIP || !VIP._started))
if (!atEvent && (!_inEventTvT || !TvT.isStarted()) && (!_inEventDM || !DM.hasStarted()) && (!_inEventCTF || !CTF.isStarted()) && (!_inEventVIP || !VIP._started))
{
final byte maxLvl = ExperienceData.getInstance().getMaxLevel();
if (lvl < maxLvl)
@@ -8537,7 +8537,7 @@ public class PlayerInstance extends Playable
* Sets the checks if is in7s dungeon.
* @param isIn7sDungeon the new checks if is in7s dungeon
*/
public void setIsIn7sDungeon(boolean isIn7sDungeon)
public void setIn7sDungeon(boolean isIn7sDungeon)
{
if (_isIn7sDungeon != isIn7sDungeon)
{
@@ -8859,7 +8859,7 @@ public class PlayerInstance extends Playable
player.setApprentice(rset.getInt("apprentice"));
player.setSponsor(rset.getInt("sponsor"));
player.setLvlJoinedAcademy(rset.getInt("lvl_joined_academy"));
player.setIsIn7sDungeon(rset.getInt("isin7sdungeon") == 1);
player.setIn7sDungeon(rset.getInt("isin7sdungeon") == 1);
player.setPunishLevel(rset.getInt("punish_level"));
if (player.getPunishLevel() != PunishLevel.NONE)
@@ -10353,7 +10353,7 @@ public class PlayerInstance extends Playable
// checks for events
if (player.isInFunEvent())
{
return (_inEventTvT && player._inEventTvT && TvT.isStarted() && !_teamNameTvT.equals(player._teamNameTvT)) || (_inEventCTF && player._inEventCTF && CTF.isStarted() && !_teamNameCTF.equals(player._teamNameCTF)) || (_inEventDM && player._inEventDM && DM.is_started()) || (_inEventVIP && player._inEventVIP && VIP._started);
return (_inEventTvT && player._inEventTvT && TvT.isStarted() && !_teamNameTvT.equals(player._teamNameTvT)) || (_inEventCTF && player._inEventCTF && CTF.isStarted() && !_teamNameCTF.equals(player._teamNameCTF)) || (_inEventDM && player._inEventDM && DM.hasStarted()) || (_inEventVIP && player._inEventVIP && VIP._started);
}
return false;
}
@@ -10429,7 +10429,7 @@ public class PlayerInstance extends Playable
if (getClan() != null)
{
final Siege siege = SiegeManager.getInstance().getSiege(this);
return ((siege != null) && siege.checkIsAttacker(getClan())) || DevastatedCastle.getInstance().getIsInProgress();
return ((siege != null) && siege.checkIsAttacker(getClan())) || DevastatedCastle.getInstance().isInProgress();
}
}
else if (attacker instanceof FortSiegeGuardInstance)
@@ -10677,8 +10677,8 @@ public class PlayerInstance extends Playable
// Ignore skill UNLOCK
if (skill.isOffensive() && (target instanceof DoorInstance))
{
final boolean isCastle = ((((DoorInstance) target).getCastle() != null) && (((DoorInstance) target).getCastle().getCastleId() > 0) && ((DoorInstance) target).getCastle().getSiege().getIsInProgress());
final boolean isFort = ((((DoorInstance) target).getFort() != null) && (((DoorInstance) target).getFort().getFortId() > 0) && ((DoorInstance) target).getFort().getSiege().getIsInProgress());
final boolean isCastle = ((((DoorInstance) target).getCastle() != null) && (((DoorInstance) target).getCastle().getCastleId() > 0) && ((DoorInstance) target).getCastle().getSiege().isInProgress());
final boolean isFort = ((((DoorInstance) target).getFort() != null) && (((DoorInstance) target).getFort().getFortId() > 0) && ((DoorInstance) target).getFort().getSiege().isInProgress());
if ((!isCastle && !isFort))
{
return;
@@ -10884,7 +10884,7 @@ public class PlayerInstance extends Playable
}
// Check if a Forced ATTACK is in progress on non-attackable target
if (!target.isAutoAttackable(this) && (!forceUse && ((skill.getId() != 3261) && (skill.getId() != 3260) && (skill.getId() != 3262))) && (!_inEventTvT || !TvT.isStarted()) && (!_inEventDM || !DM.is_started()) && (!_inEventCTF || !CTF.isStarted()) && (!_inEventVIP || !VIP._started) && (sklTargetType != SkillTargetType.TARGET_AURA) && (sklTargetType != SkillTargetType.TARGET_CLAN) && (sklTargetType != SkillTargetType.TARGET_ALLY) && (sklTargetType != SkillTargetType.TARGET_PARTY) && (sklTargetType != SkillTargetType.TARGET_SELF) && (sklTargetType != SkillTargetType.TARGET_GROUND))
if (!target.isAutoAttackable(this) && (!forceUse && ((skill.getId() != 3261) && (skill.getId() != 3260) && (skill.getId() != 3262))) && (!_inEventTvT || !TvT.isStarted()) && (!_inEventDM || !DM.hasStarted()) && (!_inEventCTF || !CTF.isStarted()) && (!_inEventVIP || !VIP._started) && (sklTargetType != SkillTargetType.TARGET_AURA) && (sklTargetType != SkillTargetType.TARGET_CLAN) && (sklTargetType != SkillTargetType.TARGET_ALLY) && (sklTargetType != SkillTargetType.TARGET_PARTY) && (sklTargetType != SkillTargetType.TARGET_SELF) && (sklTargetType != SkillTargetType.TARGET_GROUND))
{
// Send a Server->Client packet ActionFailed to the PlayerInstance
@@ -10951,7 +10951,7 @@ public class PlayerInstance extends Playable
// Check if the skill is Sweep type and if conditions not apply
if ((sklType == SkillType.SWEEP) && (target instanceof Attackable))
{
final int spoilerId = ((Attackable) target).getIsSpoiledBy();
final int spoilerId = ((Attackable) target).getSpoiledBy();
if (((Attackable) target).isDead())
{
@@ -11111,7 +11111,7 @@ public class PlayerInstance extends Playable
// Check if player and target are in events and on the same team.
if (target instanceof PlayerInstance)
{
if ((skill.isOffensive() && (_inEventTvT && ((PlayerInstance) target)._inEventTvT && TvT.isStarted() && !_teamNameTvT.equals(((PlayerInstance) target)._teamNameTvT))) || (_inEventCTF && ((PlayerInstance) target)._inEventCTF && CTF.isStarted() && !_teamNameCTF.equals(((PlayerInstance) target)._teamNameCTF)) || (_inEventDM && ((PlayerInstance) target)._inEventDM && DM.is_started()) || (_inEventVIP && ((PlayerInstance) target)._inEventVIP && VIP._started))
if ((skill.isOffensive() && (_inEventTvT && ((PlayerInstance) target)._inEventTvT && TvT.isStarted() && !_teamNameTvT.equals(((PlayerInstance) target)._teamNameTvT))) || (_inEventCTF && ((PlayerInstance) target)._inEventCTF && CTF.isStarted() && !_teamNameCTF.equals(((PlayerInstance) target)._teamNameCTF)) || (_inEventDM && ((PlayerInstance) target)._inEventDM && DM.hasStarted()) || (_inEventVIP && ((PlayerInstance) target)._inEventVIP && VIP._started))
{
return true;
}
@@ -11239,13 +11239,13 @@ public class PlayerInstance extends Playable
{
case 0:
{
setIsFlying(false);
setIsRiding(false);
setFlying(false);
setRiding(false);
break; // Dismounted
}
case 1:
{
setIsRiding(true);
setRiding(true);
if (isNoble())
{
final Skill striderAssaultSkill = SkillTable.getInstance().getInfo(325, 1);
@@ -11255,7 +11255,7 @@ public class PlayerInstance extends Playable
}
case 2:
{
setIsFlying(true);
setFlying(true);
break; // Flying Wyvern
}
}
@@ -11806,8 +11806,8 @@ public class PlayerInstance extends Playable
_observerMode = true;
setTarget(null);
stopMove(null);
setIsParalyzed(true);
setIsInvul(true);
setParalyzed(true);
setInvul(true);
_wasInvisible = getAppearance().isInvisible();
getAppearance().setInvisible();
@@ -11858,7 +11858,7 @@ public class PlayerInstance extends Playable
_observerMode = true;
setTarget(null);
setIsInvul(true);
setInvul(true);
_wasInvisible = getAppearance().isInvisible();
getAppearance().setInvisible();
@@ -11879,7 +11879,7 @@ public class PlayerInstance extends Playable
}
setTarget(null);
setXYZ(_obsX, _obsY, _obsZ);
setIsParalyzed(false);
setParalyzed(false);
if (_wasInvisible)
{
@@ -11890,7 +11890,7 @@ public class PlayerInstance extends Playable
getAppearance().setVisible();
}
setIsInvul(false);
setInvul(false);
if (getAI() != null)
{
@@ -11916,7 +11916,7 @@ public class PlayerInstance extends Playable
sendPacket(new ExOlympiadMode(0, this));
teleToLocation(_obsX, _obsY, _obsZ, true);
getAppearance().setVisible();
setIsInvul(false);
setInvul(false);
if (getAI() != null)
{
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
@@ -12114,11 +12114,11 @@ public class PlayerInstance extends Playable
/**
* Sets the loto.
* @param i the i
* @param val the val
* @param value the value
*/
public void setLoto(int i, int val)
public void setLoto(int i, int value)
{
_loto[i] = val;
_loto[i] = value;
}
/**
@@ -12134,11 +12134,11 @@ public class PlayerInstance extends Playable
/**
* Sets the race.
* @param i the i
* @param val the val
* @param value the value
*/
public void setRace(int i, int val)
public void setRace(int i, int value)
{
_race[i] = val;
_race[i] = value;
}
/**
@@ -12251,7 +12251,7 @@ public class PlayerInstance extends Playable
* Gets the checks if is pvp hero.
* @return the checks if is pvp hero
*/
public boolean getIsPVPHero()
public boolean isPVPHero()
{
return _isPvpHero;
}
@@ -12325,29 +12325,29 @@ public class PlayerInstance extends Playable
/**
* Sets the checks if is away.
* @param state the new checks if is away
* @param value the new checks if is away
*/
public void setIsAway(boolean state)
public void setAway(boolean value)
{
_isAway = state;
_isAway = value;
}
/**
* Sets the checks if is in olympiad mode.
* @param b the new checks if is in olympiad mode
* @param value the new checks if is in olympiad mode
*/
public void setIsInOlympiadMode(boolean b)
public void setInOlympiadMode(boolean value)
{
_inOlympiadMode = b;
_inOlympiadMode = value;
}
/**
* Sets the checks if is olympiad start.
* @param b the new checks if is olympiad start
* @param value the new checks if is olympiad start
*/
public void setIsOlympiadStart(boolean b)
public void setOlympiadStart(boolean value)
{
_olympiadStart = b;
_olympiadStart = value;
}
/**
@@ -12469,7 +12469,7 @@ public class PlayerInstance extends Playable
* Sets up the duel state using a non 0 duelId.
* @param duelId 0=not in a duel
*/
public void setIsInDuel(int duelId)
public void setInDuel(int duelId)
{
if (duelId > 0)
{
@@ -12567,11 +12567,11 @@ public class PlayerInstance extends Playable
/**
* Sets the noble.
* @param val the new noble
* @param value the new noble
*/
public void setNoble(boolean val)
public void setNoble(boolean value)
{
if (val)
if (value)
{
for (Skill s : NobleSkillTable.getInstance().GetNobleSkills())
{
@@ -12585,18 +12585,18 @@ public class PlayerInstance extends Playable
super.removeSkill(s); // Just Remove skills without deleting from Sql
}
}
_noble = val;
_noble = value;
sendSkillList();
}
/**
* Adds the clan leader skills.
* @param val the val
* @param value the value
*/
public void addClanLeaderSkills(boolean val)
public void addClanLeaderSkills(boolean value)
{
if (val)
if (value)
{
SiegeManager.getInstance().addSiegeSkills(this);
}
@@ -13406,14 +13406,14 @@ public class PlayerInstance extends Playable
if (!isGM() && isIn7sDungeon() && (SevenSigns.getInstance().getPlayerCabal(this) != SevenSigns.getInstance().getCabalHighestScore()))
{
teleToLocation(MapRegionTable.TeleportWhereType.Town);
setIsIn7sDungeon(false);
setIn7sDungeon(false);
sendMessage("You have been teleported to the nearest town due to the beginning of the Seal Validation period.");
}
}
else if (!isGM() && isIn7sDungeon() && (SevenSigns.getInstance().getPlayerCabal(this) == SevenSigns.CABAL_NULL))
{
teleToLocation(MapRegionTable.TeleportWhereType.Town);
setIsIn7sDungeon(false);
setIn7sDungeon(false);
sendMessage("You have been teleported to the nearest town because you have not signed for any cabal.");
}
@@ -13551,7 +13551,7 @@ public class PlayerInstance extends Playable
getParty().getDimensionalRift().memberRessurected(this);
}
if ((_inEventTvT && TvT.isStarted() && Config.TVT_REVIVE_RECOVERY) || (_inEventCTF && CTF.isStarted() && Config.CTF_REVIVE_RECOVERY) || (_inEventDM && DM.is_started() && Config.DM_REVIVE_RECOVERY))
if ((_inEventTvT && TvT.isStarted() && Config.TVT_REVIVE_RECOVERY) || (_inEventCTF && CTF.isStarted() && Config.CTF_REVIVE_RECOVERY) || (_inEventDM && DM.hasStarted() && Config.DM_REVIVE_RECOVERY))
{
getStatus().setCurrentHp(getMaxHp());
getStatus().setCurrentMp(getMaxMp());
@@ -14880,7 +14880,7 @@ public class PlayerInstance extends Playable
public void startFishing(int x, int y, int z)
{
stopMove(null);
setIsImobilised(true);
setImmobilized(true);
_fishing = true;
_fishX = x;
_fishY = y;
@@ -15291,7 +15291,7 @@ public class PlayerInstance extends Playable
_lure = null;
// Ends fishing
sendPacket(SystemMessageId.REEL_LINE_AND_STOP_FISHING);
setIsImobilised(false);
setImmobilized(false);
stopLookingForFishTask();
}
@@ -15350,7 +15350,7 @@ public class PlayerInstance extends Playable
{
ivlim = Config.INVENTORY_MAXIMUM_NO_DWARF;
}
ivlim += (int) getStat().calcStat(Stats.INV_LIM, 0, null, null);
ivlim += (int) getStat().calcStat(Stat.INV_LIM, 0, null, null);
return ivlim;
}
@@ -15366,7 +15366,7 @@ public class PlayerInstance extends Playable
{
whlim = Config.WAREHOUSE_SLOTS_NO_DWARF;
}
whlim += (int) getStat().calcStat(Stats.WH_LIM, 0, null, null);
whlim += (int) getStat().calcStat(Stat.WH_LIM, 0, null, null);
return whlim;
}
@@ -15383,7 +15383,7 @@ public class PlayerInstance extends Playable
{
pslim = Config.MAX_PVTSTORE_SLOTS_OTHER;
}
pslim += (int) getStat().calcStat(Stats.P_SELL_LIM, 0, null, null);
pslim += (int) getStat().calcStat(Stat.P_SELL_LIM, 0, null, null);
return pslim;
}
@@ -15399,27 +15399,27 @@ public class PlayerInstance extends Playable
{
pblim = Config.MAX_PVTSTORE_SLOTS_OTHER;
}
pblim += (int) getStat().calcStat(Stats.P_BUY_LIM, 0, null, null);
pblim += (int) getStat().calcStat(Stat.P_BUY_LIM, 0, null, null);
return pblim;
}
public int getFreightLimit()
{
return Config.FREIGHT_SLOTS + (int) getStat().calcStat(Stats.FREIGHT_LIM, 0, null, null);
return Config.FREIGHT_SLOTS + (int) getStat().calcStat(Stat.FREIGHT_LIM, 0, null, null);
}
public int getDwarfRecipeLimit()
{
int recdlim = Config.DWARF_RECIPE_LIMIT;
recdlim += (int) getStat().calcStat(Stats.REC_D_LIM, 0, null, null);
recdlim += (int) getStat().calcStat(Stat.REC_D_LIM, 0, null, null);
return recdlim;
}
public int getCommonRecipeLimit()
{
int recclim = Config.COMMON_RECIPE_LIMIT;
recclim += (int) getStat().calcStat(Stats.REC_C_LIM, 0, null, null);
recclim += (int) getStat().calcStat(Stat.REC_C_LIM, 0, null, null);
return recclim;
}
@@ -15543,11 +15543,11 @@ public class PlayerInstance extends Playable
/**
* Sets the charm of courage.
* @param val the new charm of courage
* @param value the new charm of courage
*/
public void setCharmOfCourage(boolean val)
public void setCharmOfCourage(boolean value)
{
_charmOfCourage = val;
_charmOfCourage = value;
sendPacket(new EtcStatusUpdate(this));
}
@@ -15827,11 +15827,11 @@ public class PlayerInstance extends Playable
/**
* Sets the gm status active.
* @param state the new gm status active
* @param value the new gm status active
*/
public void setGmStatusActive(boolean state)
public void setGmStatusActive(boolean value)
{
_gmStatus = state;
_gmStatus = value;
}
/**
@@ -16364,11 +16364,11 @@ public class PlayerInstance extends Playable
/**
* Sets the inside TW town.
* @param b the new inside TW town
* @param value the new inside TW town
*/
public void setInsideTWTown(boolean b)
public void setInsideTWTown(boolean value)
{
_isInsideTWTown = true;
_isInsideTWTown = true; // FIXME: TRUE?
}
/**
@@ -16465,11 +16465,11 @@ public class PlayerInstance extends Playable
/**
* Sets the aio.
* @param val the new aio
* @param value the new aio
*/
public void setAio(boolean val)
public void setAio(boolean value)
{
_isAio = val;
_isAio = value;
}
@@ -16507,39 +16507,39 @@ public class PlayerInstance extends Playable
/**
* Sets the aio end time.
* @param val the new aio end time
* @param value the new aio end time
*/
public void setAioEndTime(long val)
public void setAioEndTime(long value)
{
_aioEndTime = val;
_aioEndTime = value;
}
/**
* Sets the end time.
* @param process the process
* @param val the val
* @param value the value
*/
public void setEndTime(String process, int val)
public void setEndTime(String process, int value)
{
if (val > 0)
if (value > 0)
{
long endDay;
final Calendar calendar = Calendar.getInstance();
if (val >= 30)
if (value >= 30)
{
while (val >= 30)
while (value >= 30)
{
if (calendar.get(Calendar.MONTH) == 11)
{
calendar.roll(Calendar.YEAR, true);
}
calendar.roll(Calendar.MONTH, true);
val -= 30;
value -= 30;
}
}
if ((val < 30) && (val > 0))
if ((value < 30) && (value > 0))
{
while (val > 0)
while (value > 0)
{
if ((calendar.get(Calendar.DATE) == 28) && (calendar.get(Calendar.MONTH) == 1))
{
@@ -16554,7 +16554,7 @@ public class PlayerInstance extends Playable
calendar.roll(Calendar.MONTH, true);
}
calendar.roll(Calendar.DATE, true);
val--;
value--;
}
}
@@ -16706,7 +16706,7 @@ public class PlayerInstance extends Playable
* Sets the _awaying.
* @param awaying the _awaying to set
*/
public void set_awaying(boolean awaying)
public void setAwaying(boolean awaying)
{
_awaying = awaying;
}
@@ -17016,7 +17016,7 @@ public class PlayerInstance extends Playable
}
sendPacket(htmlMsg);
setInstanceId(0);
setIsIn7sDungeon(false);
setIn7sDungeon(false);
teleToLocation(-114356, -249645, -2984, false); // Jail
break;
@@ -17236,7 +17236,7 @@ public class PlayerInstance extends Playable
* Gets the _instance login time.
* @return the _instanceLoginTime
*/
public long get_instanceLoginTime()
public long getInstanceLoginTime()
{
return _instanceLoginTime;
}
@@ -17284,9 +17284,9 @@ public class PlayerInstance extends Playable
}
@Override
public void setIsTeleporting(boolean value)
public void setTeleporting(boolean value)
{
super.setIsTeleporting(value);
super.setTeleporting(value);
if (value)
{
_lastTeleportAction = System.currentTimeMillis();
@@ -17367,7 +17367,7 @@ public class PlayerInstance extends Playable
_obsZ = getZ();
}
setTarget(null);
setIsInvul(true);
setInvul(true);
getAppearance().setInvisible();
teleToLocation(x, y, z, true);
sendPacket(new ExOlympiadMode(3, this));
@@ -17386,7 +17386,7 @@ public class PlayerInstance extends Playable
}
if (!AdminData.getInstance().hasAccess("admin_invul", getAccessLevel()))
{
setIsInvul(false);
setInvul(false);
}
if (getAI() != null)
{
@@ -335,7 +335,7 @@ public class RaceManagerInstance extends NpcInstance
player.sendPacket(ActionFailed.STATIC_PACKET);
}
public void showBuyTicket(PlayerInstance player, int val)
public void showBuyTicket(PlayerInstance player, int value)
{
if (_state != ACCEPTING_BETS)
{
@@ -347,7 +347,7 @@ public class RaceManagerInstance extends NpcInstance
String search;
String replace;
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
if (val < 10)
if (value < 10)
{
filename = getHtmlPath(npcId, 2);
html.setFile(filename);
@@ -358,17 +358,17 @@ public class RaceManagerInstance extends NpcInstance
html.replace(search, MonsterRace.getInstance().getMonsters()[i].getTemplate().getName());
}
search = "No1";
if (val == 0)
if (value == 0)
{
html.replace(search, "");
}
else
{
html.replace(search, "" + val);
player.setRace(0, val);
html.replace(search, "" + value);
player.setRace(0, value);
}
}
else if (val < 20)
else if (value < 20)
{
if (player.getRace(0) == 0)
{
@@ -381,17 +381,17 @@ public class RaceManagerInstance extends NpcInstance
replace = MonsterRace.getInstance().getMonsters()[player.getRace(0) - 1].getTemplate().getName();
html.replace(search, replace);
search = "0adena";
if (val == 10)
if (value == 10)
{
html.replace(search, "");
}
else
{
html.replace(search, "" + _cost[val - 11]);
player.setRace(1, val - 10);
html.replace(search, "" + _cost[value - 11]);
player.setRace(1, value - 10);
}
}
else if (val == 20)
else if (value == 20)
{
if ((player.getRace(0) == 0) || (player.getRace(1) == 0))
{
@@ -96,7 +96,7 @@ public class RaidBossInstance extends MonsterInstance
}
}
if (!getSpawn().is_customBossInstance())
if (!getSpawn().isCustomBossInstance())
{
RaidBossSpawnManager.getInstance().updateStatus(this, true);
}

Some files were not shown because too many files have changed in this diff Show More