Proper naming for various methods and variables.
This commit is contained in:
@@ -432,7 +432,7 @@ public class InstanceManager implements IXmlReader
|
||||
* @param isInside when {@code true} find world where player is currently located, otherwise find world where player can enter
|
||||
* @return instance if found, otherwise {@code null}
|
||||
*/
|
||||
public Instance getPlayer(Player player, boolean isInside)
|
||||
public Instance getPlayerInstance(Player player, boolean isInside)
|
||||
{
|
||||
for (Instance instance : _instanceWorlds.values())
|
||||
{
|
||||
|
@@ -421,12 +421,12 @@ public abstract class ItemContainer
|
||||
*/
|
||||
public Item detachItem(String process, int itemObjectId, long count, ItemLocation newLocation, Player actor, Object reference)
|
||||
{
|
||||
final Item Item = getItemByObjectId(itemObjectId);
|
||||
if (Item == null)
|
||||
final Item item = getItemByObjectId(itemObjectId);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return detachItem(process, Item, count, newLocation, actor, reference);
|
||||
return detachItem(process, item, count, newLocation, actor, reference);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -984,21 +984,21 @@ public class Formulas
|
||||
*/
|
||||
public static double calcAttributeBonus(Creature attacker, Creature target, Skill skill)
|
||||
{
|
||||
int attack_attribute;
|
||||
int defence_attribute;
|
||||
int attackAttribute;
|
||||
int defenceAttribute;
|
||||
|
||||
if ((skill != null) && (skill.getAttributeType() != AttributeType.NONE))
|
||||
{
|
||||
attack_attribute = attacker.getAttackElementValue(skill.getAttributeType()) + skill.getAttributeValue();
|
||||
defence_attribute = target.getDefenseElementValue(skill.getAttributeType());
|
||||
attackAttribute = attacker.getAttackElementValue(skill.getAttributeType()) + skill.getAttributeValue();
|
||||
defenceAttribute = target.getDefenseElementValue(skill.getAttributeType());
|
||||
}
|
||||
else
|
||||
{
|
||||
attack_attribute = attacker.getAttackElementValue(attacker.getAttackElement());
|
||||
defence_attribute = target.getDefenseElementValue(attacker.getAttackElement());
|
||||
attackAttribute = attacker.getAttackElementValue(attacker.getAttackElement());
|
||||
defenceAttribute = target.getDefenseElementValue(attacker.getAttackElement());
|
||||
}
|
||||
|
||||
final int diff = attack_attribute - defence_attribute;
|
||||
final int diff = attackAttribute - defenceAttribute;
|
||||
if (diff > 0)
|
||||
{
|
||||
return Math.min(1.025 + (Math.sqrt(Math.pow(diff, 3) / 2) * 0.0001), 1.25);
|
||||
|
@@ -176,7 +176,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
if (Config.RESTORE_PLAYER_INSTANCE)
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final Instance instance = InstanceManager.getInstance().getPlayer(player, false);
|
||||
final Instance instance = InstanceManager.getInstance().getPlayerInstance(player, false);
|
||||
if ((instance != null) && (instance.getId() == vars.getInt("INSTANCE_RESTORE", 0)))
|
||||
{
|
||||
player.setInstance(instance);
|
||||
|
@@ -38,7 +38,7 @@ public class ExInzoneWaiting implements IClientOutgoingPacket
|
||||
|
||||
public ExInzoneWaiting(Player player, boolean hide)
|
||||
{
|
||||
final Instance instance = InstanceManager.getInstance().getPlayer(player, false);
|
||||
final Instance instance = InstanceManager.getInstance().getPlayerInstance(player, false);
|
||||
_currentTemplateId = ((instance != null) && (instance.getTemplateId() >= 0)) ? instance.getTemplateId() : -1;
|
||||
_instanceTimes = InstanceManager.getInstance().getAllInstanceTimes(player);
|
||||
_hide = hide;
|
||||
|
@@ -68,7 +68,7 @@ public class ExListPartyMatchingWaitingRoom implements IClientOutgoingPacket
|
||||
packet.writeS(player.getName());
|
||||
packet.writeD(player.getClassId().getId());
|
||||
packet.writeD(player.getLevel());
|
||||
final Instance instance = InstanceManager.getInstance().getPlayer(player, false);
|
||||
final Instance instance = InstanceManager.getInstance().getPlayerInstance(player, false);
|
||||
packet.writeD((instance != null) && (instance.getTemplateId() >= 0) ? instance.getTemplateId() : -1);
|
||||
final Map<Integer, Long> instanceTimes = InstanceManager.getInstance().getAllInstanceTimes(player);
|
||||
packet.writeD(instanceTimes.size());
|
||||
|
Reference in New Issue
Block a user