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

View File

@@ -1207,11 +1207,11 @@ public class AdminCommands extends Thread
showSkillsPage(client);
}
private void adminAddSkill(ClientThread client, String val)
private void adminAddSkill(ClientThread client, String value)
{
final PlayerInstance activeChar = client.getActiveChar();
final PlayerInstance player = World.getInstance().getPlayer(_characterToManipulate);
final StringTokenizer st = new StringTokenizer(val);
final StringTokenizer st = new StringTokenizer(value);
if (st.countTokens() != 2)
{
showSkillsPage(client);
@@ -1255,10 +1255,10 @@ public class AdminCommands extends Thread
removeSkillsPage(client);
}
public void showSkill(ClientThread client, String val)
public void showSkill(ClientThread client, String value)
{
final PlayerInstance activeChar = client.getActiveChar();
final int skillid = Integer.parseInt(val);
final int skillid = Integer.parseInt(value);
final Skill skill = SkillTable.getInstance().getInfo(skillid, 1);
if ((skill != null) && (skill.getTargetType() == 0))
{

View File

@@ -341,9 +341,9 @@ public class Attackable extends NpcInstance
return _active;
}
public void setActive(boolean b)
public void setActive(boolean value)
{
_active = b;
_active = value;
}
// public void setMoveRadius(int i)

View File

@@ -245,7 +245,7 @@ public abstract class Creature extends WorldObject
setX(getX());
setY(getY());
setZ(getZ());
setIsMoving(false);
setMoving(false);
}
public int getCon()
@@ -726,9 +726,9 @@ public abstract class Creature extends WorldObject
return _running;
}
public void setRunning(boolean b)
public void setRunning(boolean value)
{
_running = b;
_running = value;
updateEffectiveSpeed();
}
@@ -937,7 +937,7 @@ public abstract class Creature extends WorldObject
if (getCurrentState() == CreatureState.INTERACT)
{
_moveTask = ThreadPool.schedule(newMoveTask, _timeToTarget);
setIsMoving(true);
setMoving(true);
return;
}
if ((_timeToTarget < 2000L) && (distance > getAttackRange()))
@@ -957,7 +957,7 @@ public abstract class Creature extends WorldObject
{
_moveTask = ThreadPool.schedule(newMoveTask, _timeToTarget);
}
setIsMoving(true);
setMoving(true);
}
}
@@ -979,9 +979,9 @@ public abstract class Creature extends WorldObject
}
}
public void setIsMoving(boolean b)
public void setMoving(boolean value)
{
_moving = b;
_moving = value;
}
public double getDistance(int x, int y)
@@ -1308,9 +1308,9 @@ public abstract class Creature extends WorldObject
_activeSoulShotGrade = soulshotGrade;
}
public void setMovingToPawn(boolean val)
public void setMovingToPawn(boolean value)
{
_movingToPawn = val;
_movingToPawn = value;
}
public void setPawnTarget(Creature target)

View File

@@ -122,9 +122,9 @@ public class ClassMasterInstance extends NpcInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
return "data/html/classmaster/" + val + ".htm";
return "data/html/classmaster/" + value + ".htm";
}
@Override
@@ -141,9 +141,9 @@ public class ClassMasterInstance extends NpcInstance
}
}
private void changeClass(PlayerInstance player, int val)
private void changeClass(PlayerInstance player, int value)
{
player.setClassId(val);
player.setClassId(value);
final UserInfo ui = new UserInfo(player);
player.sendPacket(ui);
final CharInfo info = new CharInfo(player);

View File

@@ -91,10 +91,10 @@ public class GuardInstance extends Attackable
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
pom = val == 0 ? "" + npcId : npcId + "-" + val;
pom = value == 0 ? "" + npcId : npcId + "-" + value;
return "data/html/guard/" + pom + ".htm";
}

View File

@@ -130,9 +130,9 @@ public class ItemInstance extends WorldObject
return _onTheGround;
}
public void setOnTheGround(boolean b)
public void setOnTheGround(boolean value)
{
_onTheGround = b;
_onTheGround = value;
}
@Override

View File

@@ -36,23 +36,23 @@ public class MerchantInstance extends NpcInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
pom = val == 0 ? "" + npcId : npcId + "-" + val;
pom = value == 0 ? "" + npcId : npcId + "-" + value;
return "data/html/merchant/" + pom + ".htm";
}
private void showBuyWindow(PlayerInstance player, int val)
private void showBuyWindow(PlayerInstance player, int value)
{
final TradeList list = TradeController.getInstance().getBuyList(val);
final TradeList list = TradeController.getInstance().getBuyList(value);
if (list != null)
{
player.sendPacket(new BuyList(list, player.getAdena()));
}
else
{
_log.warning("no buylist with id:" + val);
_log.warning("no buylist with id:" + value);
}
player.sendPacket(new ActionFailed());
}

View File

