Sync with L2jServer HighFive Apr 21st 2015.
This commit is contained in:
9
trunk/dist/game/config/Custom.properties
vendored
9
trunk/dist/game/config/Custom.properties
vendored
@@ -496,13 +496,6 @@ DualboxCheckWhitelist = 127.0.0.1,0
|
||||
# Default: False
|
||||
AllowChangePassword = False
|
||||
|
||||
# Enables L2J old drop behavior
|
||||
# The old L2J system used to add amount of items drop per 100% range of chance.
|
||||
# For example, if chance is 230% when rate are applied, it will do :
|
||||
# amount dropped = (2 * getRandomAmount(min,max)) + 30% chance to get ad additional getRandomAmount(min,max)
|
||||
# Default : False
|
||||
OldDropBehavior = False
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Allowed Player Races
|
||||
@@ -689,7 +682,7 @@ BalancePlayerExceedLimit = 20
|
||||
|
||||
# Enable premium system.
|
||||
# Default: False
|
||||
EnablePremiumSystem = False
|
||||
EnablePremiumSystem = True
|
||||
|
||||
# Xp rate for premium players.
|
||||
PremiumRateXp = 2
|
||||
|
3
trunk/dist/game/config/General.properties
vendored
3
trunk/dist/game/config/General.properties
vendored
@@ -335,7 +335,8 @@ ClearDroppedItemTable = False
|
||||
# Default: False
|
||||
AutoDeleteInvalidQuestData = False
|
||||
|
||||
# Setting False can improve server performance on high rate/population servers.
|
||||
# If True, allows a special handling for drops when chance raises over 100% (eg. when applying chance rates).
|
||||
# True value causes better drop handling at higher rates.
|
||||
# Default: True
|
||||
PreciseDropCalculation = True
|
||||
|
||||
|
8
trunk/dist/game/config/NPC.properties
vendored
8
trunk/dist/game/config/NPC.properties
vendored
@@ -182,6 +182,14 @@ MinionChaosTime = 10
|
||||
# Drops
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# If True, activates bellow level gap rules for standard mobs:
|
||||
# Default: True
|
||||
UseDeepBlueDropRules = True
|
||||
|
||||
# If True, activates bellow level gap rules for raid bosses:
|
||||
# Default: True
|
||||
UseDeepBlueDropRulesRaid = True
|
||||
|
||||
# The min and max level difference used for level gap calculation
|
||||
# this is only for how many levels higher the player is than the monster
|
||||
# Default: 8
|
||||
|
5
trunk/dist/game/config/Rates.properties
vendored
5
trunk/dist/game/config/Rates.properties
vendored
@@ -9,8 +9,7 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Rates
|
||||
# ---------------------------------------------------------------------------
|
||||
# Warning: to achieve old l2j behavior before drops rework you need to enable OldDropBehavior in Custom.properties
|
||||
# and increase only chance multipliers! Remember if you increase both chance and amount you will have higher rates than expected
|
||||
# Warning: Remember if you increase both chance and amount you will have higher rates than expected
|
||||
# Example: if amount multiplier is 5 and chance multiplier is 5 you will end up with 5*5 = 25 drop rates so be careful!
|
||||
|
||||
# Multiplies the amount of items dropped from monster on ground when it dies.
|
||||
@@ -19,6 +18,7 @@ DeathDropAmountMultiplier = 1
|
||||
CorpseDropAmountMultiplier = 1
|
||||
# Multiplies the amount of items dropped from monster on ground when it dies.
|
||||
HerbDropAmountMultiplier = 1
|
||||
RaidDropAmountMultiplier = 1
|
||||
|
||||
# Multiplies the chance of items that can be dropped from monster on ground when it dies.
|
||||
DeathDropChanceMultiplier = 1
|
||||
@@ -26,6 +26,7 @@ DeathDropChanceMultiplier = 1
|
||||
CorpseDropChanceMultiplier = 1
|
||||
# Multiplies the chance of items that can be dropped from monster on ground when it dies.
|
||||
HerbDropChanceMultiplier = 1
|
||||
RaidDropChanceMultiplier = 1
|
||||
|
||||
# List of items affected by custom drop rate by id, used now for Adena rate too.
|
||||
# Usage: itemId1,multiplier1;itemId2,multiplier2;...
|
||||
|
@@ -85,7 +85,7 @@ public class L2NpcActionShift implements IActionShiftHandler
|
||||
html.replace("%accu%", String.valueOf(((L2Character) target).getAccuracy()));
|
||||
html.replace("%evas%", String.valueOf(((L2Character) target).getEvasionRate(null)));
|
||||
html.replace("%crit%", String.valueOf(((L2Character) target).getCriticalHit(null, null)));
|
||||
html.replace("%rspd%", String.valueOf(((L2Character) target).getRunSpeed()));
|
||||
html.replace("%rspd%", String.valueOf((int) ((L2Character) target).getRunSpeed()));
|
||||
html.replace("%aspd%", String.valueOf(((L2Character) target).getPAtkSpd()));
|
||||
html.replace("%cspd%", String.valueOf(((L2Character) target).getMAtkSpd()));
|
||||
html.replace("%atkType%", String.valueOf(((L2Character) target).getTemplate().getBaseAttackType()));
|
||||
|
@@ -1005,7 +1005,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
adminReply.replace("%accuracy%", String.valueOf(player.getAccuracy()));
|
||||
adminReply.replace("%evasion%", String.valueOf(player.getEvasionRate(null)));
|
||||
adminReply.replace("%critical%", String.valueOf(player.getCriticalHit(null, null)));
|
||||
adminReply.replace("%runspeed%", String.valueOf(player.getRunSpeed()));
|
||||
adminReply.replace("%runspeed%", String.valueOf((int) player.getRunSpeed()));
|
||||
adminReply.replace("%patkspd%", String.valueOf(player.getPAtkSpd()));
|
||||
adminReply.replace("%matkspd%", String.valueOf(player.getMAtkSpd()));
|
||||
adminReply.replace("%access%", player.getAccessLevel().getLevel() + " (" + player.getAccessLevel().getName() + ")");
|
||||
|
@@ -290,34 +290,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
final IDropItem dropItem = dropList.get(i);
|
||||
if (dropItem instanceof GeneralDropItem)
|
||||
{
|
||||
final GeneralDropItem generalDropItem = (GeneralDropItem) dropItem;
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(generalDropItem.getItemId());
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top>");
|
||||
sb.append("<img src=\"" + item.getIcon() + "\" width=32 height=32>");
|
||||
sb.append("</td><td fixwidth=300 align=center><font name=\"hs9\" color=\"CD9000\">");
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
|
||||
final long min = generalDropItem.getMin(npc, activeChar);
|
||||
final long max = generalDropItem.getMax(npc, activeChar);
|
||||
if (min == max)
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
sb.append(" - ");
|
||||
sb.append(amountFormat.format(max));
|
||||
}
|
||||
|
||||
sb.append("</td></tr><tr><td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(generalDropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append("%</td></tr></table></td></tr><tr><td width=32></td><td width=300> </td></tr></table>");
|
||||
addGeneralDropItem(activeChar, npc, amountFormat, chanceFormat, sb, (GeneralDropItem) dropItem);
|
||||
}
|
||||
else if (dropItem instanceof GroupedGeneralDropItem)
|
||||
{
|
||||
@@ -325,46 +298,21 @@ public class NpcViewMod implements IBypassHandler
|
||||
if (generalGroupedDropItem.getItems().size() == 1)
|
||||
{
|
||||
final GeneralDropItem generalDropItem = generalGroupedDropItem.getItems().get(0);
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(generalDropItem.getItemId());
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top>");
|
||||
sb.append("<img src=\"" + item.getIcon() + "\" width=32 height=32>");
|
||||
sb.append("</td><td fixwidth=300 align=center><font name=\"hs9\" color=\"CD9000\">");
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
|
||||
final long min = generalDropItem.getMin(npc, activeChar);
|
||||
final long max = generalDropItem.getMax(npc, activeChar);
|
||||
if (min == max)
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
sb.append(" - ");
|
||||
sb.append(amountFormat.format(max));
|
||||
}
|
||||
|
||||
sb.append("</td></tr><tr><td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(generalGroupedDropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append("%</td></tr></table></td></tr><tr><td width=32></td><td width=300> </td></tr></table>");
|
||||
addGeneralDropItem(activeChar, npc, amountFormat, chanceFormat, sb, new GeneralDropItem(generalDropItem.getItemId(), generalDropItem.getMin(), generalDropItem.getMax(), (generalDropItem.getChance() * generalGroupedDropItem.getChance()) / 100, generalDropItem.getAmountStrategy(), generalDropItem.getChanceStrategy(), generalGroupedDropItem.getPreciseStrategy(), generalGroupedDropItem.getKillerChanceModifierStrategy(), generalDropItem.getDropCalculationStrategy()));
|
||||
}
|
||||
else
|
||||
{
|
||||
GroupedGeneralDropItem normalized = generalGroupedDropItem.normalizeMe(npc, activeChar);
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top><img src=\"L2UI_CT1.ICON_DF_premiumItem\" width=32 height=32></td>");
|
||||
sb.append("<td fixwidth=300 align=center><font name=\"ScreenMessageSmall\" color=\"CD9000\">One from group</font>");
|
||||
sb.append("</td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0><tr>");
|
||||
sb.append("<td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(generalGroupedDropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append(chanceFormat.format(Math.min(normalized.getChance(), 100)));
|
||||
sb.append("%</td></tr></table><br>");
|
||||
|
||||
for (GeneralDropItem generalDropItem : generalGroupedDropItem.getItems())
|
||||
for (GeneralDropItem generalDropItem : normalized.getItems())
|
||||
{
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(generalDropItem.getItemId());
|
||||
sb.append("<table width=291 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
@@ -374,9 +322,9 @@ public class NpcViewMod implements IBypassHandler
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=259><table width=253 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td><td width=205 align=center>");
|
||||
|
||||
final long min = generalDropItem.getMin(npc, activeChar);
|
||||
final long max = generalDropItem.getMax(npc, activeChar);
|
||||
MinMax minMax = getPreciseMinMax(normalized.getChance(), generalDropItem.getMin(npc, activeChar), generalDropItem.getMax(npc, activeChar), generalDropItem.isPreciseCalculated());
|
||||
final long min = minMax.min;
|
||||
final long max = minMax.max;
|
||||
if (min == max)
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
@@ -433,4 +381,68 @@ public class NpcViewMod implements IBypassHandler
|
||||
html = html.replaceAll("%items%", bodySb.toString());
|
||||
Util.sendCBHtml(activeChar, html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param activeChar
|
||||
* @param npc
|
||||
* @param amountFormat
|
||||
* @param chanceFormat
|
||||
* @param sb
|
||||
* @param dropItem
|
||||
*/
|
||||
private static void addGeneralDropItem(L2PcInstance activeChar, L2Npc npc, final DecimalFormat amountFormat, final DecimalFormat chanceFormat, final StringBuilder sb, final GeneralDropItem dropItem)
|
||||
{
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(dropItem.getItemId());
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
sb.append("<tr><td width=32 valign=top>");
|
||||
sb.append("<img src=\"" + item.getIcon() + "\" width=32 height=32>");
|
||||
sb.append("</td><td fixwidth=300 align=center><font name=\"hs9\" color=\"CD9000\">");
|
||||
sb.append(item.getName());
|
||||
sb.append("</font></td></tr><tr><td width=32></td><td width=300><table width=295 cellpadding=0 cellspacing=0>");
|
||||
sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
MinMax minMax = getPreciseMinMax(dropItem.getChance(npc, activeChar), dropItem.getMin(npc, activeChar), dropItem.getMax(npc, activeChar), dropItem.isPreciseCalculated());
|
||||
|
||||
final long min = minMax.min;
|
||||
final long max = minMax.max;
|
||||
if (min == max)
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(amountFormat.format(min));
|
||||
sb.append(" - ");
|
||||
sb.append(amountFormat.format(max));
|
||||
}
|
||||
|
||||
sb.append("</td></tr><tr><td width=48 align=right valign=top><font color=\"LEVEL\">Chance:</font></td>");
|
||||
sb.append("<td width=247 align=center>");
|
||||
sb.append(chanceFormat.format(Math.min(dropItem.getChance(npc, activeChar), 100)));
|
||||
sb.append("%</td></tr></table></td></tr><tr><td width=32></td><td width=300> </td></tr></table>");
|
||||
}
|
||||
|
||||
private static class MinMax
|
||||
{
|
||||
public final long min, max;
|
||||
|
||||
public MinMax(long min, long max)
|
||||
{
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static MinMax getPreciseMinMax(double chance, long min, long max, boolean isPrecise)
|
||||
{
|
||||
if (!isPrecise || (chance <= 100))
|
||||
{
|
||||
return new MinMax(min, max);
|
||||
}
|
||||
|
||||
int mult = (int) (chance) / 100;
|
||||
return new MinMax(mult * min, (chance % 100) > 0 ? (mult + 1) * max : mult * max);
|
||||
}
|
||||
}
|
||||
|
2
trunk/dist/game/data/zones/no_bookmark.xml
vendored
2
trunk/dist/game/data/zones/no_bookmark.xml
vendored
@@ -429,7 +429,7 @@
|
||||
<node X="188132" Y="119249" />
|
||||
<node X="173386" Y="119391" />
|
||||
</zone>
|
||||
<zone name="no_bookmark_baium_no_restart" type="ConditionZone" shape="NPoly" minZ="10061" maxZ="1061">
|
||||
<zone name="no_bookmark_baium_no_restart" type="ConditionZone" shape="NPoly" minZ="10061" maxZ="11061">
|
||||
<stat name="NoBookmark" val="true" />
|
||||
<node X="111074" Y="16177" />
|
||||
<node X="114562" Y="12623" />
|
||||
|
Reference in New Issue
Block a user