Removed boxing for String conversions.

This commit is contained in:
MobiusDev
2018-09-08 23:55:08 +00:00
parent bb7e3b8e1b
commit b6e4ce2ebf
116 changed files with 252 additions and 252 deletions

View File

@@ -193,7 +193,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
if (!st.hasMoreTokens())
{
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/announces-edit.htm");
final String announcementId = "" + announce.getId();
final String announcementId = Integer.toString(announce.getId());
final String announcementType = announce.getType().name();
String announcementInital = "0";
String announcementDelay = "0";
@@ -203,9 +203,9 @@ public class AdminAnnouncements implements IAdminCommandHandler
if (announce instanceof AutoAnnouncement)
{
final AutoAnnouncement autoAnnounce = (AutoAnnouncement) announce;
announcementInital = "" + (autoAnnounce.getInitial() / 1000);
announcementDelay = "" + (autoAnnounce.getDelay() / 1000);
announcementRepeat = "" + autoAnnounce.getRepeat();
announcementInital = Long.toString(autoAnnounce.getInitial() / 1000);
announcementDelay = Long.toString(autoAnnounce.getDelay() / 1000);
announcementRepeat = Integer.toString(autoAnnounce.getRepeat());
}
content = content.replaceAll("%id%", announcementId);
content = content.replaceAll("%type%", announcementType);
@@ -419,7 +419,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
if (announce != null)
{
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/announces-show.htm");
final String announcementId = "" + announce.getId();
final String announcementId = Integer.toString(announce.getId());
final String announcementType = announce.getType().name();
String announcementInital = "0";
String announcementDelay = "0";
@@ -429,9 +429,9 @@ public class AdminAnnouncements implements IAdminCommandHandler
if (announce instanceof AutoAnnouncement)
{
final AutoAnnouncement autoAnnounce = (AutoAnnouncement) announce;
announcementInital = "" + (autoAnnounce.getInitial() / 1000);
announcementDelay = "" + (autoAnnounce.getDelay() / 1000);
announcementRepeat = "" + autoAnnounce.getRepeat();
announcementInital = Long.toString(autoAnnounce.getInitial() / 1000);
announcementDelay = Long.toString(autoAnnounce.getDelay() / 1000);
announcementRepeat = Integer.toString(autoAnnounce.getRepeat());
}
content = content.replaceAll("%id%", announcementId);
content = content.replaceAll("%type%", announcementType);

View File

@@ -56,7 +56,7 @@ public class TerritoryStatus implements IBypassHandler
}
}
html.replace("%castlename%", npc.getCastle().getName());
html.replace("%taxpercent%", "" + npc.getCastle().getTaxPercent(TaxType.BUY));
html.replace("%taxpercent%", Integer.toString(npc.getCastle().getTaxPercent(TaxType.BUY)));
html.replace("%objectId%", String.valueOf(npc.getObjectId()));
{
if (npc.getCastle().getResidenceId() > 6)

View File

@@ -47,7 +47,7 @@ public class Time implements IUserCommandHandler
}
final int t = GameTimeController.getInstance().getGameTime();
final String h = "" + ((t / 60) % 24);
final String h = Integer.toString(((t / 60) % 24));
String m;
if ((t % 60) < 10)
{
@@ -55,7 +55,7 @@ public class Time implements IUserCommandHandler
}
else
{
m = "" + (t % 60);
m = Integer.toString((t % 60));
}
SystemMessage sm;

View File

