Code review Part 4.
This commit is contained in:
@@ -42,7 +42,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
"admin_fcs",
|
||||
};
|
||||
|
||||
// TODO: remove from gm list etc etc
|
||||
@Override
|
||||
public boolean useAdminCommand(String command, PlayerInstance activeChar)
|
||||
{
|
||||
@@ -212,8 +211,8 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
|
||||
for (int i = 0; i < 10000; i++)
|
||||
{
|
||||
final boolean isMiss1 = Formulas.calcHitMiss(npc1, npc2);
|
||||
if (isMiss1)
|
||||
final boolean calcMiss1 = Formulas.calcHitMiss(npc1, npc2);
|
||||
if (calcMiss1)
|
||||
{
|
||||
miss1++;
|
||||
}
|
||||
@@ -228,14 +227,14 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
crit1++;
|
||||
}
|
||||
|
||||
double npc1Patk1 = npc1.getPAtk(npc2);
|
||||
npc1Patk1 += npc1.getRandomDamageMultiplier();
|
||||
patk1 += npc1Patk1;
|
||||
double npcPatk1 = npc1.getPAtk(npc2);
|
||||
npcPatk1 += npc1.getRandomDamageMultiplier();
|
||||
patk1 += npcPatk1;
|
||||
|
||||
final double npc1Pdef1 = npc1.getPDef(npc2);
|
||||
pdef1 += npc1Pdef1;
|
||||
final double npcPdef1 = npc1.getPDef(npc2);
|
||||
pdef1 += npcPdef1;
|
||||
|
||||
if (!isMiss1)
|
||||
if (!calcMiss1)
|
||||
{
|
||||
final double calcDmg1 = Formulas.calcPhysDam(npc1, npc2, null, calcShld1, calcCrit1, false);
|
||||
dmg1 += calcDmg1;
|
||||
@@ -261,9 +260,9 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
crit2++;
|
||||
}
|
||||
|
||||
double npc2Patk2 = npc2.getPAtk(npc1);
|
||||
npc2Patk2 *= npc2.getRandomDamageMultiplier();
|
||||
patk2 += npc2Patk2;
|
||||
double npcPatk2 = npc2.getPAtk(npc1);
|
||||
npcPatk2 *= npc2.getRandomDamageMultiplier();
|
||||
patk2 += npcPatk2;
|
||||
|
||||
final double npcPdef2 = npc2.getPDef(npc1);
|
||||
pdef2 += npcPdef2;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ExperienceGain implements IVoicedCommandHandler
|
||||
{
|
||||
if (!player.getVariables().getBoolean("EXPOFF", false))
|
||||
{
|
||||
player.addListener(new FunctionEventListener(player, EventType.ON_PLAYABLE_EXP_CHANGED, (OnPlayableExpChanged event) -> onExperienceReceived(event.getActiveChar(), event.getNewExp() - event.getOldExp()), this));
|
||||
player.addListener(new FunctionEventListener(player, EventType.ON_PLAYABLE_EXP_CHANGED, (OnPlayableExpChanged event) -> onExperienceReceived(event.getActiveChar()), this));
|
||||
player.getVariables().set("EXPOFF", true);
|
||||
player.sendMessage("Experience gain is disabled.");
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class ExperienceGain implements IVoicedCommandHandler
|
||||
return true;
|
||||
}
|
||||
|
||||
public TerminateReturn onExperienceReceived(Playable playable, long exp)
|
||||
public TerminateReturn onExperienceReceived(Playable playable)
|
||||
{
|
||||
if (playable.isPlayer() && (playable.getActingPlayer().isDead()))
|
||||
{
|
||||
|
||||
@@ -327,7 +327,7 @@ public class ClassMasterInstance extends MerchantInstance
|
||||
}
|
||||
|
||||
String msg = HtmCache.getInstance().getHtm(player, "data/html/classmaster/tutorialtemplate.htm");
|
||||
msg = msg.replace("%name%", ClassListData.getInstance().getClass(currentClassId).getEscapedClientCode());
|
||||
msg = msg.replace("%name%", ClassListData.getInstance().getClass(currentClassId).getClassName()); // getEscapedClientCode());
|
||||
|
||||
final StringBuilder menu = new StringBuilder(100);
|
||||
for (ClassId cid : ClassId.values())
|
||||
@@ -338,7 +338,7 @@ public class ClassMasterInstance extends MerchantInstance
|
||||
}
|
||||
if (validateClassId(currentClassId, cid))
|
||||
{
|
||||
menu.append("<a action=\"link CO" + cid.getId() + "\">" + ClassListData.getInstance().getClass(cid).getEscapedClientCode() + "</a><br>");
|
||||
menu.append("<a action=\"link CO" + cid.getId() + "\">" + ClassListData.getInstance().getClass(cid).getClassName() + "</a><br>"); // getEscapedClientCode());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user