@@ -229,7 +229,7 @@ public class NpcInstance extends Creature
player.sendPacket(npcReply);
}
protected void showQuestWindow(PlayerInstance player, int val)
protected void showQuestWindow(PlayerInstance player, int value)
{
final NpcHtmlMessage html = new NpcHtmlMessage(1);
html.setHtml("<html><head><body>There is no quests here yet.</body></html>");
@@ -237,10 +237,10 @@ public class NpcInstance extends Creature
player.sendPacket(new ActionFailed());
}
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
pom = val == 0 ? "" + npcId : npcId + "-" + val;
pom = value == 0 ? "" + npcId : npcId + "-" + value;
final String temp = "data/html/default/" + pom + ".htm";
final File mainText = new File(temp);
if (mainText.exists())
@@ -250,10 +250,10 @@ public class NpcInstance extends Creature
return "data/html/npcdefault.htm";
}
public void showChatWindow(PlayerInstance player, int val)
public void showChatWindow(PlayerInstance player, int value)
{
final int npcId = getNpcTemplate().getNpcId();
final String filename = getHtmlPath(npcId, val);
final String filename = getHtmlPath(npcId, value);
final File file = new File(filename);
if (!file.exists())
{

View File

@@ -562,9 +562,9 @@ public class PetInstance extends Creature
_attackRange = range;
}
public void setFollowStatus(boolean state)
public void setFollowStatus(boolean value)
{
_follow = state;
_follow = value;
}
public boolean getFollowStatus()

View File

@@ -1031,19 +1031,19 @@ public class PlayerInstance extends Creature
broadcastPacket(userInfo);
}
public void setPartyMatchingAutomaticRegistration(boolean b)
public void setPartyMatchingAutomaticRegistration(boolean value)
{
_partyMatchingAutomaticRegistration = b;
_partyMatchingAutomaticRegistration = value;
}
public void setPartyMatchingShowLevel(boolean b)
public void setPartyMatchingShowLevel(boolean value)
{
_partyMatchingShowLevel = b;
_partyMatchingShowLevel = value;
}
public void setPartyMatchingShowClass(boolean b)
public void setPartyMatchingShowClass(boolean value)
{
_partyMatchingShowClass = b;
_partyMatchingShowClass = value;
}
public void setPartyMatchingMemo(String memo)
@@ -1464,9 +1464,9 @@ public class PlayerInstance extends Creature
return _clan;
}
public void setIsClanLeader(boolean b)
public void setClanLeader(boolean value)
{
_clanLeader = b;
_clanLeader = value;
}
public boolean isClanLeader()
@@ -1745,9 +1745,9 @@ public class PlayerInstance extends Creature
_allSkillsDisabled = false;
}
public void setIsInvul(boolean b)
public void setInvul(boolean value)
{
_isInvul = b;
_isInvul = value;
}
public boolean isInvul()
@@ -1785,7 +1785,7 @@ public class PlayerInstance extends Creature
return _party;
}
public void setIsGM(boolean status)
public void setGM(boolean status)
{
_isGm = status;
}

View File

@@ -46,16 +46,16 @@ public class TeleporterInstance extends NpcInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
pom = val == 0 ? "" + npcId : npcId + "-" + val;
pom = value == 0 ? "" + npcId : npcId + "-" + value;
return "data/html/teleporter/" + pom + ".htm";
}
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)
{
if (player.getAdena() >= list.getPrice())
@@ -71,7 +71,7 @@ public class TeleporterInstance extends NpcInstance
}
else
{
_log.warning("No teleport destination with id:" + val);
_log.warning("No teleport destination with id:" + value);
}
player.sendPacket(new ActionFailed());
}

View File

@@ -31,10 +31,10 @@ public class TrainerInstance extends NpcInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
pom = val == 0 ? "" + npcId : npcId + "-" + val;
pom = value == 0 ? "" + npcId : npcId + "-" + value;
return "data/html/trainer/" + pom + ".htm";
}

View File

@@ -43,10 +43,10 @@ public class VillageMasterInstance extends NpcInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
pom = val == 0 ? "" + npcId : npcId + "-" + val;
pom = value == 0 ? "" + npcId : npcId + "-" + value;
return "data/html/villagemaster/" + pom + ".htm";
}
@@ -79,7 +79,7 @@ public class VillageMasterInstance extends NpcInstance
}
player.setClan(clan);
player.setClanId(clan.getClanId());
player.setIsClanLeader(true);
player.setClanLeader(true);
final PledgeShowInfoUpdate pu = new PledgeShowInfoUpdate(clan, player);
player.sendPacket(pu);
final UserInfo ui = new UserInfo(player);

View File

@@ -36,10 +36,10 @@ public class WarehouseInstance extends NpcInstance
}
@Override
public String getHtmlPath(int npcId, int val)
public String getHtmlPath(int npcId, int value)
{
String pom = "";
pom = val == 0 ? "" + npcId : npcId + "-" + val;
pom = value == 0 ? "" + npcId : npcId + "-" + value;
return "data/html/warehouse/" + pom + ".htm";
}

View File

@@ -278,7 +278,7 @@ public class ClientThread extends Thread
else
{
character.setClan(clan);
character.setIsClanLeader(clan.getLeaderId() == character.getObjectId());
character.setClanLeader(clan.getLeaderId() == character.getObjectId());
}
}
}

View File

@@ -43,7 +43,7 @@ public class EnterWorld extends ClientBasePacket
final PlayerInstance activeChar = client.getActiveChar();
if (client.getAccessLevel() >= 100)
{
activeChar.setIsGM(true);
activeChar.setGM(true);
GmListManager.getInstance().addGm(activeChar);
}

View File

@@ -71,12 +71,12 @@ public class SendBypassBuildCmd extends ClientBasePacket
{
if (activeChar.isInvul())
{
activeChar.setIsInvul(false);
activeChar.setInvul(false);
activeChar.sendMessage("Your status is set back to mortal.");
}
else
{
activeChar.setIsInvul(true);
activeChar.setInvul(true);
activeChar.sendMessage("You are now Invulnerable.");
}
}