Partial sync latest Test changes to HighFive.

This commit is contained in:
MobiusDev
2016-10-23 15:03:47 +00:00
parent be6443a66a
commit 7b56568b81
80 changed files with 1209 additions and 1282 deletions

View File

@@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.enums.ShortcutType;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.interfaces.IRestorable;
import com.l2jmobius.gameserver.network.serverpackets.SendMacroList;
import com.l2jmobius.util.StringUtil;
public class MacroList implements IRestorable
{
@@ -141,10 +140,10 @@ public class MacroList implements IRestorable
final StringBuilder sb = new StringBuilder(300);
for (MacroCmd cmd : macro.getCommands())
{
StringUtil.append(sb, String.valueOf(cmd.getType().ordinal()), ",", String.valueOf(cmd.getD1()), ",", String.valueOf(cmd.getD2()));
sb.append(cmd.getType().ordinal() + "," + cmd.getD1() + "," + cmd.getD2());
if ((cmd.getCmd() != null) && (cmd.getCmd().length() > 0))
{
StringUtil.append(sb, ",", cmd.getCmd());
sb.append("," + cmd.getCmd());
}
sb.append(';');
}

View File

@@ -31,7 +31,6 @@ import com.l2jmobius.gameserver.network.serverpackets.TutorialCloseHtml;
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowQuestionMark;
import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
import com.l2jmobius.util.StringUtil;
/**
* This class ...
@@ -273,7 +272,7 @@ public final class L2ClassMasterInstance extends L2MerchantInstance
}
if (validateClassId(currentClassId, cid) && (cid.level() == level))
{
StringUtil.append(menu, "<a action=\"bypass -h npc_%objectId%_change_class ", String.valueOf(cid.getId()), "\">", ClassListData.getInstance().getClass(cid).getClientCode(), "</a><br>");
menu.append("<a action=\"bypass -h npc_%objectId%_change_class " + cid.getId() + "\">" + ClassListData.getInstance().getClass(cid).getClientCode() + "</a><br>");
}
}
@@ -329,7 +328,7 @@ public final class L2ClassMasterInstance extends L2MerchantInstance
}
if (validateClassId(currentClassId, cid))
{
StringUtil.append(menu, "<a action=\"link CO", String.valueOf(cid.getId()), "\">", ClassListData.getInstance().getClass(cid).getEscapedClientCode(), "</a><br>");
menu.append("<a action=\"link CO" + cid.getId() + "\">" + ClassListData.getInstance().getClass(cid).getEscapedClientCode() + "</a><br>");
}
}

View File

@@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jmobius.util.StringUtil;
/**
* Festival of Darkness Guide (Seven Signs)
@@ -226,7 +225,7 @@ public final class L2FestivalGuideInstance extends L2Npc
winningCabal = "None";
}
StringUtil.append(tableHtml, "<tr><td width=\"100\" align=\"center\">", festivalName, "</td><td align=\"center\" width=\"35\">", String.valueOf(duskScore), "</td><td align=\"center\" width=\"35\">", String.valueOf(dawnScore), "</td><td align=\"center\" width=\"130\">", winningCabal, "</td></tr>");
tableHtml.append("<tr><td width=\"100\" align=\"center\">" + festivalName + "</td><td align=\"center\" width=\"35\">" + String.valueOf(duskScore) + "</td><td align=\"center\" width=\"35\">" + String.valueOf(dawnScore) + "</td><td align=\"center\" width=\"130\">" + winningCabal + "</td></tr>");
}
return tableHtml.toString();
@@ -242,7 +241,7 @@ public final class L2FestivalGuideInstance extends L2Npc
final int accumScore = SevenSignsFestival.getInstance().getAccumulatedBonus(i);
final String festivalName = SevenSignsFestival.getFestivalName(i);
StringUtil.append(tableHtml, "<tr><td align=\"center\" width=\"150\">", festivalName, "</td><td align=\"center\" width=\"150\">", String.valueOf(accumScore), "</td></tr>");
tableHtml.append("<tr><td align=\"center\" width=\"150\">" + festivalName + "</td><td align=\"center\" width=\"150\">" + String.valueOf(accumScore) + "</td></tr>");
}
return tableHtml.toString();

View File

@@ -34,7 +34,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList;
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.util.StringUtil;
public class L2NpcInstance extends L2Npc
{
@@ -127,7 +126,7 @@ public class L2NpcInstance extends L2Npc
if (((L2NpcInstance) npc).getClassesToTeach().isEmpty())
{
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
final String sb = StringUtil.concat("<html><body>I cannot teach you. My class list is empty.<br>Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:", String.valueOf(npcId), ", Your classId:", String.valueOf(player.getClassId().getId()), "</body></html>");
final String sb = "<html><body>I cannot teach you. My class list is empty.<br>Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:" + npcId + ", Your classId:" + player.getClassId().getId() + "</body></html>";
html.setHtml(sb);
player.sendPacket(html);
return;

View File

@@ -56,7 +56,6 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
import com.l2jmobius.gameserver.util.Util;
import com.l2jmobius.util.StringUtil;
/**
* This class ...
@@ -374,10 +373,10 @@ public class L2VillageMasterInstance extends L2NpcInstance
if ((subsAvailable != null) && !subsAvailable.isEmpty())
{
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Add.htm");
final StringBuilder content1 = StringUtil.startAppend(200);
final StringBuilder content1 = new StringBuilder(200);
for (PlayerClass subClass : subsAvailable)
{
StringUtil.append(content1, "<a action=\"bypass -h npc_%objectId%_Subclass 4 ", String.valueOf(subClass.ordinal()), "\" msg=\"1268;", ClassListData.getInstance().getClass(subClass.ordinal()).getClassName(), "\">", ClassListData.getInstance().getClass(subClass.ordinal()).getClientCode(), "</a><br>");
content1.append("<a action=\"bypass -h npc_%objectId%_Subclass 4 " + String.valueOf(subClass.ordinal()) + "\" msg=\"1268;" + ClassListData.getInstance().getClass(subClass.ordinal()).getClassName() + "\">" + ClassListData.getInstance().getClass(subClass.ordinal()).getClientCode() + "</a><br>");
}
html.replace("%list%", content1.toString());
}
@@ -408,10 +407,10 @@ public class L2VillageMasterInstance extends L2NpcInstance
}
else
{
final StringBuilder content2 = StringUtil.startAppend(200);
final StringBuilder content2 = new StringBuilder(200);
if (checkVillageMaster(player.getBaseClass()))
{
StringUtil.append(content2, "<a action=\"bypass -h npc_%objectId%_Subclass 5 0\">", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode(), "</a><br>");
content2.append("<a action=\"bypass -h npc_%objectId%_Subclass 5 0\">" + ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode() + "</a><br>");
}
for (Iterator<SubClass> subList = iterSubClasses(player); subList.hasNext();)
@@ -419,7 +418,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
final SubClass subClass = subList.next();
if (checkVillageMaster(subClass.getClassDefinition()))
{
StringUtil.append(content2, "<a action=\"bypass -h npc_%objectId%_Subclass 5 ", String.valueOf(subClass.getClassIndex()), "\">", ClassListData.getInstance().getClass(subClass.getClassId()).getClientCode(), "</a><br>");
content2.append("<a action=\"bypass -h npc_%objectId%_Subclass 5 " + String.valueOf(subClass.getClassIndex()) + "\">" + ClassListData.getInstance().getClass(subClass.getClassId()).getClientCode() + "</a><br>");
}
}
@@ -445,14 +444,14 @@ public class L2VillageMasterInstance extends L2NpcInstance
if (player.getTotalSubClasses() > 3)
{
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyCustom.htm");
final StringBuilder content3 = StringUtil.startAppend(200);
final StringBuilder content3 = new StringBuilder(200);
int classIndex = 1;
for (Iterator<SubClass> subList = iterSubClasses(player); subList.hasNext();)
{
final SubClass subClass = subList.next();
StringUtil.append(content3, "Sub-class ", String.valueOf(classIndex++), "<br>", "<a action=\"bypass -h npc_%objectId%_Subclass 6 ", String.valueOf(subClass.getClassIndex()), "\">", ClassListData.getInstance().getClass(subClass.getClassId()).getClientCode(), "</a><br>");
content3.append("Sub-class " + String.valueOf(classIndex++) + "<br><a action=\"bypass -h npc_%objectId%_Subclass 6 " + String.valueOf(subClass.getClassIndex()) + "\">" + ClassListData.getInstance().getClass(subClass.getClassId()).getClientCode() + "</a><br>");
}
html.replace("%list%", content3.toString());
}
@@ -611,10 +610,10 @@ public class L2VillageMasterInstance extends L2NpcInstance
return;
}
final StringBuilder content6 = StringUtil.startAppend(200);
final StringBuilder content6 = new StringBuilder(200);
for (PlayerClass subClass : subsAvailable)
{
StringUtil.append(content6, "<a action=\"bypass -h npc_%objectId%_Subclass 7 ", String.valueOf(paramOne), " ", String.valueOf(subClass.ordinal()), "\" msg=\"1445;", "\">", ClassListData.getInstance().getClass(subClass.ordinal()).getClientCode(), "</a><br>");
content6.append("<a action=\"bypass -h npc_%objectId%_Subclass 7 " + String.valueOf(paramOne) + " " + String.valueOf(subClass.ordinal()) + "\" msg=\"1445;\">" + ClassListData.getInstance().getClass(subClass.ordinal()).getClientCode() + "</a><br>");
}
switch (paramOne)

View File

@@ -55,7 +55,6 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.gameserver.network.serverpackets.UserInfo;
import com.l2jmobius.util.StringUtil;
/**
* Hero entity.
@@ -465,19 +464,19 @@ public class Hero
{
breakat = i;
final StatsSet diaryEntry = list.get(i);
StringUtil.append(fList, "<tr><td>");
fList.append("<tr><td>");
if (color)
{
StringUtil.append(fList, "<table width=270 bgcolor=\"131210\">");
fList.append("<table width=270 bgcolor=\"131210\">");
}
else
{
StringUtil.append(fList, "<table width=270>");
fList.append("<table width=270>");
}
StringUtil.append(fList, "<tr><td width=270><font color=\"LEVEL\">" + diaryEntry.getString("date") + ":xx</font></td></tr>");
StringUtil.append(fList, "<tr><td width=270>" + diaryEntry.getString("action") + "</td></tr>");
StringUtil.append(fList, "<tr><td>&nbsp;</td></tr></table>");
StringUtil.append(fList, "</td></tr>");
fList.append("<tr><td width=270><font color=\"LEVEL\">" + diaryEntry.getString("date") + ":xx</font></td></tr>");
fList.append("<tr><td width=270>" + diaryEntry.getString("action") + "</td></tr>");
fList.append("<tr><td>&nbsp;</td></tr></table>");
fList.append("</td></tr>");
color = !color;
counter++;
if (counter >= perpage)
@@ -553,19 +552,19 @@ public class Hero
{
breakat = i;
final StatsSet fight = heroFights.get(i);
StringUtil.append(fList, "<tr><td>");
fList.append("<tr><td>");
if (color)
{
StringUtil.append(fList, "<table width=270 bgcolor=\"131210\">");
fList.append("<table width=270 bgcolor=\"131210\">");
}
else
{
StringUtil.append(fList, "<table width=270>");
fList.append("<table width=270>");
}
StringUtil.append(fList, "<tr><td width=220><font color=\"LEVEL\">" + fight.getString("start") + "</font>&nbsp;&nbsp;" + fight.getString("result") + "</td><td width=50 align=right>" + (fight.getInt("classed") > 0 ? "<font color=\"FFFF99\">cls</font>" : "<font color=\"999999\">non-cls<font>") + "</td></tr>");
StringUtil.append(fList, "<tr><td width=220>vs " + fight.getString("oponent") + " (" + fight.getString("oponentclass") + ")</td><td width=50 align=right>(" + fight.getString("time") + ")</td></tr>");
StringUtil.append(fList, "<tr><td colspan=2>&nbsp;</td></tr></table>");
StringUtil.append(fList, "</td></tr>");
fList.append("<tr><td width=220><font color=\"LEVEL\">" + fight.getString("start") + "</font>&nbsp;&nbsp;" + fight.getString("result") + "</td><td width=50 align=right>" + (fight.getInt("classed") > 0 ? "<font color=\"FFFF99\">cls</font>" : "<font color=\"999999\">non-cls<font>") + "</td></tr>");
fList.append("<tr><td width=220>vs " + fight.getString("oponent") + " (" + fight.getString("oponentclass") + ")</td><td width=50 align=right>(" + fight.getString("time") + ")</td></tr>");
fList.append("<tr><td colspan=2>&nbsp;</td></tr></table>");
fList.append("</td></tr>");
color = !color;
counter++;
if (counter >= perpage)

View File

@@ -55,7 +55,6 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.util.Rnd;
import com.l2jmobius.util.StringUtil;
/**
* @author HorridoJoho
@@ -543,7 +542,7 @@ public class TvTEvent
return "-";
}
return StringUtil.concat(String.valueOf(itemNum), " ", ItemTable.getInstance().getTemplate(itemId).getName());
return itemNum + " " + ItemTable.getInstance().getTemplate(itemId).getName();
}
/**

View File

@@ -41,7 +41,7 @@ import com.l2jmobius.gameserver.model.items.type.EtcItemType;
import com.l2jmobius.gameserver.model.items.type.WeaponType;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.serverpackets.SkillCoolTime;
import com.l2jmobius.util.StringUtil;
import com.l2jmobius.util.Util;
/**
* This class manages inventory
@@ -1325,7 +1325,7 @@ public abstract class Inventory extends ItemContainer
break;
default:
_log.info("Unhandled slot type: " + slot);
_log.info(StringUtil.getTraceString(Thread.currentThread().getStackTrace()));
_log.info(Util.getTraceString(Thread.currentThread().getStackTrace()));
}
if (pdollSlot >= 0)
{

View File

@@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.items.type.ArmorType;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.util.StringUtil;
/**
* This class is dedicated to the management of armors.
@@ -86,7 +85,7 @@ public final class L2Armor extends L2Item
catch (Exception nfe)
{
// Incorrect syntax, don't add new skill
_log.info(StringUtil.concat("> Couldnt parse ", skill, " in armor enchant skills! item ", toString()));
_log.info("> Couldnt parse " + skill + " in armor enchant skills! item " + this);
}
if ((id > 0) && (level > 0))
{

View File

@@ -23,7 +23,6 @@ import com.l2jmobius.gameserver.model.L2ExtractableProduct;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.model.items.type.EtcItemType;
import com.l2jmobius.util.StringUtil;
/**
* This class is dedicated to the management of EtcItem.
@@ -93,7 +92,7 @@ public final class L2EtcItem extends L2Item
final String[] data = part.split(",");
if (data.length != 4)
{
_log.info(StringUtil.concat("> Couldnt parse ", part, " in capsuled_items! item ", toString()));
_log.info("> Couldnt parse " + part + " in capsuled_items! item " + this);
continue;
}
final int itemId = Integer.parseInt(data[0]);
@@ -102,7 +101,7 @@ public final class L2EtcItem extends L2Item
final double chance = Double.parseDouble(data[3]);
if (max < min)
{
_log.info(StringUtil.concat("> Max amount < Min amount in ", part, ", item ", toString()));
_log.info("> Max amount < Min amount in " + part + ", item " + this);
continue;
}
final L2ExtractableProduct product = new L2ExtractableProduct(itemId, min, max, chance);

View File

@@ -46,7 +46,6 @@ import com.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
import com.l2jmobius.gameserver.model.stats.functions.FuncTemplate;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.util.StringUtil;
/**
* This class contains all informations concerning the item (weapon, armor, etc).<BR>
@@ -221,13 +220,13 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
if (id == 0)
{
_log.info(StringUtil.concat("Ignoring item_skill(", element, ") for item ", toString(), ". Skill id is 0!"));
_log.info("Ignoring item_skill(" + element + ") for item " + this + ". Skill id is 0!");
continue;
}
if (level == 0)
{
_log.info(StringUtil.concat("Ignoring item_skill(", element, ") for item ", toString(), ". Skill level is 0!"));
_log.info("Ignoring item_skill(" + element + ") for item " + this + ". Skill level is 0!");
continue;
}
@@ -236,7 +235,7 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
}
catch (Exception e)
{
_log.warning(StringUtil.concat("Failed to parse item_skill(", element, ") for item ", toString(), "! Format: SkillId0-SkillLevel0[;SkillIdN-SkillLevelN]"));
_log.warning("Failed to parse item_skill(" + element + ") for item " + this + "! Format: SkillId0-SkillLevel0[;SkillIdN-SkillLevelN]");
}
}
@@ -265,7 +264,7 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
catch (Exception nfe)
{
// Incorrect syntax, don't add new skill
_log.info(StringUtil.concat("Couldnt parse ", skills, " in weapon unequip skills! item ", toString()));
_log.info("Couldnt parse " + skills + " in weapon unequip skills! item " + this);
}
if ((id > 0) && (level > 0))
{

View File

@@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.model.stats.Formulas;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.gameserver.util.Util;
import com.l2jmobius.util.StringUtil;
/**
* This class is dedicated to the management of weapons.
@@ -120,7 +119,7 @@ public final class L2Weapon extends L2Item
catch (Exception nfe)
{
// Incorrect syntax, dont add new skill
_log.info(StringUtil.concat("> Couldnt parse ", skill, " in weapon enchant skills! item ", toString()));
_log.info("> Couldnt parse " + skill + " in weapon enchant skills! item " + this);
}
if ((id > 0) && (level > 0))
{
@@ -146,7 +145,7 @@ public final class L2Weapon extends L2Item
catch (Exception nfe)
{
// Incorrect syntax, don't add new skill
_log.info(StringUtil.concat("> Couldnt parse ", skill, " in weapon onmagic skills! item ", toString()));
_log.info("> Couldnt parse " + skill + " in weapon onmagic skills! item " + this);
}
if ((id > 0) && (level > 0) && (chance > 0))
{
@@ -173,7 +172,7 @@ public final class L2Weapon extends L2Item
catch (Exception nfe)
{
// Incorrect syntax, don't add new skill
_log.info(StringUtil.concat("> Couldnt parse ", skill, " in weapon oncrit skills! item ", toString()));
_log.info("> Couldnt parse " + skill + " in weapon oncrit skills! item " + this);
}
if ((id > 0) && (level > 0) && (chance > 0))
{

View File

@@ -535,7 +535,11 @@ public final class QuestState
*/
public int getCond()
{
return isStarted() ? getInt("cond") : 0;
if (isStarted())
{
return getInt("cond");
}
return 0;
}
/**
@@ -585,7 +589,11 @@ public final class QuestState
*/
public int getMemoState()
{
return isStarted() ? getInt("memoState") : 0;
if (isStarted())
{
return getInt("memoState");
}
return 0;
}
public boolean isMemoState(int memoState)
@@ -600,7 +608,11 @@ public final class QuestState
*/
public int getMemoStateEx(int slot)
{
return isStarted() ? getInt("memoStateEx" + slot) : 0;
if (isStarted())
{
return getInt("memoStateEx" + slot);
}
return 0;
}
/**

View File

@@ -31,7 +31,6 @@ import com.l2jmobius.gameserver.model.zone.TaskZoneSettings;
import com.l2jmobius.gameserver.model.zone.ZoneId;
import com.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
import com.l2jmobius.util.Rnd;
import com.l2jmobius.util.StringUtil;
/**
* another type of damage zone with skills
@@ -96,7 +95,7 @@ public class L2EffectZone extends L2ZoneType
final String[] skillSplit = skill.split("-");
if (skillSplit.length != 2)
{
_log.warning(StringUtil.concat(getClass().getSimpleName() + ": invalid config property -> skillsIdLvl \"", skill, "\""));
_log.warning(getClass().getSimpleName() + ": invalid config property -> skillsIdLvl \"" + skill + "\"");
}
else
{
@@ -108,7 +107,7 @@ public class L2EffectZone extends L2ZoneType
{
if (!skill.isEmpty())
{
_log.warning(StringUtil.concat(getClass().getSimpleName() + ": invalid config property -> skillsIdLvl \"", skillSplit[0], "\"", skillSplit[1]));
_log.warning(getClass().getSimpleName() + ": invalid config property -> skillsIdLvl \"" + skillSplit[0] + "\"" + skillSplit[1]);
}
}
}

View File

@@ -21,7 +21,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.ZoneId;
/**
* A scripted zone... Creation of such a zone should require somekind of jython script reference which can handle onEnter() / onExit()
* A scripted zone... Creation of such a zone should require somekind of script reference which can handle onEnter() / onExit()
* @author durgus
*/
public class L2ScriptZone extends L2ZoneType