@@ -316,7 +316,7 @@ public final class Q00386_StolenDignity extends Quest
final int i1 = getNumberFromBingoBoard(qs, i0);
if (isSelectedBingoNumber(qs, i1))
{
html = html.replace("<?Cell" + (i0 + 1) + "?>", i1 + "");
html = html.replace("<?Cell" + (i0 + 1) + "?>", Integer.toString(i1));
}
else
{
@@ -332,7 +332,7 @@ public final class Q00386_StolenDignity extends Quest
{
final int i1 = getNumberFromBingoBoard(qs, i0);
html = html.replace("<?FontColor" + (i0 + 1) + "?>", isSelectedBingoNumber(qs, i1) ? "ff0000" : "ffffff");
html = html.replace("<?Cell" + (i0 + 1) + "?>", i1 + "");
html = html.replace("<?Cell" + (i0 + 1) + "?>", Integer.toString(i1));
}
return html;
}
@@ -615,7 +615,7 @@ public final class Q00386_StolenDignity extends Quest
{
if (i == pos)
{
selected[i] = num + "";
selected[i] = Integer.toString(num);
continue;
}
}
@@ -634,7 +634,7 @@ public final class Q00386_StolenDignity extends Quest
*/
private boolean isSelectedBingoNumber(QuestState qs, int num)
{
return qs.get("selected").contains(num + "");
return qs.get("selected").contains(Integer.toString(num));
}
/**

View File

@@ -318,7 +318,7 @@ public class Q00663_SeductiveWhispers extends Quest
isPlayerWin = true;
htmltext = getHtm(player, isPractice ? "30846-07.html" : "30846-18.html");
htmltext = htmltext.replace("%table%", table);
htmltext = htmltext.replaceAll("%win_count%", "" + winCount);
htmltext = htmltext.replaceAll("%win_count%", Integer.toString(winCount));
}
else
{

View File

@@ -95,7 +95,7 @@ public final class Q10818_ConfrontingAGiantMonster extends Quest
{
if ((player.getLevel() >= MIN_LEVEL))
{
if (hasQuestItems(player, DARK_SOUL_STONE) && qs.get("" + ISTINA).equals("true") && qs.get("" + OCTAVIS).equals("true") && qs.get("" + TAUTI).equals("true") && qs.get("" + EKIMUS).equals("true"))
if (hasQuestItems(player, DARK_SOUL_STONE) && qs.get(Integer.toString(ISTINA)).equals("true") && qs.get(Integer.toString(OCTAVIS)).equals("true") && qs.get(Integer.toString(TAUTI)).equals("true") && qs.get(Integer.toString(EKIMUS)).equals("true"))
{
if (hasQuestItems(player, OLYMPIAD_MANAGER_CERTIFICATE, ISHUMA_CERTIFICATE, SIR_KRISTOF_RODEMAI_CERTIFICATE))
{
@@ -108,10 +108,10 @@ public final class Q10818_ConfrontingAGiantMonster extends Quest
takeItems(player, DARK_SOUL_STONE, -1);
giveItems(player, DAICHIR_SERTIFICATE, 1);
addExpAndSp(player, EXP_AMOUNT, 0);
qs.unset("" + ISTINA);
qs.unset("" + OCTAVIS);
qs.unset("" + TAUTI);
qs.unset("" + EKIMUS);
qs.unset(Integer.toString(ISTINA));
qs.unset(Integer.toString(OCTAVIS));
qs.unset(Integer.toString(TAUTI));
qs.unset(Integer.toString(EKIMUS));
qs.exitQuest(false, true);
}
}
@@ -140,7 +140,7 @@ public final class Q10818_ConfrontingAGiantMonster extends Quest
}
case State.STARTED:
{
if (hasQuestItems(player, DARK_SOUL_STONE) && qs.get("" + ISTINA).equals("true") && qs.get("" + OCTAVIS).equals("true") && qs.get("" + TAUTI).equals("true") && qs.get("" + EKIMUS).equals("true"))
if (hasQuestItems(player, DARK_SOUL_STONE) && qs.get(Integer.toString(ISTINA)).equals("true") && qs.get(Integer.toString(OCTAVIS)).equals("true") && qs.get(Integer.toString(TAUTI)).equals("true") && qs.get(Integer.toString(EKIMUS)).equals("true"))
{
htmltext = "30537-08.html";
}
@@ -179,7 +179,7 @@ public final class Q10818_ConfrontingAGiantMonster extends Quest
}
else
{
qs.set("" + npc.getId(), "true");
qs.set(Integer.toString(npc.getId()), "true");
}
}
}