Updated AgitDecoInfo packet.
This commit is contained in:
@@ -174,7 +174,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/tele" + getClanHall().getLocation() + getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLvl() + ".htm");
|
||||
html.setFile(player, "data/html/clanHallManager/tele" + getClanHall().getLocation() + getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLevel() + ".htm");
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class ClanHallManager extends Merchant
|
||||
{
|
||||
return;
|
||||
}
|
||||
final int valbuy = Integer.parseInt(st.nextToken()) + (getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLvl() * 100000);
|
||||
final int valbuy = Integer.parseInt(st.nextToken()) + (getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLevel() * 100000);
|
||||
showBuyWindow(player, valbuy);
|
||||
}
|
||||
else if (val.equalsIgnoreCase("support"))
|
||||
@@ -203,7 +203,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/support" + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl() + ".htm");
|
||||
html.setFile(player, "data/html/clanHallManager/support" + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLevel() + ".htm");
|
||||
html.replace("%mp%", String.valueOf((int) getCurrentMp()));
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -218,7 +218,7 @@ public class ClanHallManager extends Merchant
|
||||
html.setFile(player, "data/html/clanHallManager/functions.htm");
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP) != null)
|
||||
{
|
||||
html.replace("%xp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLvl()));
|
||||
html.replace("%xp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLevel()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -226,7 +226,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP) != null)
|
||||
{
|
||||
html.replace("%hp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLvl()));
|
||||
html.replace("%hp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLevel()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -234,7 +234,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP) != null)
|
||||
{
|
||||
html.replace("%mp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLvl()));
|
||||
html.replace("%mp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLevel()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -467,7 +467,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP) != null) && (getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP) != null) && (getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", val + "%");
|
||||
@@ -570,7 +570,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP) != null) && (getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP) != null) && (getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", val + "%");
|
||||
@@ -633,7 +633,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP) != null) && (getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP) != null) && (getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", val + "%");
|
||||
@@ -715,7 +715,7 @@ public class ClanHallManager extends Merchant
|
||||
final String mp_grade3 = "[<a action=\"bypass -h npc_%objectId%_manage recovery edit_mp 5\">5%</a>][<a action=\"bypass -h npc_%objectId%_manage recovery edit_mp 15\">15%</a>][<a action=\"bypass -h npc_%objectId%_manage recovery edit_mp 30\">30%</a>][<a action=\"bypass -h npc_%objectId%_manage recovery edit_mp 40\">40%</a>]";
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP) != null)
|
||||
{
|
||||
html.replace("%hp_recovery%", getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLvl() + "%</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLease() + "</font>Adena /" + (Config.CH_HPREG_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%hp_recovery%", getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLevel() + "%</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLease() + "</font>Adena /" + (Config.CH_HPREG_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%hp_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getEndTime()));
|
||||
final int grade = getClanHall().getGrade();
|
||||
switch (grade)
|
||||
@@ -773,7 +773,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP) != null)
|
||||
{
|
||||
html.replace("%exp_recovery%", getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLvl() + "%</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLease() + "</font>Adena /" + (Config.CH_EXPREG_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%exp_recovery%", getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLevel() + "%</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLease() + "</font>Adena /" + (Config.CH_EXPREG_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%exp_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getEndTime()));
|
||||
final int grade = getClanHall().getGrade();
|
||||
switch (grade)
|
||||
@@ -831,7 +831,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP) != null)
|
||||
{
|
||||
html.replace("%mp_recovery%", getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLvl() + "%</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLease() + "</font>Adena /" + (Config.CH_MPREG_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%mp_recovery%", getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLevel() + "%</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLease() + "</font>Adena /" + (Config.CH_MPREG_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%mp_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getEndTime()));
|
||||
final int grade = getClanHall().getGrade();
|
||||
switch (grade)
|
||||
@@ -1051,7 +1051,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE) != null) && (getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE) != null) && (getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", "Stage " + val);
|
||||
@@ -1105,7 +1105,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_TELEPORT) != null) && (getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_TELEPORT) != null) && (getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", "Stage " + val);
|
||||
@@ -1153,7 +1153,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_SUPPORT) != null) && (getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_SUPPORT) != null) && (getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", "Stage " + val);
|
||||
@@ -1234,7 +1234,7 @@ public class ClanHallManager extends Merchant
|
||||
final String item = "[<a action=\"bypass -h npc_%objectId%_manage other edit_item 1\">Level 1</a>][<a action=\"bypass -h npc_%objectId%_manage other edit_item 2\">Level 2</a>][<a action=\"bypass -h npc_%objectId%_manage other edit_item 3\">Level 3</a>]";
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_TELEPORT) != null)
|
||||
{
|
||||
html.replace("%tele%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLvl() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLease() + "</font>Adena /" + (Config.CH_TELE_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%tele%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLevel() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLease() + "</font>Adena /" + (Config.CH_TELE_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%tele_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getEndTime()));
|
||||
html.replace("%change_tele%", "[<a action=\"bypass -h npc_%objectId%_manage other tele_cancel\">Deactivate</a>]" + tele);
|
||||
}
|
||||
@@ -1246,7 +1246,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_SUPPORT) != null)
|
||||
{
|
||||
html.replace("%support%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLease() + "</font>Adena /" + (Config.CH_SUPPORT_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%support%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLevel() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLease() + "</font>Adena /" + (Config.CH_SUPPORT_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%support_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getEndTime()));
|
||||
final int grade = getClanHall().getGrade();
|
||||
switch (grade)
|
||||
@@ -1304,7 +1304,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE) != null)
|
||||
{
|
||||
html.replace("%item%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLvl() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLease() + "</font>Adena /" + (Config.CH_ITEM_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%item%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLevel() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLease() + "</font>Adena /" + (Config.CH_ITEM_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%item_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getEndTime()));
|
||||
html.replace("%change_item%", "[<a action=\"bypass -h npc_%objectId%_manage other item_cancel\">Deactivate</a>]" + item);
|
||||
}
|
||||
@@ -1404,7 +1404,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS) != null) && (getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS) != null) && (getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", "Stage " + val);
|
||||
@@ -1452,7 +1452,7 @@ public class ClanHallManager extends Merchant
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player, "data/html/clanHallManager/functions-apply_confirmed.htm");
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM) != null) && (getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM).getLvl() == Integer.parseInt(val)))
|
||||
if ((getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM) != null) && (getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM).getLevel() == Integer.parseInt(val)))
|
||||
{
|
||||
html.setFile(player, "data/html/clanHallManager/functions-used.htm");
|
||||
html.replace("%val%", "Stage " + val);
|
||||
@@ -1499,7 +1499,7 @@ public class ClanHallManager extends Merchant
|
||||
final String fixtures = "[<a action=\"bypass -h npc_%objectId%_manage deco edit_fixtures 1\">Level 1</a>][<a action=\"bypass -h npc_%objectId%_manage deco edit_fixtures 2\">Level 2</a>]";
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS) != null)
|
||||
{
|
||||
html.replace("%curtain%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS).getLvl() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS).getLease() + "</font>Adena /" + (Config.CH_CURTAIN_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%curtain%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS).getLevel() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS).getLease() + "</font>Adena /" + (Config.CH_CURTAIN_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%curtain_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_DECO_CURTAINS).getEndTime()));
|
||||
html.replace("%change_curtain%", "[<a action=\"bypass -h npc_%objectId%_manage deco curtains_cancel\">Deactivate</a>]" + curtains);
|
||||
}
|
||||
@@ -1511,7 +1511,7 @@ public class ClanHallManager extends Merchant
|
||||
}
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM) != null)
|
||||
{
|
||||
html.replace("%fixture%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM).getLvl() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM).getLease() + "</font>Adena /" + (Config.CH_FRONT_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%fixture%", "Stage " + getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM).getLevel() + "</font> (<font color=\"FFAABB\">" + getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM).getLease() + "</font>Adena /" + (Config.CH_FRONT_FEE_RATIO / 1000 / 60 / 60 / 24) + " Day)");
|
||||
html.replace("%fixture_period%", "Withdraw the fee for the next time at " + format.format(getClanHall().getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM).getEndTime()));
|
||||
html.replace("%change_fixture%", "[<a action=\"bypass -h npc_%objectId%_manage deco fixtures_cancel\">Deactivate</a>]" + fixtures);
|
||||
}
|
||||
@@ -1594,7 +1594,7 @@ public class ClanHallManager extends Merchant
|
||||
return;
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl() == 0)
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLevel() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1630,11 +1630,11 @@ public class ClanHallManager extends Merchant
|
||||
else if (actualCommand.equalsIgnoreCase("support_back"))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl() == 0)
|
||||
if (getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLevel() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
html.setFile(player, "data/html/clanHallManager/support" + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl() + ".htm");
|
||||
html.setFile(player, "data/html/clanHallManager/support" + getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLevel() + ".htm");
|
||||
html.replace("%mp%", String.valueOf((int) getStatus().getCurrentMp()));
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
|
||||
@@ -64,7 +64,7 @@ public abstract class ClanHall
|
||||
public class ClanHallFunction
|
||||
{
|
||||
final int _type;
|
||||
private int _lvl;
|
||||
private int _level;
|
||||
protected int _fee;
|
||||
protected int _tempFee;
|
||||
final long _rate;
|
||||
@@ -75,7 +75,7 @@ public abstract class ClanHall
|
||||
public ClanHallFunction(int type, int lvl, int lease, int tempLease, long rate, long time, boolean cwh)
|
||||
{
|
||||
_type = type;
|
||||
_lvl = lvl;
|
||||
_level = lvl;
|
||||
_fee = lease;
|
||||
_tempFee = tempLease;
|
||||
_rate = rate;
|
||||
@@ -88,9 +88,9 @@ public abstract class ClanHall
|
||||
return _type;
|
||||
}
|
||||
|
||||
public int getLvl()
|
||||
public int getLevel()
|
||||
{
|
||||
return _lvl;
|
||||
return _level;
|
||||
}
|
||||
|
||||
public int getLease()
|
||||
@@ -108,9 +108,9 @@ public abstract class ClanHall
|
||||
return _endDate;
|
||||
}
|
||||
|
||||
public void setLvl(int lvl)
|
||||
public void setLevel(int level)
|
||||
{
|
||||
_lvl = lvl;
|
||||
_level = level;
|
||||
}
|
||||
|
||||
public void setLease(int lease)
|
||||
@@ -186,7 +186,7 @@ public abstract class ClanHall
|
||||
{
|
||||
ps.setInt(1, _clanHallId);
|
||||
ps.setInt(2, _type);
|
||||
ps.setInt(3, _lvl);
|
||||
ps.setInt(3, _level);
|
||||
ps.setInt(4, _fee);
|
||||
ps.setLong(5, _rate);
|
||||
ps.setLong(6, _endDate);
|
||||
@@ -478,7 +478,7 @@ public abstract class ClanHall
|
||||
}
|
||||
}
|
||||
|
||||
public boolean updateFunctions(Player player, int type, int lvl, int lease, long rate, boolean addNew)
|
||||
public boolean updateFunctions(Player player, int type, int level, int lease, long rate, boolean addNew)
|
||||
{
|
||||
if ((player == null) || ((lease > 0) && !player.destroyItemByItemId("Consume", Inventory.ADENA_ID, lease, null, true)))
|
||||
{
|
||||
@@ -486,21 +486,21 @@ public abstract class ClanHall
|
||||
}
|
||||
if (addNew)
|
||||
{
|
||||
_functions.put(type, new ClanHallFunction(type, lvl, lease, 0, rate, 0, false));
|
||||
_functions.put(type, new ClanHallFunction(type, level, lease, 0, rate, 0, false));
|
||||
}
|
||||
else if ((lvl == 0) && (lease == 0))
|
||||
else if ((level == 0) && (lease == 0))
|
||||
{
|
||||
removeFunction(type);
|
||||
}
|
||||
else if ((lease - _functions.get(type).getLease()) > 0)
|
||||
{
|
||||
_functions.remove(type);
|
||||
_functions.put(type, new ClanHallFunction(type, lvl, lease, 0, rate, -1, false));
|
||||
_functions.put(type, new ClanHallFunction(type, level, lease, 0, rate, -1, false));
|
||||
}
|
||||
else
|
||||
{
|
||||
_functions.get(type).setLease(lease);
|
||||
_functions.get(type).setLvl(lvl);
|
||||
_functions.get(type).setLevel(level);
|
||||
_functions.get(type).dbSave();
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -281,7 +281,7 @@ public class Formulas
|
||||
final ClanHall clansHall = ClanHallTable.getInstance().getClanHallById(clanHallIndex);
|
||||
if ((clansHall != null) && (clansHall.getFunction(ClanHall.FUNC_RESTORE_HP) != null))
|
||||
{
|
||||
hpRegenMultiplier *= 1 + ((double) clansHall.getFunction(ClanHall.FUNC_RESTORE_HP).getLvl() / 100);
|
||||
hpRegenMultiplier *= 1 + ((double) clansHall.getFunction(ClanHall.FUNC_RESTORE_HP).getLevel() / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -373,7 +373,7 @@ public class Formulas
|
||||
final ClanHall clansHall = ClanHallTable.getInstance().getClanHallById(clanHallIndex);
|
||||
if ((clansHall != null) && (clansHall.getFunction(ClanHall.FUNC_RESTORE_MP) != null))
|
||||
{
|
||||
mpRegenMultiplier *= 1 + ((double) clansHall.getFunction(ClanHall.FUNC_RESTORE_MP).getLvl() / 100);
|
||||
mpRegenMultiplier *= 1 + ((double) clansHall.getFunction(ClanHall.FUNC_RESTORE_MP).getLevel() / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public class RequestRestartPoint implements IClientIncomingPacket
|
||||
loc = MapRegionManager.getInstance().getTeleToLocation(player, TeleportWhereType.CLANHALL);
|
||||
if ((ClanHallTable.getInstance().getClanHallByOwner(player.getClan()) != null) && (ClanHallTable.getInstance().getClanHallByOwner(player.getClan()).getFunction(ClanHall.FUNC_RESTORE_EXP) != null))
|
||||
{
|
||||
player.restoreExp(ClanHallTable.getInstance().getClanHallByOwner(player.getClan()).getFunction(ClanHall.FUNC_RESTORE_EXP).getLvl());
|
||||
player.restoreExp(ClanHallTable.getInstance().getClanHallByOwner(player.getClan()).getFunction(ClanHall.FUNC_RESTORE_EXP).getLevel());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -34,39 +34,18 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
_clanHall = clanHall;
|
||||
}
|
||||
|
||||
//@formatter:off
|
||||
/*
|
||||
* Packet send, must be confirmed
|
||||
packet.writeC(0xf7);
|
||||
packet.writeD(0); // clanhall id
|
||||
packet.writeC(0); // FUNC_RESTORE_HP (Fireplace)
|
||||
packet.writeC(0); // FUNC_RESTORE_MP (Carpet)
|
||||
packet.writeC(0); // FUNC_RESTORE_MP (Statue)
|
||||
packet.writeC(0); // FUNC_RESTORE_EXP (Chandelier)
|
||||
packet.writeC(0); // FUNC_TELEPORT (Mirror)
|
||||
packet.writeC(0); // Crytal
|
||||
packet.writeC(0); // Curtain
|
||||
packet.writeC(0); // FUNC_ITEM_CREATE (Magic Curtain)
|
||||
packet.writeC(0); // FUNC_SUPPORT
|
||||
packet.writeC(0); // FUNC_SUPPORT (Flag)
|
||||
packet.writeC(0); // Front Platform
|
||||
packet.writeC(0); // FUNC_ITEM_CREATE
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
*/
|
||||
//@formatter:on
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.AGIT_DECO_INFO.writeId(packet);
|
||||
packet.writeD(_clanHall.getId()); // clanhall id
|
||||
// FUNC_RESTORE_HP
|
||||
packet.writeD(_clanHall.getId());
|
||||
// Fireplace
|
||||
ClanHallFunction function = _clanHall.getFunction(ClanHall.FUNC_RESTORE_HP);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 220)) || ((_clanHall.getGrade() == 1) && (function.getLvl() < 160)) || ((_clanHall.getGrade() == 2) && (function.getLvl() < 260)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 300)))
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLevel() < 220)) || ((_clanHall.getGrade() == 1) && (function.getLevel() < 160)) || ((_clanHall.getGrade() == 2) && (function.getLevel() < 260)) || ((_clanHall.getGrade() == 3) && (function.getLevel() < 300)))
|
||||
{
|
||||
packet.writeC(1);
|
||||
}
|
||||
@@ -74,14 +53,14 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeC(2);
|
||||
}
|
||||
// FUNC_RESTORE_MP
|
||||
// Carpet - Statue
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_RESTORE_MP);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if ((((_clanHall.getGrade() == 0) || (_clanHall.getGrade() == 1)) && (function.getLvl() < 25)) || ((_clanHall.getGrade() == 2) && (function.getLvl() < 30)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 40)))
|
||||
else if ((((_clanHall.getGrade() == 0) || (_clanHall.getGrade() == 1)) && (function.getLevel() < 25)) || ((_clanHall.getGrade() == 2) && (function.getLevel() < 30)) || ((_clanHall.getGrade() == 3) && (function.getLevel() < 40)))
|
||||
{
|
||||
packet.writeC(1);
|
||||
packet.writeC(1);
|
||||
@@ -91,13 +70,13 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
packet.writeC(2);
|
||||
packet.writeC(2);
|
||||
}
|
||||
// FUNC_RESTORE_EXP
|
||||
// Chandelier
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_RESTORE_EXP);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 25)) || ((_clanHall.getGrade() == 1) && (function.getLvl() < 30)) || ((_clanHall.getGrade() == 2) && (function.getLvl() < 40)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 50)))
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLevel() < 25)) || ((_clanHall.getGrade() == 1) && (function.getLevel() < 30)) || ((_clanHall.getGrade() == 2) && (function.getLevel() < 40)) || ((_clanHall.getGrade() == 3) && (function.getLevel() < 50)))
|
||||
{
|
||||
packet.writeC(1);
|
||||
}
|
||||
@@ -105,13 +84,13 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeC(2);
|
||||
}
|
||||
// FUNC_TELEPORT
|
||||
// Mirror
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_TELEPORT);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (function.getLvl() < 2)
|
||||
else if (function.getLevel() < 2)
|
||||
{
|
||||
packet.writeC(1);
|
||||
}
|
||||
@@ -119,14 +98,15 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeC(2);
|
||||
}
|
||||
// Crystal
|
||||
packet.writeC(0);
|
||||
// CURTAINS
|
||||
// Curtain
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_DECO_CURTAINS);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (function.getLvl() <= 1)
|
||||
else if (function.getLevel() <= 1)
|
||||
{
|
||||
packet.writeC(1);
|
||||
}
|
||||
@@ -134,13 +114,13 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeC(2);
|
||||
}
|
||||
// FUNC_ITEM_CREATE
|
||||
// Magic Curtain
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_ITEM_CREATE);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 2)) || (function.getLvl() < 3))
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLevel() < 2)) || (function.getLevel() < 3))
|
||||
{
|
||||
packet.writeC(1);
|
||||
}
|
||||
@@ -148,14 +128,14 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeC(2);
|
||||
}
|
||||
// FUNC_SUPPORT
|
||||
// Support? - Flag
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_SUPPORT);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 2)) || ((_clanHall.getGrade() == 1) && (function.getLvl() < 4)) || ((_clanHall.getGrade() == 2) && (function.getLvl() < 5)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 8)))
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLevel() < 2)) || ((_clanHall.getGrade() == 1) && (function.getLevel() < 4)) || ((_clanHall.getGrade() == 2) && (function.getLevel() < 5)) || ((_clanHall.getGrade() == 3) && (function.getLevel() < 8)))
|
||||
{
|
||||
packet.writeC(1);
|
||||
packet.writeC(1);
|
||||
@@ -165,13 +145,13 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
packet.writeC(2);
|
||||
packet.writeC(2);
|
||||
}
|
||||
// Front Plateform
|
||||
// Front platform
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_DECO_FRONTPLATEFORM);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (function.getLvl() <= 1)
|
||||
else if (function.getLevel() <= 1)
|
||||
{
|
||||
packet.writeC(1);
|
||||
}
|
||||
@@ -179,13 +159,13 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeC(2);
|
||||
}
|
||||
// FUNC_ITEM_CREATE
|
||||
// Item create?
|
||||
function = _clanHall.getFunction(ClanHall.FUNC_ITEM_CREATE);
|
||||
if ((function == null) || (function.getLvl() == 0))
|
||||
if ((function == null) || (function.getLevel() == 0))
|
||||
{
|
||||
packet.writeC(0);
|
||||
}
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 2)) || (function.getLvl() < 3))
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLevel() < 2)) || (function.getLevel() < 3))
|
||||
{
|
||||
packet.writeC(1);
|
||||
}
|
||||
@@ -193,8 +173,6 @@ public class AgitDecoInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeC(2);
|
||||
}
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user