Sync with L2jServer HighFive Apr 10th 2015.

This commit is contained in:
MobiusDev 2015-04-11 07:15:16 +00:00
parent 46669bba9d
commit ebfe860e5a
16 changed files with 221 additions and 204 deletions

View File

@ -74,7 +74,7 @@ public abstract class AbstractInstance extends AbstractNpcAI
return;
}
if (checkConditions(player))
if (checkConditions(player, templateId))
{
instance.setInstanceId(InstanceManager.getInstance().createDynamicInstance(template));
instance.setTemplateId(templateId);
@ -190,6 +190,11 @@ public abstract class AbstractInstance extends AbstractNpcAI
protected abstract void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance);
protected boolean checkConditions(L2PcInstance player, int templateId)
{
return checkConditions(player);
}
protected boolean checkConditions(L2PcInstance player)
{
return true;

View File

@ -201,7 +201,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
}
@Override
protected boolean checkConditions(L2PcInstance player)
protected boolean checkConditions(L2PcInstance player, int templateId)
{
if (player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
{
@ -214,7 +214,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
return false;
}
final boolean is83 = InstanceManager.getInstance().getPlayerWorld(player).getTemplateId() == TEMPLATE_ID_83 ? true : false;
final boolean is83 = templateId == TEMPLATE_ID_83;
final L2Party party = player.getParty();
final boolean isInCC = party.isInCommandChannel();
final List<L2PcInstance> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();

View File

@ -1227,7 +1227,7 @@ public final class Kamaloka extends AbstractInstance
* @param index (0-18) index of the kamaloka in arrays
* @return true if party allowed to enter
*/
private static final boolean checkConditions(L2PcInstance player, int index)
private static final boolean checkPartyConditions(L2PcInstance player, int index)
{
final L2Party party = player.getParty();
// player must be in party
@ -1375,7 +1375,7 @@ public final class Kamaloka extends AbstractInstance
return;
}
// Creating new kamaloka instance
if (!checkConditions(player, index))
if (!checkPartyConditions(player, index))
{
return;
}

View File

@ -3838,23 +3838,20 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1476" max="2979" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1476" max="2979" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.08290000259876251">
<item id="9442" min="1" max="1" chance="0.1063" /> <!-- Dynasty Sword -->
<item id="9443" min="1" max="1" chance="0.1063" /> <!-- Dynasty Blade -->
<item id="9444" min="1" max="1" chance="0.1063" /> <!-- Dynasty Phantom -->
<item id="9616" min="1" max="1" chance="33.227" /> <!-- Dynasty Sword Piece -->
<item id="9617" min="1" max="1" chance="33.227" /> <!-- Dynasty Blade Piece -->
<item id="9618" min="1" max="1" chance="33.2271" /> <!-- Dynasty Phantom Piece -->
<group chance="0.0829">
<item id="10216" min="1" max="1" chance="0.0009" /> <!-- Icarus Disperser -->
<item id="10398" min="1" max="1" chance="0.0500" /> <!-- Icarus Disperser Piece -->
</group>
<group chance="21.159400939941406">
<group chance="21.1594">
<item id="1895" min="1" max="1" chance="80.2211" /> <!-- Metallic Fiber -->
<item id="4040" min="1" max="1" chance="5.6155" /> <!-- Mold Lubricant -->
<item id="4042" min="1" max="1" chance="4.6796" /> <!-- Enria -->
<item id="4043" min="1" max="1" chance="9.3591" /> <!-- Asofe -->
<item id="5162" min="1" max="1" chance="0.1247" /> <!-- Recipe: Spiritshot (S) Compressed Package (100%) -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="10549" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Protection of Rune -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -3944,26 +3941,25 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1527" max="3083" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1477" max="3449" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.08449999988079071">
<item id="9448" min="1" max="1" chance="0.0809" /> <!-- Dynasty Cudgel -->
<item id="9449" min="1" max="1" chance="0.0809" /> <!-- Dynasty Mace -->
<item id="10252" min="1" max="1" chance="0.0809" /> <!-- Dynasty Staff -->
<item id="10253" min="1" max="1" chance="0.0809" /> <!-- Dynasty Crusher -->
<item id="9622" min="1" max="1" chance="24.4737" /> <!-- Dynasty Cudgel Piece -->
<item id="9623" min="1" max="1" chance="24.4737" /> <!-- Dynasty Mace Piece -->
<item id="10546" min="1" max="1" chance="25.3646" /> <!-- Dynasty Staff Fragment -->
<item id="10547" min="1" max="1" chance="25.3644" /> <!-- Dynasty Crusher Fragment -->
<group chance="0.0845">
<item id="10215" min="1" max="1" chance="0.0009" /> <!-- Icarus Sawsword -->
<item id="10217" min="1" max="1" chance="0.0009" /> <!-- Icarus Spirit -->
<item id="10218" min="1" max="1" chance="0.0009" /> <!-- Icarus Heavy Arms -->
<item id="10397" min="1" max="1" chance="0.0500" /> <!-- Icarus Sawsword Piece -->
<item id="10399" min="1" max="1" chance="0.0500" /> <!-- Icarus Spirit Piece -->
<item id="10400" min="1" max="1" chance="0.0500" /> <!-- Icarus Heavy Arms Piece -->
</group>
<group chance="13.723699569702148">
<group chance="13.7237">
<item id="1879" min="1" max="1" chance="62.2126" /> <!-- Cokes -->
<item id="1885" min="1" max="1" chance="31.1063" /> <!-- High-Grade Suede -->
<item id="9628" min="1" max="1" chance="2.9277" /> <!-- Leonard -->
<item id="9630" min="1" max="1" chance="1.9646" /> <!-- Orichalcum -->
<item id="9629" min="1" max="1" chance="1.6229" /> <!-- Adamantine -->
<item id="5167" min="1" max="1" chance="0.1659" /> <!-- Recipe: Blessed Spiritshot (S) Compressed Package (100%) -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="10550" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Protection of Elemental -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -4053,22 +4049,27 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1500" max="3065" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1500" max="3065" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.06530000269412994">
<item id="10221" min="1" max="1" chance="0.3007" /> <!-- Icarus Hand -->
<item id="10403" min="1" max="1" chance="99.6993" /> <!-- Icarus Hand Piece -->
<group chance="0.0653">
<item id="15694" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Helmet -->
<item id="15695" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Leather Helmet -->
<item id="15696" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Circlet -->
<item id="15646" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Leather Helmet Piece -->
<item id="15645" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Helmet Piece -->
<item id="15647" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Circlet Piece -->
</group>
<group chance="4.547999858856201">
<group chance="4.548">
<item id="1894" min="1" max="1" chance="29.3611" /> <!-- Crafted Leather -->
<item id="4039" min="1" max="1" chance="27.893" /> <!-- Mold Glue -->
<item id="4039" min="1" max="1" chance="27.8930" /> <!-- Mold Glue -->
<item id="4041" min="1" max="1" chance="7.2764" /> <!-- Mold Hardener -->
<item id="4044" min="1" max="1" chance="27.893" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.811" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.4528" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1453" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9625" min="1" max="1" chance="0.1674" /> <!-- Giant's Codex - Oblivion -->
<item id="4044" min="1" max="1" chance="27.8930" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.8110" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.4528" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1453" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="14219" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Magician's Will -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -4158,22 +4159,27 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1552" max="3172" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1500" max="3065" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.06750000268220901">
<item id="10223" min="1" max="1" chance="0.3007" /> <!-- Icarus Spitter -->
<item id="10405" min="1" max="1" chance="99.6993" /> <!-- Icarus Spitter Piece -->
<group chance="0.0653">
<item id="15694" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Helmet -->
<item id="15695" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Leather Helmet -->
<item id="15696" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Circlet -->
<item id="15646" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Leather Helmet Piece -->
<item id="15645" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Helmet Piece -->
<item id="15647" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Circlet Piece -->
</group>
<group chance="4.7032999992370605">
<item id="1894" min="1" max="1" chance="29.3775" /> <!-- Crafted Leather -->
<item id="4039" min="1" max="1" chance="27.9086" /> <!-- Mold Glue -->
<item id="4041" min="1" max="1" chance="7.2805" /> <!-- Mold Hardener -->
<item id="4044" min="1" max="1" chance="27.9086" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.8143" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.4536" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1454" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9626" min="1" max="1" chance="0.1115" /> <!-- Giant's Codex - Discipline -->
<group chance="4.548">
<item id="1894" min="1" max="1" chance="29.3611" /> <!-- Crafted Leather -->
<item id="4039" min="1" max="1" chance="27.8930" /> <!-- Mold Glue -->
<item id="4041" min="1" max="1" chance="7.2764" /> <!-- Mold Hardener -->
<item id="4044" min="1" max="1" chance="27.8930" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.8110" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.4528" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1453" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="14219" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Magician's Will -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -4262,24 +4268,26 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="535" max="1080" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="535" max="1080" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.029999999329447746">
<item id="9446" min="1" max="1" chance="0.3192" /> <!-- Dynasty Knife -->
<item id="9620" min="1" max="1" chance="99.6808" /> <!-- Dynasty Knife Piece -->
<group chance="0.03">
<item id="10223" min="1" max="1" chance="0.0009" /> <!-- Icarus Spitter -->
<item id="10405" min="1" max="1" chance="0.0500" /> <!-- Icarus Spitter Piece -->
</group>
<group chance="10.240099906921387">
<group chance="10.2401">
<item id="1879" min="1" max="1" chance="17.5259" /> <!-- Cokes -->
<item id="1885" min="1" max="1" chance="8.7629" /> <!-- High-Grade Suede -->
<item id="9628" min="1" max="1" chance="0.8247" /> <!-- Leonard -->
<item id="9630" min="1" max="1" chance="0.5534" /> <!-- Orichalcum -->
<item id="9629" min="1" max="1" chance="0.4572" /> <!-- Adamantine -->
<item id="9573" min="1" max="1" chance="0.7302" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.1826" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0183" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9573" min="1" max="1" chance="0.7302" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.1826" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0183" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9546" min="1" max="1" chance="0.8412" /> <!-- Fire Stone -->
<item id="1345" min="10" max="30" chance="70.1036" /> <!-- Shining Arrow -->
<item id="6622" min="1" max="1" chance="0.0500" /> <!-- Giant's Codex -->
<item id="10551" min="1" max="1" chance="0.0500" /> <!-- Forgotten Scroll - Protection of Alignment -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -4368,22 +4376,28 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="2702" max="5522" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="2702" max="5522" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.15369999408721924">
<item id="9447" min="1" max="1" chance="0.3175" /> <!-- Dynasty Halberd -->
<item id="9621" min="1" max="1" chance="99.6825" /> <!-- Dynasty Halberd Piece -->
<group chance="0.1537">
<item id="15703" min="1" max="1" chance="0.0050" /> <!-- Sealed Moirai Gauntlet -->
<item id="15704" min="1" max="1" chance="0.0050" /> <!-- Sealed Moirai Leather Gloves -->
<item id="15705" min="1" max="1" chance="0.0050" /> <!-- Sealed Moirai Gloves -->
<item id="15654" min="1" max="1" chance="1.0000" /> <!-- Sealed Moirai Gauntlet Piece -->
<item id="15655" min="1" max="1" chance="1.0000" /> <!-- Sealed Moirai Leather Gloves Piece -->
<item id="15656" min="1" max="1" chance="1.0000" /> <!-- Sealed Moirai Gloves Piece -->
</group>
<group chance="8.727499961853027">
<group chance="8.7275">
<item id="1894" min="1" max="1" chance="27.5621" /> <!-- Crafted Leather -->
<item id="4039" min="1" max="1" chance="26.184" /> <!-- Mold Glue -->
<item id="4039" min="1" max="1" chance="26.1840" /> <!-- Mold Glue -->
<item id="4041" min="1" max="1" chance="6.8306" /> <!-- Mold Hardener -->
<item id="4044" min="1" max="1" chance="26.184" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.455" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.3638" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1364" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="4044" min="1" max="1" chance="26.1840" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.4550" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.3638" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1364" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9547" min="1" max="1" chance="6.2841" /> <!-- Water Stone -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="14219" min="1" max="1" chance="0.5000" /> <!-- Forgotten Scroll - Magician's Will -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -4473,25 +4487,27 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1476" max="2979" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1476" max="2979" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.42899999022483826">
<item id="9514" min="1" max="1" chance="0.0946" /> <!-- Sealed Dynasty Breast Plate -->
<item id="9515" min="1" max="1" chance="0.1513" /> <!-- Sealed Dynasty Gaiter -->
<item id="9530" min="1" max="1" chance="25.2036" /> <!-- Sealed Dynasty Breast Plate Piece -->
<item id="9531" min="1" max="1" chance="74.5505" /> <!-- Sealed Dynasty Gaiters Piece -->
<group chance="0.429">
<item id="15699" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Tunic -->
<item id="15702" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Stockings -->
<item id="15650" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Tunic Piece -->
<item id="15653" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Stockings Piece -->
</group>
<group chance="9.38379955291748">
<group chance="9.3838">
<item id="1879" min="1" max="1" chance="58.6218" /> <!-- Cokes -->
<item id="1885" min="1" max="1" chance="29.3109" /> <!-- High-Grade Suede -->
<item id="9628" min="1" max="1" chance="2.7587" /> <!-- Leonard -->
<item id="9630" min="1" max="1" chance="1.8512" /> <!-- Orichalcum -->
<item id="9629" min="1" max="1" chance="1.5293" /> <!-- Adamantine -->
<item id="9573" min="1" max="1" chance="2.4426" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.6106" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0611" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9573" min="1" max="1" chance="2.4426" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.6106" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0611" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9548" min="1" max="1" chance="2.8138" /> <!-- Earth Stone -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="10549" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Protection of Rune -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -4581,25 +4597,29 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1500" max="3065" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1500" max="3065" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.337799996137619">
<item id="9519" min="1" max="1" chance="0.1642" /> <!-- Sealed Dynasty Leather Armor -->
<item id="9520" min="1" max="1" chance="0.2627" /> <!-- Sealed Dynasty Leather Leggings -->
<item id="9535" min="1" max="1" chance="40.3139" /> <!-- Sealed Dynasty Leather Armor Piece -->
<item id="9536" min="1" max="1" chance="59.2592" /> <!-- Sealed Dynasty Leather Leggings Piece -->
<group chance="0.3378">
<item id="15706" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Boots -->
<item id="15707" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Leather Boots -->
<item id="15708" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Shoes -->
<item id="15657" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Boots Piece -->
<item id="15658" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Leather Boots Piece -->
<item id="15659" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Shoes Piece -->
</group>
<group chance="9.617799758911133">
<group chance="9.6178">
<item id="1879" min="1" max="1" chance="58.6218" /> <!-- Cokes -->
<item id="1885" min="1" max="1" chance="29.3109" /> <!-- High-Grade Suede -->
<item id="9628" min="1" max="1" chance="2.7587" /> <!-- Leonard -->
<item id="9630" min="1" max="1" chance="1.8512" /> <!-- Orichalcum -->
<item id="9629" min="1" max="1" chance="1.5293" /> <!-- Adamantine -->
<item id="9573" min="1" max="1" chance="2.4426" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.6106" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0611" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9573" min="1" max="1" chance="2.4426" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.6106" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0611" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9549" min="1" max="1" chance="2.8138" /> <!-- Wind Stone -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="10551" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Protection of Alignment -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->
@ -4689,23 +4709,25 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1527" max="3083" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1372" max="3204" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.3409999907016754">
<item id="9524" min="1" max="1" chance="0.1642" /> <!-- Sealed Dynasty Tunic -->
<item id="9525" min="1" max="1" chance="0.2627" /> <!-- Sealed Dynasty Stockings -->
<item id="9540" min="1" max="1" chance="40.3139" /> <!-- Sealed Dynasty Tunic Piece -->
<item id="9541" min="1" max="1" chance="59.2592" /> <!-- Sealed Dynasty Stocking Piece -->
<group chance="0.341">
<item id="9524" min="1" max="1" chance="0.0050" /> <!-- Sealed Dynasty Tunic -->
<item id="9525" min="1" max="1" chance="0.0050" /> <!-- Sealed Dynasty Stockings -->
<item id="9540" min="1" max="1" chance="1.0000" /> <!-- Sealed Dynasty Tunic Piece -->
<item id="9541" min="1" max="1" chance="1.0000" /> <!-- Sealed Dynasty Stocking Piece -->
</group>
<group chance="4.89109992980957">
<group chance="4.8911">
<item id="1894" min="1" max="1" chance="27.5621" /> <!-- Crafted Leather -->
<item id="4039" min="1" max="1" chance="26.184" /> <!-- Mold Glue -->
<item id="4041" min="1" max="1" chance="6.8306" /> <!-- Mold Hardener -->
<item id="4044" min="1" max="1" chance="26.184" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.455" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.3638" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1364" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="4039" min="1" max="1" chance="26.1840" /> <!-- Mold Glue -->
<item id="4041" min="1" max="1" chance="6.8306" /> <!-- Mold Hardene r-->
<item id="4044" min="1" max="1" chance="26.1840" /> <!-- Thons -->
<item id="9573" min="1" max="1" chance="5.4550" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="1.3638" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.1364" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="10550" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Protection of Elemental -->
<item id="9550" min="1" max="1" chance="6.2841" /> <!-- Dark Stone -->
</group>
<group chance="42.0">
@ -4797,27 +4819,27 @@
</ai>
<drop_lists>
<death>
<group chance="70">
<item id="57" min="1552" max="3172" chance="100" /> <!-- Adena -->
<group chance="70.0">
<item id="57" min="1552" max="3172" chance="100.0000" /> <!-- Adena -->
</group>
<group chance="0.3962000012397766">
<item id="9452" min="1" max="1" chance="0.4382" /> <!-- Sealed Dynasty Earring -->
<item id="9453" min="1" max="1" chance="0.3286" /> <!-- Sealed Dynasty Necklace -->
<item id="9454" min="1" max="1" chance="0.6573" /> <!-- Sealed Dynasty Ring -->
<item id="9991" min="1" max="1" chance="31.0688" /> <!-- Sealed Dynasty Earring Gemstone -->
<item id="9992" min="1" max="1" chance="23.8445" /> <!-- Sealed Dynasty Necklace Gemstone -->
<item id="9993" min="1" max="1" chance="43.6626" /> <!-- Sealed Dynasty Ring Gemstone -->
<group chance="0.3962">
<item id="15699" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Tunic -->
<item id="15702" min="1" max="1" chance="0.0009" /> <!-- Sealed Moirai Stockings -->
<item id="15650" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Tunic Piece -->
<item id="15653" min="1" max="1" chance="0.5000" /> <!-- Sealed Moirai Stockings Piece -->
</group>
<group chance="9.951800346374512">
<group chance="9.9518">
<item id="1879" min="1" max="1" chance="58.6218" /> <!-- Cokes -->
<item id="1885" min="1" max="1" chance="29.3109" /> <!-- High-Grade Suede -->
<item id="9628" min="1" max="1" chance="2.7587" /> <!-- Leonard -->
<item id="9630" min="1" max="1" chance="1.8512" /> <!-- Orichalcum -->
<item id="9629" min="1" max="1" chance="1.5293" /> <!-- Adamantine -->
<item id="9573" min="1" max="1" chance="2.4426" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.6106" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0611" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9551" min="1" max="1" chance="2.8138" /> <!-- Holy Stone -->
<item id="9573" min="1" max="1" chance="2.4426" /> <!-- Life Stone - Level 80 -->
<item id="9574" min="1" max="1" chance="0.6106" /> <!-- Mid-Grade Life Stone - Level 80 -->
<item id="9575" min="1" max="1" chance="0.0611" /> <!-- High-Grade Life Stone - Level 80 -->
<item id="9551" min="1" max="1" chance="2.8138" /> <!-- Divine Stone -->
<item id="6622" min="1" max="1" chance="0.5000" /> <!-- Giant's Codex -->
<item id="14219" min="1" max="1" chance="0.1000" /> <!-- Forgotten Scroll - Magician's Will -->
</group>
<group chance="42.0">
<item id="8600" min="1" max="1" chance="55" /> <!-- Herb of Life -->

View File

@ -81,6 +81,8 @@
<item id="15794" min="1" max="1" chance="0.2951" /> <!-- Recipe - Sealed Vesper Circlet (60%) -->
<item id="15808" min="1" max="1" chance="0.4216" /> <!-- Recipe - Sealed Vesper Shield (60%) -->
<item id="15807" min="1" max="1" chance="0.4216" /> <!-- Recipe - Sealed Vesper Sigil (60%) -->
<item id="10578" min="1" max="1" chance="0.0500" /> <!-- Forgotten Scroll - Mutual Response -->
<item id="14191" min="1" max="1" chance="0.0500" /> <!-- Forgotten Scroll - Meteor -->
</group>
<group chance="7">
<item id="15690" min="1" max="1" chance="15" /> <!-- Secret Key -->

View File

@ -65,9 +65,8 @@ public class L2PlayerAI extends L2PlayableAI
@Override
protected synchronized void changeIntention(CtrlIntention intention, Object arg0, Object arg1)
{
// do nothing unless CAST intention
// however, forget interrupted actions when starting to use an offensive skill
if ((intention != AI_INTENTION_CAST) || ((arg0 != null) && ((Skill) arg0).isBad()))
// Forget next if it's not cast or it's cast and skill is toggle.
if ((intention != AI_INTENTION_CAST) || ((arg0 != null) && !((Skill) arg0).isToggle()))
{
_nextIntention = null;
super.changeIntention(intention, arg0, arg1);

View File

@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.StampedLock;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@ -232,7 +233,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
private L2Character _debugger = null;
private final ReentrantLock _teleportLock = new ReentrantLock();
private final ReentrantLock _attackLock = new ReentrantLock();
private final StampedLock _attackLock = new StampedLock();
private Team _team = Team.NONE;
@ -825,10 +826,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
*/
public void doAttack(L2Character target)
{
if (!_attackLock.tryLock())
{
return;
}
final long stamp = _attackLock.tryWriteLock();
try
{
if ((target == null) || isAttackingDisabled())
@ -932,9 +930,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
stopEffectsOnAction();
// Get the active weapon item corresponding to the active weapon instance (always equipped in the right hand)
L2Weapon weaponItem = getActiveWeaponItem();
// GeoData Los Check here (or dz > 1000)
if (!GeoData.getInstance().canSeeTarget(this, target))
{
@ -945,6 +940,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
// BOW and CROSSBOW checks
// Get the active weapon item corresponding to the active weapon instance (always equipped in the right hand)
L2Weapon weaponItem = getActiveWeaponItem();
if ((weaponItem != null) && !isTransformed())
{
if (weaponItem.getItemType() == WeaponType.BOW)
@ -1200,7 +1197,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
finally
{
_attackLock.unlock();
_attackLock.unlockWrite(stamp);
}
}

View File

@ -11026,6 +11026,7 @@ public final class L2PcInstance extends L2Playable
}
}
}
_revivePet = false;
_reviveRequested = 0;
_revivePower = 0;
}

View File

@ -18,32 +18,32 @@
*/
package com.l2jserver.gameserver.pathfinding;
public abstract class AbstractNode
public abstract class AbstractNode<Loc extends AbstractNodeLoc>
{
private AbstractNodeLoc _loc;
private AbstractNode _parent;
private Loc _loc;
private AbstractNode<Loc> _parent;
public AbstractNode(AbstractNodeLoc loc)
public AbstractNode(Loc loc)
{
_loc = loc;
}
public void setParent(AbstractNode p)
public void setParent(AbstractNode<Loc> p)
{
_parent = p;
}
public AbstractNode getParent()
public AbstractNode<Loc> getParent()
{
return _parent;
}
public AbstractNodeLoc getLoc()
public Loc getLoc()
{
return _loc;
}
public void setLoc(AbstractNodeLoc l)
public void setLoc(Loc l)
{
_loc = l;
}
@ -72,7 +72,7 @@ public abstract class AbstractNode
{
return false;
}
final AbstractNode other = (AbstractNode) obj;
final AbstractNode<?> other = (AbstractNode<?>) obj;
if (_loc == null)
{
if (other._loc != null)

View File

@ -19,15 +19,14 @@
package com.l2jserver.gameserver.pathfinding.cellnodes;
import com.l2jserver.gameserver.pathfinding.AbstractNode;
import com.l2jserver.gameserver.pathfinding.AbstractNodeLoc;
public class CellNode extends AbstractNode
public class CellNode extends AbstractNode<NodeLoc>
{
private CellNode _next = null;
private boolean _isInUse = true;
private float _cost = -1000;
public CellNode(AbstractNodeLoc loc)
public CellNode(NodeLoc loc)
{
super(loc);
}

View File

@ -140,7 +140,7 @@ public class CellNodeBuffer
private final void getNeighbors()
{
if (((NodeLoc) _current.getLoc()).canGoNone())
if (_current.getLoc().canGoNone())
{
return;
}
@ -155,25 +155,25 @@ public class CellNodeBuffer
CellNode nodeN = null;
// East
if (((NodeLoc) _current.getLoc()).canGoEast())
if (_current.getLoc().canGoEast())
{
nodeE = addNode(x + 1, y, z, false);
}
// South
if (((NodeLoc) _current.getLoc()).canGoSouth())
if (_current.getLoc().canGoSouth())
{
nodeS = addNode(x, y + 1, z, false);
}
// West
if (((NodeLoc) _current.getLoc()).canGoWest())
if (_current.getLoc().canGoWest())
{
nodeW = addNode(x - 1, y, z, false);
}
// North
if (((NodeLoc) _current.getLoc()).canGoNorth())
if (_current.getLoc().canGoNorth())
{
nodeN = addNode(x, y - 1, z, false);
}
@ -183,7 +183,7 @@ public class CellNodeBuffer
// SouthEast
if ((nodeE != null) && (nodeS != null))
{
if (((NodeLoc) nodeE.getLoc()).canGoSouth() && ((NodeLoc) nodeS.getLoc()).canGoEast())
if (nodeE.getLoc().canGoSouth() && nodeS.getLoc().canGoEast())
{
addNode(x + 1, y + 1, z, true);
}
@ -192,7 +192,7 @@ public class CellNodeBuffer
// SouthWest
if ((nodeS != null) && (nodeW != null))
{
if (((NodeLoc) nodeW.getLoc()).canGoSouth() && ((NodeLoc) nodeS.getLoc()).canGoWest())
if (nodeW.getLoc().canGoSouth() && nodeS.getLoc().canGoWest())
{
addNode(x - 1, y + 1, z, true);
}
@ -201,7 +201,7 @@ public class CellNodeBuffer
// NorthEast
if ((nodeN != null) && (nodeE != null))
{
if (((NodeLoc) nodeE.getLoc()).canGoNorth() && ((NodeLoc) nodeN.getLoc()).canGoEast())
if (nodeE.getLoc().canGoNorth() && nodeN.getLoc().canGoEast())
{
addNode(x + 1, y - 1, z, true);
}
@ -210,7 +210,7 @@ public class CellNodeBuffer
// NorthWest
if ((nodeN != null) && (nodeW != null))
{
if (((NodeLoc) nodeW.getLoc()).canGoNorth() && ((NodeLoc) nodeN.getLoc()).canGoWest())
if (nodeW.getLoc().canGoNorth() && nodeN.getLoc().canGoWest())
{
addNode(x - 1, y - 1, z, true);
}
@ -244,7 +244,7 @@ public class CellNodeBuffer
// reinit node if needed
if (result.getLoc() != null)
{
((NodeLoc) result.getLoc()).set(x, y, z);
result.getLoc().set(x, y, z);
}
else
{
@ -272,7 +272,7 @@ public class CellNodeBuffer
final int stepZ = Math.abs(geoZ - _current.getLoc().getZ());
float weight = diagonal ? Config.DIAGONAL_WEIGHT : Config.LOW_WEIGHT;
if (!((NodeLoc) newNode.getLoc()).canGoAll() || (stepZ > 16))
if (!newNode.getLoc().canGoAll() || (stepZ > 16))
{
weight = Config.HIGH_WEIGHT;
}
@ -330,7 +330,7 @@ public class CellNodeBuffer
return true;
}
if (!((NodeLoc) result.getLoc()).canGoAll())
if (!result.getLoc().canGoAll())
{
return true;
}

View File

@ -194,11 +194,12 @@ public class CellPathFinding extends PathFinding
remove = false;
final Iterator<AbstractNodeLoc> endPoint = path.iterator();
endPoint.next();
int currentX = x;
int currentY = y;
int currentZ = z;
for (int i = 0; i < path.size(); i++)
for (int i = 0; i < path.size() - 1; i++)
{
AbstractNodeLoc locMiddle = path.get(i);
AbstractNodeLoc locEnd = endPoint.next();
@ -232,7 +233,7 @@ public class CellPathFinding extends PathFinding
return path;
}
private List<AbstractNodeLoc> constructPath(AbstractNode node)
private List<AbstractNodeLoc> constructPath(AbstractNode<NodeLoc> node)
{
final List<AbstractNodeLoc> path = new CopyOnWriteArrayList<>();
int previousDirectionX = Integer.MIN_VALUE;

View File

@ -139,9 +139,9 @@ public class NodeLoc extends AbstractNodeLoc
{
nswe |= Cell.NSWE_SOUTH;
}
if (canGoEast())
if (canGoWest())
{
nswe |= Cell.NSWE_EAST;
nswe |= Cell.NSWE_WEST;
}
result = (prime * result) + (((_geoHeight & 0xFFFF) << 1) | nswe);

View File

@ -19,18 +19,17 @@
package com.l2jserver.gameserver.pathfinding.geonodes;
import com.l2jserver.gameserver.pathfinding.AbstractNode;
import com.l2jserver.gameserver.pathfinding.AbstractNodeLoc;
/**
* @author -Nemesiss-
*/
public class GeoNode extends AbstractNode
public class GeoNode extends AbstractNode<GeoNodeLoc>
{
private final int _neighborsIdx;
private short _cost;
private GeoNode[] _neighbors;
public GeoNode(AbstractNodeLoc Loc, int Neighbors_idx)
public GeoNode(GeoNodeLoc Loc, int Neighbors_idx)
{
super(Loc);
_neighborsIdx = Neighbors_idx;
@ -51,15 +50,13 @@ public class GeoNode extends AbstractNode
return _neighbors;
}
public void attachNeighbors()
public void attachNeighbors(GeoNode[] neighbors)
{
if (getLoc() == null)
{
_neighbors = null;
}
else
{
_neighbors = GeoPathFinding.getInstance().readNeighbors(this, _neighborsIdx);
}
_neighbors = neighbors;
}
public int getNeighborsIdx()
{
return _neighborsIdx;
}
}

View File

@ -155,7 +155,7 @@ public class GeoPathFinding extends PathFinding
i++;
visited.add(node);
node.attachNeighbors();
node.attachNeighbors(readNeighbors(node));
GeoNode[] neighbors = node.getNeighbors();
if (neighbors == null)
{
@ -191,7 +191,7 @@ public class GeoPathFinding extends PathFinding
return null;
}
public List<AbstractNodeLoc> constructPath2(AbstractNode node)
public List<AbstractNodeLoc> constructPath2(AbstractNode<GeoNodeLoc> node)
{
LinkedList<AbstractNodeLoc> path = new LinkedList<>();
int previousDirectionX = -1000;
@ -216,8 +216,15 @@ public class GeoPathFinding extends PathFinding
return path;
}
public GeoNode[] readNeighbors(GeoNode n, int idx)
private GeoNode[] readNeighbors(GeoNode n)
{
if (n.getLoc() == null)
{
return null;
}
int idx = n.getNeighborsIdx();
int node_x = n.getLoc().getNodeX();
int node_y = n.getLoc().getNodeY();
// short node_z = n.getLoc().getZ();
@ -225,7 +232,7 @@ public class GeoPathFinding extends PathFinding
short regoffset = getRegionOffset(getRegionX(node_x), getRegionY(node_y));
ByteBuffer pn = _pathNodes.get(regoffset);
List<AbstractNode> neighbors = new ArrayList<>(8);
List<AbstractNode<GeoNodeLoc>> neighbors = new ArrayList<>(8);
GeoNode newNode;
short new_node_x, new_node_y;

View File

@ -18,6 +18,8 @@
*/
package com.l2jserver.gameserver.pathfinding.utils;
import java.util.ArrayList;
import com.l2jserver.gameserver.pathfinding.AbstractNode;
/**
@ -25,40 +27,25 @@ import com.l2jserver.gameserver.pathfinding.AbstractNode;
*/
public class FastNodeList
{
private final AbstractNode[] _list;
private int _size;
private final ArrayList<AbstractNode<?>> _list;
public FastNodeList(int size)
{
_list = new AbstractNode[size];
_list = new ArrayList<>(size);
}
public void add(AbstractNode n)
public void add(AbstractNode<?> n)
{
_list[_size++] = n;
_list.add(n);
}
public boolean contains(AbstractNode n)
public boolean contains(AbstractNode<?> n)
{
for (int i = 0; i < _size; i++)
{
if (_list[i].equals(n))
{
return true;
}
}
return false;
return _list.contains(n);
}
public boolean containsRev(AbstractNode n)
public boolean containsRev(AbstractNode<?> n)
{
for (int i = _size - 1; i >= 0; i--)
{
if (_list[i].equals(n))
{
return true;
}
}
return false;
return _list.lastIndexOf(n) != -1;
}
}