Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: aCis_datapack/data/html/admin/knownlist.htm
- ===================================================================
- --- aCis_datapack/data/html/admin/knownlist.htm (revision 2)
- +++ aCis_datapack/data/html/admin/knownlist.htm (working copy)
- @@ -1,8 +1,11 @@
- <html><body>
- <center>Knownlist for <font color="LEVEL">%target%</font></center><br>
- - Knownlist is <font color="LEVEL">%type%</font>, has <font color="LEVEL">%size%</font> objects.
- + Knownlist has <font color="LEVEL">%size%</font> objects.
- <table width=270>
- - <tr><td width=170></td><td width=100></td></tr>
- + <tr><td width=150></td><td width=120></td></tr>
- %knownlist%
- + </table><br>
- + <table width=270 bgcolor=444444>
- + <tr><td width=270>Page: %pages%</td></tr>
- </table>
- </body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/default/30747.htm
- ===================================================================
- --- aCis_datapack/data/html/default/30747.htm (revision 2)
- +++ aCis_datapack/data/html/default/30747.htm (working copy)
- @@ -1,4 +1,4 @@
- <html><body>Fairy Mimyu:<br>
- -Ah...! I've returned to this world after a long time; so why is it so busy like this? There are people everywhere... Is some half-wit going to catch and stuff me?... Have hunters come all the way up to here now? I mean, how many more do they have to kill to be satisfied?... Yah! That's dangerous! It's dangerous! Don't kill me...<br>
- +It has been many years since I visited this place... Why is it so busy? People everywhere... I am afraid some half-wit is going to try to catch and stuff me! Are there hunters about? How many more of us must die to satisfy their ignorant blood lust? It's dangerous I tell you! Don't let them kill me...<br>
- <a action="bypass -h npc_%objectId%_Quest">Quest</a>
- </body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/disabled.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/disabled.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/disabled.htm (working copy)
- @@ -0,0 +1,5 @@
- +<html><body>
- + The Wedding Manager is currently disabled.<br>
- + Contact an administrator in order to enable it via configuration files. It can be found in <font color="LEVEL">events.properties</font>.<br>
- + <font color="LEVEL">AllowWedding</font> have to be set on <font color="LEVEL">True</font> (False by default).
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/error_adena.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_adena.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/error_adena.htm (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>
- + You or your partner haven't enough adenas.<br>
- + You need <font color="LEVEL">%adenasCost% adenas</font> to pay marriage fees.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/error_alreadymarried.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_alreadymarried.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/error_alreadymarried.htm (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>
- + I'm sorry, but this player is already married.<br>
- + Find another belover, or ask him/her to divorce first.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/error_friendlist.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_friendlist.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/error_friendlist.htm (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>
- + This player isn't on your friends list. You must be friends in order to marry.<br>
- + To invite someone as a friend, type /friendinvite Name, where Name is the player's name. He/she has to accept you.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/error_noformal.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_noformal.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/error_noformal.htm (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>
- + You or your partner aren't wearing a Formal wear, so go find one and come back later !<br>
- + I heard <font color="LEVEL">Trader Alexis</font> in Aden town can help you, if you don't know how to get one.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/error_sex.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_sex.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/error_sex.htm (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>
- + Homosexual marriages aren't allowed.<br>
- + Your partner has to be from opposite sex in order I accept your request.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/error_wrongtarget.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_wrongtarget.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/error_wrongtarget.htm (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>
- + Is there something wrong with you ?<br>
- + You try to marry with yourself ! Target another player.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/notfound.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/notfound.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/notfound.htm (working copy)
- @@ -0,0 +1,3 @@
- +<html><body>
- + Your friend must be online to begin the marriage process.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/start.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/start.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/start.htm (working copy)
- @@ -0,0 +1,16 @@
- +<html><body>
- + Hi there !<br>
- + So, you decided to marry ? In order to get married, <font color="LEVEL">you need first to be on your beloved's friends list.</font> To do this, you have to type "/friendinvite Name" without the quotes, where Name is the name of your partner.<br>
- + Once friends, ask me to get married. You and your partner <font color="LEVEL">%needOrNot% need to wear Formal wear</font>, and the wedding ceremony's formalities worth <font color="LEVEL">%adenasCost% adenas</font>.<br>
- +
- + <table width=270>
- + <tr>
- + <td width=130><font color="LEVEL">I want to bind my life to</font></td>
- + <td width=100><edit var="beloved" width=100 height=15></td>
- + <td width=40><button value="Accept" action="bypass -h npc_%objectId%_AskWedding $beloved" width=40 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
- + </tr>
- + </table>
- +
- + <br><center><img src="L2UI_CH3.herotower_deco" width=256 height=32></center><br>
- + Come speak to me anew once married, I could teleport you to your beloved, or even pronounces a divorce if you think he/she wasn't the good one.
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/start2.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/start2.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/start2.htm (working copy)
- @@ -0,0 +1,6 @@
- +<html><body>
- + Hello there, how can I help you on this beautiful day ?<br>
- + <center><a action="bypass -h npc_%objectId%_GoToLove">Teleport me near my beloved.</a>
- + <br>
- + <a action="bypass -h npc_%objectId%_Divorce">I want to divorce.</a></center>
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/waitforpartner.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/waitforpartner.htm (revision 0)
- +++ aCis_datapack/data/html/mods/wedding/waitforpartner.htm (working copy)
- @@ -0,0 +1,4 @@
- +<html><body>
- + You or your partner asked to marry ! If you're the requestor, wait until your partner accepted or declined your request.<br>
- + If you're the requested, what are you waiting for to say "Yes" or "No" ? I won't answer for you !
- +</body></html>
- \ No newline at end of file
- Index: aCis_datapack/data/xml/npcs/31000-31999.xml
- ===================================================================
- --- aCis_datapack/data/xml/npcs/31000-31999.xml (revision 2)
- +++ aCis_datapack/data/xml/npcs/31000-31999.xml (working copy)
- @@ -27339,7 +27339,7 @@
- <set name="walkSpd" val="80"/>
- <set name="runSpd" val="120"/>
- <set name="dropHerbGroup" val="0"/>
- - <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" clan="all_elemental_clan" clanRange="300" canMove="true" seedable="false"/>
- + <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="1000" clan="all_elemental_clan" clanRange="300" canMove="true" seedable="false"/>
- <skills>
- <skill id="4045" level="1"/>
- <skill id="4416" level="13"/>
- @@ -27409,7 +27409,7 @@
- <set name="walkSpd" val="12"/>
- <set name="runSpd" val="12"/>
- <set name="dropHerbGroup" val="0"/>
- - <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" clan="all_elemental2_clan" clanRange="300" canMove="true" seedable="false"/>
- + <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="1000" clan="all_elemental2_clan" clanRange="300" canMove="true" seedable="false"/>
- <skills>
- <skill id="4045" level="1"/>
- <skill id="4416" level="7"/>
- @@ -27444,7 +27444,7 @@
- <set name="walkSpd" val="12"/>
- <set name="runSpd" val="12"/>
- <set name="dropHerbGroup" val="0"/>
- - <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" clan="all_elemental_clan" clanRange="300" canMove="true" seedable="false"/>
- + <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="1000" clan="all_elemental_clan" clanRange="300" canMove="true" seedable="false"/>
- <skills>
- <skill id="4045" level="1"/>
- <skill id="4416" level="7"/>
- Index: aCis_datapack/data/xml/skills/0300-0399.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/0300-0399.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/0300-0399.xml (working copy)
- @@ -1787,7 +1787,7 @@
- <sub order="0x40" stat="cancelVuln" val="80" />
- <mul order="0x30" stat="gainHp" val="2" />
- <mul order="0x30" stat="pDef" val="0.75"/>
- - <mul order="0x30" stat="mDef" val="0.75"/>
- + <sub order="0x40" stat="mDef" val="25"/>
- </effect>
- <effect name="BlockDebuff" time="120" noicon="1" val="0" stackOrder="3" stackType="abnormal_debuff_invincibility" />
- </for>
- Index: aCis_datapack/data/xml/skills/0400-0499.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/0400-0499.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/0400-0499.xml (working copy)
- @@ -383,6 +383,7 @@
- <skill id="413" levels="8" name="Rapid Fire">
- <table name="#mpConsume"> 28 29 30 31 32 33 34 34 </table>
- <table name="#atk"> 62 67 73 78 83 88 94 100 </table>
- + <table name="#stackOrder"> 1 2 3 4 5 6 7 8 </table>
- <set name="mpConsume" val="#mpConsume"/>
- <set name="target" val="TARGET_SELF"/>
- <set name="skillType" val="BUFF"/>
- @@ -391,7 +392,7 @@
- <set name="hitTime" val="2000"/>
- <set name="weaponsAllowed" val="BOW" /> <!-- Bow -->
- <for>
- - <effect count="1" name="Buff" time="120" val="0">
- + <effect count="1" name="Buff" time="120" val="0" stackOrder="#stackOrder" stackType="rapid_fire">
- <add order="0x40" stat="pAtk" val="#atk">
- <using kind="BOW"/>
- </add>
- @@ -500,7 +501,7 @@
- <set name="itemConsumeId" val="1661"/>
- <set name="mpConsume" val="#mpConsume"/>
- <set name="hitTime" val="3000"/>
- - <set name="reuseDelay" val="120000"/>
- + <set name="reuseDelay" val="1200000"/>
- <set name="target" val="TARGET_SELF"/>
- <set name="skillType" val="EXTRACTABLE" />
- <set name="operateType" val="OP_ACTIVE"/>
- @@ -798,6 +799,7 @@
- </skill>
- <skill id="439" levels="1" name="Shield of Revenge">
- <set name="magicLvl" val="79" />
- + <set name="mpConsume" val="87"/>
- <set name="hitTime" val="4000" />
- <set name="mpConsume" val="78" />
- <set name="operateType" val="OP_ACTIVE" />
- @@ -882,10 +884,10 @@
- <set name="target" val="TARGET_AREA_CORPSE_MOB" />
- </skill>
- <skill id="445" levels="1" name="Mirage">
- - <set name="aggroPoints" val="673" />
- + <set name="aggroPoints" val="669" />
- <set name="hitTime" val="2000"/>
- <set name="magicLvl" val="79"/>
- - <set name="mpConsume" val="43"/>
- + <set name="mpConsume" val="63"/>
- <set name="operateType" val="OP_ACTIVE"/>
- <set name="reuseDelay" val="300000"/>
- <set name="skillType" val="BUFF"/>
- @@ -895,29 +897,31 @@
- </for>
- </skill>
- <skill id="446" levels="1" name="Dodge">
- + <set name="aggroPoints" val="669" />
- <set name="hitTime" val="500" />
- - <set name="mpConsume" val="29" />
- + <set name="mpConsume" val="49" />
- <set name="operateType" val="OP_ACTIVE" />
- - <set name="reuseDelay" val="150000" />
- + <set name="reuseDelay" val="300000" />
- <set name="skillType" val="BUFF" />
- <set name="target" val="TARGET_SELF" />
- <for>
- <effect name="Buff" time="5" val="0" stackOrder="1" stackType="avoid_skill">
- - <add order="0x40" stat="pSkillEvas" val="90" />
- + <add order="0x40" stat="pSkillEvas" val="100" />
- </effect>
- </for>
- </skill>
- <skill id="447" levels="1" name="Counterattack">
- + <set name="aggroPoints" val="669" />
- <set name="magicLvl" val="79" />
- <set name="hitTime" val="500" />
- - <set name="mpConsume" val="29" />
- + <set name="mpConsume" val="49" />
- <set name="operateType" val="OP_ACTIVE" />
- - <set name="reuseDelay" val="150000" />
- + <set name="reuseDelay" val="300000" />
- <set name="skillType" val="BUFF" />
- <set name="target" val="TARGET_SELF" />
- <for>
- - <effect name="Buff" time="10" val="0" stackOrder="1" stackType="counter_skill">
- - <add order="0x40" stat="vengeancePdam" val="90" />
- + <effect name="Buff" time="5" val="0" stackOrder="1" stackType="counter_skill">
- + <add order="0x40" stat="vengeancePdam" val="100" />
- </effect>
- </for>
- </skill>
- @@ -1020,8 +1024,9 @@
- </effect>
- </for>
- </skill>
- - <skill id="452" levels="5" name="Shock Stomp">
- - <table name="#effectPower"> 40 50 60 70 80 </table>
- + <skill id="452" levels="5" name="Shock Stomp" enchantLevels1="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85 </table>
- + <table name="#ench1power"> 50 51 52 52 53 54 54 55 56 56 57 58 58 59 60 60 61 62 62 63 64 64 65 66 66 67 68 68 69 70 </table>
- <table name="#magicLvl"> 55 60 64 68 72 </table>
- <table name="#mpConsume"> 55 55 55 55 55 </table>
- <set name="weaponsAllowed" val="POLE"/>
- @@ -1037,9 +1042,11 @@
- <set name="operateType" val="OP_ACTIVE"/>
- <set name="skillType" val="STUN" />
- <set name="isDebuff" val="true" />
- + <enchant1 name="power" val="#ench1power"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- <for>
- - <effect name="Stun" time="5" val="0" stackOrder="2" stackType="stun" />
- - <effect name="RemoveTarget" noicon="1" val="0" effectPower="#effectPower" effectType="DEBUFF" />
- + <effect name="Stun" time="9" val="0" stackOrder="2" stackType="stun" />
- + <effect name="RemoveTarget" noicon="1" val="0" effectPower="50" effectType="DEBUFF" />
- </for>
- </skill>
- <skill id="453" levels="1" name="Escape Shackle">
- Index: aCis_datapack/data/xml/skills/1000-1099.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/1000-1099.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/1000-1099.xml (working copy)
- @@ -845,9 +845,13 @@
- </effect>
- </enchant1for>
- </skill>
- - <skill id="1045" levels="6" name="Blessed Body">
- - <table name="#mpInitialConsume"> 8 9 10 11 12 14 </table>
- - <table name="#mpConsume"> 31 35 38 41 48 53 </table>
- + <skill id="1045" levels="6" name="Blessed Body" enchantLevels1="30" enchantLevels2="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 83 83 83 84 84 84 85 85 85 </table>
- + <table name="#ench2mpInitialConsume"> 13 13 13 12 12 12 12 11 11 11 11 11 10 10 10 10 9 9 9 9 9 8 8 8 8 7 7 7 7 7 </table>
- + <table name="#ench2MpConsume"> 52 51 50 50 48 47 46 46 45 44 43 42 41 40 39 38 38 37 36 35 34 33 32 31 30 30 29 28 27 26 </table>
- + <table name="#ench1time"> 1240 1280 1320 1360 1400 1440 1480 1520 1560 1600 1640 1680 1720 1760 1800 1840 1880 1920 1960 2000 2040 2080 2120 2160 2200 2240 2280 2320 2360 2400 </table>
- + <table name="#mpInitialConsume"> 8 9 10 10 12 13 </table>
- + <table name="#mpConsume"> 31 35 38 42 48 54 </table>
- <table name="#maxHp"> 1.1 1.15 1.2 1.25 1.3 1.35 </table>
- <table name="#stackOrder"> 1 2 3 4 5 6 </table>
- <table name="#aggro"> 418 457 495 532 597 646 </table>
- @@ -862,11 +866,20 @@
- <set name="castRange" val="400"/>
- <set name="effectRange" val="900"/>
- <set name="aggroPoints" val="#aggro"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="mpConsume" val="#ench2MpConsume"/>
- + <enchant2 name="mpInitialConsume" val="#ench2mpInitialConsume"/>
- <for>
- <effect name="Buff" time="1200" val="0" stackOrder="#stackOrder" stackType="max_hp_up">
- <mul order="0x30" stat="maxHp" val="#maxHp"/>
- </effect>
- </for>
- + <enchant1for>
- + <effect name="Buff" time="#ench1time" val="0" stackOrder="6" stackType="max_hp_up">
- + <mul order="0x30" stat="maxHp" val="1.35"/>
- + </effect>
- + </enchant1for>
- </skill>
- <skill id="1047" levels="4" name="Mana Regeneration">
- <table name="#regMp"> 1.72 2.16 2.74 3.09 </table>
- @@ -892,9 +905,13 @@
- </effect>
- </for>
- </skill>
- - <skill id="1048" levels="6" name="Blessed Soul">
- - <table name="#mpInitialConsume"> 8 9 10 11 12 13 </table>
- - <table name="#mpConsume"> 31 35 38 41 46 52 </table>
- + <skill id="1048" levels="6" name="Blessed Soul" enchantLevels1="30" enchantLevels2="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 83 83 83 84 84 84 85 85 85 </table>
- + <table name="#ench2mpInitialConsume"> 13 12 12 12 12 11 11 11 11 11 10 10 10 10 10 9 9 9 9 8 8 8 8 8 7 7 7 7 6 6 </table>
- + <table name="#ench2MpConsume"> 50 50 49 48 46 46 45 45 44 42 42 41 40 38 38 38 37 36 34 34 33 32 32 30 30 29 28 26 26 26 </table>
- + <table name="#ench1time"> 1240 1280 1320 1360 1400 1440 1480 1520 1560 1600 1640 1680 1720 1760 1800 1840 1880 1920 1960 2000 2040 2080 2120 2160 2200 2240 2280 2320 2360 2400 </table>
- + <table name="#mpInitialConsume"> 8 9 10 10 12 13 </table>
- + <table name="#mpConsume"> 31 35 38 42 46 52 </table>
- <table name="#maxMp"> 1.1 1.15 1.2 1.25 1.3 1.35 </table>
- <table name="#mpConsume"> 39 44 48 52 62 70 </table>
- <table name="#stackOrder"> 1 2 3 4 5 6 </table>
- @@ -910,11 +927,20 @@
- <set name="castRange" val="400"/>
- <set name="effectRange" val="900"/>
- <set name="aggroPoints" val="#aggro"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="mpConsume" val="#ench2MpConsume"/>
- + <enchant2 name="mpInitialConsume" val="#ench2mpInitialConsume"/>
- <for>
- <effect name="Buff" time="1200" val="0" stackOrder="#stackOrder" stackType="max_mp_up">
- <mul order="0x30" stat="maxMp" val="#maxMp"/>
- </effect>
- </for>
- + <enchant1for>
- + <effect name="Buff" time="#ench1time" val="0" stackOrder="6" stackType="max_mp_up">
- + <mul order="0x30" stat="maxMp" val="1.35"/>
- + </effect>
- + </enchant1for>
- </skill>
- <skill id="1049" levels="14" name="Requiem">
- <table name="#mpInitialConsume"> 11 12 13 14 16 16 17 18 18 19 19 20 20 21 </table>
- @@ -1567,7 +1593,7 @@
- <set name="castRange" val="600"/>
- <set name="effectRange" val="1100"/>
- <for>
- - <effect count="5" name="Fear" time="6" val="0" stackOrder="1" stackType="turn_flee"/>
- + <effect name="Fear" time="30" val="0" stackOrder="1" stackType="turn_flee"/>
- </for>
- </skill>
- <skill id="1095" levels="5" name="Venom">
- Index: aCis_datapack/data/xml/skills/1100-1199.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/1100-1199.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/1100-1199.xml (working copy)
- @@ -874,7 +874,7 @@
- <set name="castRange" val="600"/>
- <set name="effectRange" val="1100"/>
- <for>
- - <effect count="5" name="Fear" time="6" val="0" stackOrder="1" stackType="turn_flee" />
- + <effect name="Fear" time="30" val="0" stackOrder="1" stackType="turn_flee" />
- </for>
- </skill>
- <skill id="1170" levels="13" name="Anchor" enchantLevels1="30" enchantLevels2="30" >
- Index: aCis_datapack/data/xml/skills/1200-1299.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/1200-1299.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/1200-1299.xml (working copy)
- @@ -1374,10 +1374,10 @@
- <enchant2 name="mpConsume" val="#ench2MpConsume"/>
- <enchant2 name="mpInitialConsume" val="#ench2mpInitialConsume"/>
- <for>
- - <effect time="15" name="HealOverTime" val="#hot" stackOrder="#stackOrder" stackType="life_force_orc"/>
- + <effect count="15" name="HealOverTime" val="#hot" stackOrder="#stackOrder" stackType="life_force_orc"/>
- </for>
- <enchant1for>
- - <effect time="15" name="HealOverTime" val="#ench1hot" stackOrder="#ench1stackOrder" stackType="life_force_orc"/>
- + <effect count="15" name="HealOverTime" val="#ench1hot" stackOrder="#ench1stackOrder" stackType="life_force_orc"/>
- </enchant1for>
- </skill>
- <skill id="1257" levels="3" name="Decrease Weight" enchantLevels1="30" enchantLevels2="30" >
- Index: aCis_datapack/data/xml/skills/1300-1399.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/1300-1399.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/1300-1399.xml (working copy)
- @@ -1573,7 +1573,10 @@
- <effect name="Betray" time="30" val="0" stackOrder="1" stackType="derangement" />
- </for>
- </skill>
- - <skill id="1381" levels="5" name="Mass Fear">
- + <skill id="1381" levels="5" name="Mass Fear" enchantLevels1="30" enchantLevels2="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85 </table>
- + <table name="#ench2Power"> 20 21 22 22 23 24 24 25 26 26 27 28 28 29 30 30 31 32 32 33 34 34 35 36 36 37 38 38 39 40 </table>
- + <table name="#ench1MpConsume"> 100 98 97 96 95 93 91 90 88 87 86 85 83 82 81 80 78 77 75 73 72 71 70 68 67 66 65 63 62 60 </table>
- <table name="#magicLvl"> 58 62 66 70 74 </table>
- <table name="#mpConsume"> 80 87 93 98 103 </table>
- <set name="magicLvl" val="#magicLvl" />
- @@ -1585,16 +1588,23 @@
- <set name="skillRadius" val="200"/>
- <set name="skillType" val="FEAR"/>
- <set name="operateType" val="OP_ACTIVE"/>
- - <set name="power" val="30" /> <!-- Base Land Rate -->
- + <set name="power" val="20" /> <!-- Base Land Rate -->
- <set name="castRange" val="500"/>
- <set name="effectRange" val="1000"/>
- <set name="isMagic" val="true"/>
- <set name="isDebuff" val="true" />
- + <enchant1 name="mpConsume" val="#ench1MpConsume"/>
- + <enchant2 name="power" val="#ench2Power"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="magicLvl" val="#enchantMagicLvl"/>
- <for>
- - <effect count="5" name="Fear" time="6" val="0" stackOrder="1" stackType="turn_flee" />
- + <effect name="Fear" time="30" val="0" stackOrder="1" stackType="turn_flee" />
- </for>
- </skill>
- - <skill id="1382" levels="5" name="Mass Gloom">
- + <skill id="1382" levels="5" name="Mass Gloom" enchantLevels1="30" enchantLevels2="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85 </table>
- + <table name="#ench2Power"> 40 41 42 42 43 44 44 45 46 46 47 48 48 49 50 50 51 52 52 53 54 54 55 56 56 57 58 58 59 60 </table>
- + <table name="#ench1MpConsume"> 100 98 97 96 95 93 91 90 88 87 86 85 83 82 81 80 78 77 75 73 72 71 70 68 67 66 65 63 62 60 </table>
- <table name="#magicLvl"> 58 62 66 70 74 </table>
- <table name="#mpConsume"> 80 87 93 98 103 </table>
- <table name="#itemConsumeCount"> 4 4 4 5 5 </table>
- @@ -1614,6 +1624,10 @@
- <set name="power" val="40" /> <!-- Base Land Rate -->
- <set name="castRange" val="900"/>
- <set name="effectRange" val="1400"/>
- + <enchant1 name="mpConsume" val="#ench1MpConsume"/>
- + <enchant2 name="power" val="#ench2Power"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="magicLvl" val="#enchantMagicLvl"/>
- <for>
- <effect name="Debuff" time="15" val="0" stackOrder="3" stackType="md_down">
- <mul order="0x30" stat="mDef" val="0.77" />
- @@ -1865,7 +1879,10 @@
- </effect>
- </for>
- </skill>
- - <skill id="1394" levels="10" name="Trance">
- + <skill id="1394" levels="10" name="Trance" enchantLevels1="30" enchantLevels2="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85 </table>
- + <table name="#ench2Power"> 80 81 82 82 83 84 84 85 86 86 87 88 88 89 90 90 91 92 92 93 94 94 95 96 96 97 98 98 99 100 </table>
- + <table name="#ench1MpConsume"> 32 32 32 31 31 31 30 30 28 28 28 27 27 27 26 26 26 25 25 23 23 23 22 22 22 21 21 21 20 20 </table>
- <table name="#magicLvl"> 56 58 60 62 64 66 68 70 72 74 </table>
- <table name="#mpConsume"> 27 28 28 29 30 32 33 33 34 35 </table>
- <set name="magicLvl" val="#magicLvl" />
- @@ -1881,11 +1898,17 @@
- <set name="effectRange" val="1100"/>
- <set name="isMagic" val="true"/>
- <set name="isDebuff" val="true" />
- + <enchant1 name="mpConsume" val="#ench1MpConsume"/>
- + <enchant2 name="power" val="#ench2Power"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="magicLvl" val="#enchantMagicLvl"/>
- <for>
- <effect name="Sleep" time="15" val="0" stackOrder="1" stackType="sleep" />
- </for>
- </skill>
- - <skill id="1395" levels="10" name="Erase">
- + <skill id="1395" levels="10" name="Erase" enchantLevels1="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85 </table>
- + <table name="#ench1MpConsume"> 66 65 65 63 62 62 61 60 58 58 57 56 55 55 53 52 52 51 50 48 48 47 46 45 45 43 42 42 41 40 </table>
- <table name="#mpConsume"> 52 54 55 58 60 62 64 65 67 69 </table>
- <table name="#itemConsumeCount"> 3 3 3 3 4 4 4 5 5 5 </table>
- <table name="#magicLvl"> 56 58 60 62 64 66 68 70 72 74 </table>
- @@ -1901,8 +1924,13 @@
- <set name="power" val="100" /> <!-- Base Land Rate -->
- <set name="castRange" val="600"/>
- <set name="isMagic" val="true"/>
- + <enchant1 name="mpConsume" val="#ench1MpConsume"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- </skill>
- - <skill id="1396" levels="10" name="Magical Backfire">
- + <skill id="1396" levels="10" name="Magical Backfire" enchantLevels1="30" enchantLevels2="30" >
- + <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85 </table>
- + <table name="#ench2Power"> 80 81 82 82 83 84 84 85 86 86 87 88 88 89 90 90 91 92 92 93 94 94 95 96 96 97 98 98 99 100 </table>
- + <table name="#ench1MpConsume"> 66 65 65 63 62 62 61 60 58 58 57 56 55 55 53 52 52 51 50 48 48 47 46 45 45 43 42 42 41 40 </table>
- <table name="#mpConsume"> 52 54 55 58 60 62 64 65 67 69 </table>
- <table name="#magicLvl"> 56 58 60 62 64 66 68 70 72 74 </table>
- <set name="magicLvl" val="#magicLvl" />
- @@ -1918,6 +1946,10 @@
- <set name="castRange" val="600"/>
- <set name="effectRange" val="1100"/>
- <set name="isMagic" val="true"/>
- + <enchant1 name="mpConsume" val="#ench1MpConsume"/>
- + <enchant2 name="power" val="#ench2Power"/>
- + <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
- + <enchant2 name="magicLvl" val="#enchantMagicLvl"/>
- <for>
- <effect name="Debuff" time="30" val="0" stackOrder="3" stackType="mp_cost_up">
- <mul order="0x30" stat="MagicalMpConsumeRate" val="3" />
- Index: aCis_datapack/data/xml/skills/1400-1499.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/1400-1499.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/1400-1499.xml (working copy)
- @@ -208,18 +208,18 @@
- </skill>
- <skill id="1411" levels="1" name="Mystic Immunity">
- <set name="castRange" val="400"/>
- - <set name="effectRange" val="900"/>
- + <set name="effectRange" val="600"/>
- <set name="hitTime" val="4000"/>
- <set name="isMagic" val="true"/>
- <set name="magicLvl" val="79"/>
- <set name="mpConsume" val="73"/>
- <set name="operateType" val="OP_ACTIVE"/>
- - <set name="reuseDelay" val="600000"/>
- + <set name="reuseDelay" val="120000"/>
- <set name="skillType" val="BUFF"/>
- - <set name="target" val="TARGET_ONE"/>
- + <set name="target" val="TARGET_PARTY_MEMBER"/>
- <for>
- - <effect name="BlockBuff" time="30" val="0" stackOrder="3" stackType="abnormal_buff_invincibility" />
- - <effect name="BlockDebuff" time="30" noicon="1" val="0" stackOrder="3" stackType="abnormal_debuff_invincibility" />
- + <effect name="BlockBuff" time="30" val="0" stackOrder="2" stackType="abnormal_buff_invincibility" />
- + <effect name="BlockDebuff" time="30" noicon="1" val="0" stackOrder="2" stackType="abnormal_debuff_invincibility" />
- </for>
- </skill>
- <skill id="1412" levels="1" name="Spell Turning">
- @@ -323,16 +323,16 @@
- <set name="mpConsume" val="228" />
- <set name="itemConsumeId" val="3031"/>
- <set name="itemConsumeCount" val="20"/>
- - <set name="power" val="100"/>
- + <set name="power" val="800"/>
- <set name="target" val="TARGET_ALLY"/>
- <set name="skillRadius" val="1000"/>
- <set name="reuseDelay" val="1200000"/>
- <set name="hitTime" val="2500"/>
- - <set name="skillType" val="CPHEAL_PERCENT" />
- + <set name="skillType" val="COMBATPOINTHEAL" />
- <set name="isMagic" val="true"/>
- <set name="operateType" val="OP_ACTIVE"/>
- <for>
- - <effect name="Buff" time="300" val="0" stackOrder="2" stackType="cp_up">
- + <effect name="Buff" time="300" val="0" stackOrder="1" stackType="cp_up">
- <add order="0x40" stat="maxCp" val="800" />
- </effect>
- </for>
- Index: aCis_datapack/data/xml/skills/3100-3199.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/3100-3199.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/3100-3199.xml (working copy)
- @@ -343,23 +343,23 @@
- </for>
- </skill>
- <skill id="3125" levels="10" name="Item Skill: Battle Roar">
- - <table name="#mpInitialConsume"> 10 11 11 12 13 13 14 15 16 17 </table>
- - <table name="#mpConsume"> 38 42 44 47 51 52 55 58 61 65 </table>
- - <table name="#magicLvl"> 46 49 52 55 58 61 64 67 70 75 </table>
- + <table name="#mpConsume"> 48 53 55 59 64 65 69 73 77 82 </table>
- + <table name="#magicLvl"> 40 44 48 52 56 60 64 68 72 76 </table>
- + <table name="#stackOrder"> 1 2 3 4 5 6 7 8 9 10 </table>
- + <table name="#maxHp"> 30 60 90 120 150 180 210 240 270 300 </table>
- <set name="magicLvl" val="#magicLvl" />
- - <set name="mpInitialConsume" val="#mpInitialConsume" />
- <set name="mpConsume" val="#mpConsume" />
- - <set name="power" val="3" />
- + <set name="power" val="#maxHp" />
- <set name="target" val="TARGET_SELF" />
- - <set name="reuseDelay" val="300000" />
- + <set name="reuseDelay" val="180000" />
- <set name="staticReuse" val="true" />
- - <set name="hitTime" val="4000" />
- + <set name="hitTime" val="1500" />
- <set name="skillType" val="HEAL_PERCENT" />
- <set name="operateType" val="OP_ACTIVE" />
- <set name="staticHitTime" val="true" />
- <for>
- - <effect name="Buff" time="120" val="0" stackOrder="1" stackType="abnormal_item">
- - <mul order="0x40" stat="maxHp" val="1.03" />
- + <effect name="Buff" time="120" val="0" stackOrder="#stackOrder" stackType="abnormal_item" >
- + <add order="0x40" stat="maxHp" val="#maxHp" />
- </effect>
- </for>
- </skill>
- Index: aCis_datapack/data/xml/skills/3500-3599.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/3500-3599.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/3500-3599.xml (working copy)
- @@ -898,6 +898,7 @@
- <for>
- <mul order="0x30" stat="maxHp" val="1.25"/> <!-- HP +25% -->
- <mul order="0x30" stat="maxMp" val="1.30"/> <!-- MP +30% -->
- + <mul order="0x30" stat="maxCp" val="1.5"/> <!-- CP +50% -->
- <mul order="0x30" stat="rShld" val="1.39"/> <!-- Shield Block Rate +39% -->
- <mul order="0x30" stat="pvpPhysDmg" val="1.05"/> <!-- PVP Damage Bonus +5% -->
- <mul order="0x30" stat="pvpMagicalDmg" val="1.05"/> <!-- PVP Damage Bonus +5% -->
- Index: aCis_datapack/data/xml/skills/5000-5099.xml
- ===================================================================
- --- aCis_datapack/data/xml/skills/5000-5099.xml (revision 2)
- +++ aCis_datapack/data/xml/skills/5000-5099.xml (working copy)
- @@ -1249,29 +1249,32 @@
- <set name="magicLvl" val="80" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="power" val="2112" />
- - <set name="target" val="TARGET_AURA" />
- + <set name="target" val="TARGET_ONE" />
- <set name="skillRadius" val="150" />
- <set name="hitTime" val="1500" />
- <set name="coolTime" val="800" />
- + <set name="reuseDelay" val="6000"/>
- <set name="skillType" val="PDAM" />
- <set name="operateType" val="OP_ACTIVE" />
- </skill>
- <skill id="5083" levels="4" name="Shock">
- <table name="#mpConsume"> 93 93 93 5 </table>
- - <set name="magicLvl" val="80" />
- + <table name="#magicLvl"> 80 82 84 86 </table>
- + <set name="magicLvl" val="#magicLvl" />
- <set name="lvlDepend" val="1" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="power" val="1704" />
- <set name="target" val="TARGET_ONE" />
- <set name="hitTime" val="1500" />
- - <set name="coolTime" val="800" />
- + <set name="reuseDelay" val="6000"/>
- <set name="skillType" val="PDAM" />
- <set name="operateType" val="OP_ACTIVE" />
- <set name="isDebuff" val="true" />
- <set name="castRange" val="40" />
- <set name="effectRange" val="200" />
- <for>
- - <effect name="Stun" time="9" val="0" effectPower="50" effectType="STUN" stackOrder="1" stackType="stun" />
- + <effect name="Stun" time="9" val="0" effectPower="80" effectType="STUN" stackOrder="1" stackType="stun" />
- + <effect name="RemoveTarget" noicon="1" val="0"/>
- </for>
- </skill>
- <skill id="5084" levels="4" name="NPC Blinding Blow">
- @@ -1286,7 +1289,7 @@
- <set name="skillType" val="BLOW" />
- <set name="operateType" val="OP_ACTIVE" />
- <set name="castRange" val="40" />
- - <set name="effectRange" val="200" />
- + <set name="effectRange" val="60" />
- <for>
- <effect self="1" name="Buff" time="15" val="0" stackOrder="1" stackType="speed_up_special">
- <add order="0x40" stat="runSpd" val="40" />
- @@ -1308,6 +1311,7 @@
- <set name="effectRange" val="900"/>
- <for>
- <effect count="1" name="Stun" time="9" val="0" stackOrder="1" stackType="Stun" effectPower="50" effectType="STUN"/>
- + <effect name="RemoveTarget" noicon="1" val="0" effectPower="50" effectType="DEBUFF"/>
- </for>
- </skill>
- <skill id="5086" levels="1" name="Deadly Poison">
- Index: aCis_datapack/data/xml/skillstrees/enchant_skills_tree.xml
- ===================================================================
- --- aCis_datapack/data/xml/skillstrees/enchant_skills_tree.xml (revision 2)
- +++ aCis_datapack/data/xml/skillstrees/enchant_skills_tree.xml (working copy)
- @@ -14941,6 +14941,134 @@
- <data level="130" type="+30 Summon" enchant="30" />
- </enchant>
- + <!-- Mass Fear -->
- + <enchant id="1381" name="Mass Fear" baseLvl="5">
- + <data level="101" type="+1 Cost" enchant="1" />
- + <data level="102" type="+2 Cost" enchant="2" />
- + <data level="103" type="+3 Cost" enchant="3" />
- + <data level="104" type="+4 Cost" enchant="4" />
- + <data level="105" type="+5 Cost" enchant="5" />
- + <data level="106" type="+6 Cost" enchant="6" />
- + <data level="107" type="+7 Cost" enchant="7" />
- + <data level="108" type="+8 Cost" enchant="8" />
- + <data level="109" type="+9 Cost" enchant="9" />
- + <data level="110" type="+10 Cost" enchant="10" />
- + <data level="111" type="+11 Cost" enchant="11" />
- + <data level="112" type="+12 Cost" enchant="12" />
- + <data level="113" type="+13 Cost" enchant="13" />
- + <data level="114" type="+14 Cost" enchant="14" />
- + <data level="115" type="+15 Cost" enchant="15" />
- + <data level="116" type="+16 Cost" enchant="16" />
- + <data level="117" type="+17 Cost" enchant="17" />
- + <data level="118" type="+18 Cost" enchant="18" />
- + <data level="119" type="+19 Cost" enchant="19" />
- + <data level="120" type="+20 Cost" enchant="20" />
- + <data level="121" type="+21 Cost" enchant="21" />
- + <data level="122" type="+22 Cost" enchant="22" />
- + <data level="123" type="+23 Cost" enchant="23" />
- + <data level="124" type="+24 Cost" enchant="24" />
- + <data level="125" type="+25 Cost" enchant="25" />
- + <data level="126" type="+26 Cost" enchant="26" />
- + <data level="127" type="+27 Cost" enchant="27" />
- + <data level="128" type="+28 Cost" enchant="28" />
- + <data level="129" type="+29 Cost" enchant="29" />
- + <data level="130" type="+30 Cost" enchant="30" />
- + <data level="141" type="+1 Chance" enchant="1" />
- + <data level="142" type="+2 Chance" enchant="2" />
- + <data level="143" type="+3 Chance" enchant="3" />
- + <data level="144" type="+4 Chance" enchant="4" />
- + <data level="145" type="+5 Chance" enchant="5" />
- + <data level="146" type="+6 Chance" enchant="6" />
- + <data level="147" type="+7 Chance" enchant="7" />
- + <data level="148" type="+8 Chance" enchant="8" />
- + <data level="149" type="+9 Chance" enchant="9" />
- + <data level="150" type="+10 Chance" enchant="10" />
- + <data level="151" type="+11 Chance" enchant="11" />
- + <data level="152" type="+12 Chance" enchant="12" />
- + <data level="153" type="+13 Chance" enchant="13" />
- + <data level="154" type="+14 Chance" enchant="14" />
- + <data level="155" type="+15 Chance" enchant="15" />
- + <data level="156" type="+16 Chance" enchant="16" />
- + <data level="157" type="+17 Chance" enchant="17" />
- + <data level="158" type="+18 Chance" enchant="18" />
- + <data level="159" type="+19 Chance" enchant="19" />
- + <data level="160" type="+20 Chance" enchant="20" />
- + <data level="161" type="+21 Chance" enchant="21" />
- + <data level="162" type="+22 Chance" enchant="22" />
- + <data level="163" type="+23 Chance" enchant="23" />
- + <data level="164" type="+24 Chance" enchant="24" />
- + <data level="165" type="+25 Chance" enchant="25" />
- + <data level="166" type="+26 Chance" enchant="26" />
- + <data level="167" type="+27 Chance" enchant="27" />
- + <data level="168" type="+28 Chance" enchant="28" />
- + <data level="169" type="+29 Chance" enchant="29" />
- + <data level="170" type="+30 Chance" enchant="30" />
- + </enchant>
- +
- + <!-- Mass Gloom -->
- + <enchant id="1382" name="Mass Gloom" baseLvl="5">
- + <data level="101" type="+1 Cost" enchant="1" />
- + <data level="102" type="+2 Cost" enchant="2" />
- + <data level="103" type="+3 Cost" enchant="3" />
- + <data level="104" type="+4 Cost" enchant="4" />
- + <data level="105" type="+5 Cost" enchant="5" />
- + <data level="106" type="+6 Cost" enchant="6" />
- + <data level="107" type="+7 Cost" enchant="7" />
- + <data level="108" type="+8 Cost" enchant="8" />
- + <data level="109" type="+9 Cost" enchant="9" />
- + <data level="110" type="+10 Cost" enchant="10" />
- + <data level="111" type="+11 Cost" enchant="11" />
- + <data level="112" type="+12 Cost" enchant="12" />
- + <data level="113" type="+13 Cost" enchant="13" />
- + <data level="114" type="+14 Cost" enchant="14" />
- + <data level="115" type="+15 Cost" enchant="15" />
- + <data level="116" type="+16 Cost" enchant="16" />
- + <data level="117" type="+17 Cost" enchant="17" />
- + <data level="118" type="+18 Cost" enchant="18" />
- + <data level="119" type="+19 Cost" enchant="19" />
- + <data level="120" type="+20 Cost" enchant="20" />
- + <data level="121" type="+21 Cost" enchant="21" />
- + <data level="122" type="+22 Cost" enchant="22" />
- + <data level="123" type="+23 Cost" enchant="23" />
- + <data level="124" type="+24 Cost" enchant="24" />
- + <data level="125" type="+25 Cost" enchant="25" />
- + <data level="126" type="+26 Cost" enchant="26" />
- + <data level="127" type="+27 Cost" enchant="27" />
- + <data level="128" type="+28 Cost" enchant="28" />
- + <data level="129" type="+29 Cost" enchant="29" />
- + <data level="130" type="+30 Cost" enchant="30" />
- + <data level="141" type="+1 Chance" enchant="1" />
- + <data level="142" type="+2 Chance" enchant="2" />
- + <data level="143" type="+3 Chance" enchant="3" />
- + <data level="144" type="+4 Chance" enchant="4" />
- + <data level="145" type="+5 Chance" enchant="5" />
- + <data level="146" type="+6 Chance" enchant="6" />
- + <data level="147" type="+7 Chance" enchant="7" />
- + <data level="148" type="+8 Chance" enchant="8" />
- + <data level="149" type="+9 Chance" enchant="9" />
- + <data level="150" type="+10 Chance" enchant="10" />
- + <data level="151" type="+11 Chance" enchant="11" />
- + <data level="152" type="+12 Chance" enchant="12" />
- + <data level="153" type="+13 Chance" enchant="13" />
- + <data level="154" type="+14 Chance" enchant="14" />
- + <data level="155" type="+15 Chance" enchant="15" />
- + <data level="156" type="+16 Chance" enchant="16" />
- + <data level="157" type="+17 Chance" enchant="17" />
- + <data level="158" type="+18 Chance" enchant="18" />
- + <data level="159" type="+19 Chance" enchant="19" />
- + <data level="160" type="+20 Chance" enchant="20" />
- + <data level="161" type="+21 Chance" enchant="21" />
- + <data level="162" type="+22 Chance" enchant="22" />
- + <data level="163" type="+23 Chance" enchant="23" />
- + <data level="164" type="+24 Chance" enchant="24" />
- + <data level="165" type="+25 Chance" enchant="25" />
- + <data level="166" type="+26 Chance" enchant="26" />
- + <data level="167" type="+27 Chance" enchant="27" />
- + <data level="168" type="+28 Chance" enchant="28" />
- + <data level="169" type="+29 Chance" enchant="29" />
- + <data level="170" type="+30 Chance" enchant="30" />
- + </enchant>
- +
- <!-- Trance -->
- <enchant id="1394" name="Trance" baseLvl="10">
- <data level="101" type="+1 Cost" enchant="1" />
- Index: aCis_datapack/sql/mods_wedding.sql
- ===================================================================
- --- aCis_datapack/sql/mods_wedding.sql (revision 2)
- +++ aCis_datapack/sql/mods_wedding.sql (working copy)
- @@ -1,7 +1,6 @@
- CREATE TABLE IF NOT EXISTS `mods_wedding` (
- - `id` int(11) NOT NULL auto_increment,
- - `player1Id` int(11) NOT NULL default '0',
- - `player2Id` int(11) NOT NULL default '0',
- - `married` varchar(5) default NULL,
- - PRIMARY KEY (`id`)
- + `id` INT UNSIGNED NOT NULL DEFAULT 0,
- + `requesterId` INT UNSIGNED NOT NULL DEFAULT 0,
- + `partnerId` INT UNSIGNED NOT NULL DEFAULT 0,
- + PRIMARY KEY (`id`)
- );
- \ No newline at end of file
- Index: aCis_gameserver/config/npcs.properties
- ===================================================================
- --- aCis_gameserver/config/npcs.properties (revision 2)
- +++ aCis_gameserver/config/npcs.properties (working copy)
- @@ -252,15 +252,4 @@
- MinNPCAnimation = 20
- MaxNPCAnimation = 40
- MinMonsterAnimation = 10
- -MaxMonsterAnimation = 40
- -
- -# Grid options: Grids can now turn themselves on and off. This also affects the loading
- -# and processing of all AI tasks and (in the future) geodata within this grid.
- -# Turn on for a grid with a person in it is immediate, but it then turns on
- -# the 8 neighboring grids based on the specified number of seconds.
- -# Turn off for self and neighbors occures after the specified number of
- -# seconds have passed during which a grid has had no players in or in any of its neighbors.
- -# The always on option allows to ignore all this and let all grids be active at all times
- -GridsAlwaysOn = False
- -GridNeighborTurnOnTime = 1
- -GridNeighborTurnOffTime = 90
- \ No newline at end of file
- +MaxMonsterAnimation = 40
- \ No newline at end of file
- Index: aCis_gameserver/dist/LoginServer_loop.sh
- ===================================================================
- --- aCis_gameserver/dist/LoginServer_loop.sh (revision 2)
- +++ aCis_gameserver/dist/LoginServer_loop.sh (working copy)
- @@ -5,7 +5,7 @@
- do
- [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
- [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
- - nice -n -2 java -Xmx512m -cp ./libs/*:l2jserver.jar net.sf.l2j.loginserver.L2LoginServer > log/stdout.log 2>&1
- + nice -n -2 java -Xmx32m -cp ./libs/*:l2jserver.jar net.sf.l2j.loginserver.L2LoginServer > log/stdout.log 2>&1
- err=$?
- # /etc/init.d/mysql restart
- sleep 10;
- Index: aCis_gameserver/dist/startLoginServer.bat
- ===================================================================
- --- aCis_gameserver/dist/startLoginServer.bat (revision 2)
- +++ aCis_gameserver/dist/startLoginServer.bat (working copy)
- @@ -1,7 +1,7 @@
- @echo off
- title aCis loginserver console
- :start
- -java -Xmx128m -cp ./libs/*; net.sf.l2j.loginserver.L2LoginServer
- +java -Xmx32m -cp ./libs/*; net.sf.l2j.loginserver.L2LoginServer
- if ERRORLEVEL 2 goto restart
- if ERRORLEVEL 1 goto error
- goto end
- Index: aCis_gameserver/java/net/sf/l2j/Config.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/Config.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/Config.java (working copy)
- @@ -371,10 +371,6 @@
- public static int MIN_MONSTER_ANIMATION;
- public static int MAX_MONSTER_ANIMATION;
- - public static boolean GRIDS_ALWAYS_ON;
- - public static int GRID_NEIGHBOR_TURNON_TIME;
- - public static int GRID_NEIGHBOR_TURNOFF_TIME;
- -
- // --------------------------------------------------
- // Players
- // --------------------------------------------------
- @@ -1075,10 +1071,6 @@
- MAX_NPC_ANIMATION = npcs.getProperty("MaxNPCAnimation", 40);
- MIN_MONSTER_ANIMATION = npcs.getProperty("MinMonsterAnimation", 10);
- MAX_MONSTER_ANIMATION = npcs.getProperty("MaxMonsterAnimation", 40);
- -
- - GRIDS_ALWAYS_ON = npcs.getProperty("GridsAlwaysOn", false);
- - GRID_NEIGHBOR_TURNON_TIME = npcs.getProperty("GridNeighborTurnOnTime", 1);
- - GRID_NEIGHBOR_TURNOFF_TIME = npcs.getProperty("GridNeighborTurnOffTime", 90);
- }
- /**
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/CtrlEvent.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/CtrlEvent.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/CtrlEvent.java (working copy)
- @@ -43,8 +43,6 @@
- EVT_ARRIVED,
- /** The actor cannot move anymore. */
- EVT_ARRIVED_BLOCKED,
- - /** Forgets an object (if it's used as attack target, follow target and so on. */
- - EVT_FORGET_OBJECT,
- /**
- * Attempt to cancel current step execution, but not change the intention. For example, the actor was put into a stun, so it's current attack or movement has to be canceled. But after the stun state expired, the actor may try to attack again. Another usage for CANCEL is a user's attempt to
- * cancel a cast/bow attack and so on.
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/AbstractAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/AbstractAI.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/AbstractAI.java (working copy)
- @@ -283,9 +283,6 @@
- case EVT_ARRIVED_BLOCKED:
- onEvtArrivedBlocked((SpawnLocation) arg0);
- break;
- - case EVT_FORGET_OBJECT:
- - onEvtForgetObject((L2Object) arg0);
- - break;
- case EVT_CANCEL:
- onEvtCancel();
- break;
- @@ -354,8 +351,6 @@
- protected abstract void onEvtArrivedBlocked(SpawnLocation loc);
- - protected abstract void onEvtForgetObject(L2Object object);
- -
- protected abstract void onEvtCancel();
- protected abstract void onEvtDead();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2AttackableAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2AttackableAI.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2AttackableAI.java (working copy)
- @@ -242,7 +242,7 @@
- if (!npc.isAlikeDead())
- {
- // If its _knownPlayer isn't empty set the Intention to ACTIVE
- - if (!npc.getKnownList().getKnownType(L2PcInstance.class).isEmpty())
- + if (!npc.getKnownType(L2PcInstance.class).isEmpty())
- intention = CtrlIntention.ACTIVE;
- else
- {
- @@ -342,7 +342,7 @@
- if (_globalAggro >= 0)
- {
- // Get all visible objects inside its Aggro Range
- - for (L2Character target : npc.getKnownList().getKnownType(L2Character.class))
- + for (L2Character target : npc.getKnownType(L2Character.class))
- {
- // Check to see if this is a festival mob spawn. If it is, then check to see if the aggro trigger is a festival participant...if so, move to attack it.
- if (npc instanceof L2FestivalMonsterInstance && target instanceof L2PcInstance)
- @@ -425,7 +425,7 @@
- else
- {
- // Return to home if too far.
- - if (npc.returnHome())
- + if (npc.returnHome(false))
- return;
- // Random walk otherwise.
- @@ -618,7 +618,7 @@
- if (sk.getTargetType() == SkillTargetType.TARGET_ONE)
- {
- final String[] actorClans = npc.getTemplate().getClans();
- - for (L2Attackable obj : npc.getKnownList().getKnownTypeInRadius(L2Attackable.class, sk.getCastRange() + actorCollision))
- + for (L2Attackable obj : npc.getKnownTypeInRadius(L2Attackable.class, sk.getCastRange() + actorCollision))
- {
- if (obj.isDead())
- continue;
- @@ -741,9 +741,9 @@
- if (Rnd.get(100) <= 3)
- {
- - for (L2Object nearby : npc.getKnownList().getKnownObjects())
- + for (L2Attackable nearby : npc.getKnownTypeInRadius(L2Attackable.class, actorCollision))
- {
- - if (nearby instanceof L2Attackable && npc.isInsideRadius(nearby, actorCollision, false, false) && nearby != attackTarget)
- + if (nearby != attackTarget)
- {
- int newX = combinedCollision + Rnd.get(40);
- if (Rnd.nextBoolean())
- @@ -903,7 +903,7 @@
- if (sk.getTargetType() == SkillTargetType.TARGET_ONE)
- {
- - for (L2Attackable obj : caster.getKnownList().getKnownTypeInRadius(L2Attackable.class, (int) (sk.getCastRange() + caster.getCollisionRadius())))
- + for (L2Attackable obj : caster.getKnownTypeInRadius(L2Attackable.class, (int) (sk.getCastRange() + caster.getCollisionRadius())))
- {
- if (obj.isDead())
- continue;
- @@ -927,7 +927,7 @@
- if (sk.getTargetType() == SkillTargetType.TARGET_PARTY)
- {
- - for (L2Attackable obj : caster.getKnownList().getKnownTypeInRadius(L2Attackable.class, (int) (sk.getSkillRadius() + caster.getCollisionRadius())))
- + for (L2Attackable obj : caster.getKnownTypeInRadius(L2Attackable.class, (int) (sk.getSkillRadius() + caster.getCollisionRadius())))
- {
- if (!ArraysUtil.contains(caster.getTemplate().getClans(), obj.getTemplate().getClans()))
- continue;
- @@ -1286,7 +1286,7 @@
- // If hate list gave nothing, then verify first if the actor is aggressive, and then pickup a victim from his knownlist.
- if (actor.isAggressive())
- {
- - for (L2Character target : actor.getKnownList().getKnownTypeInRadius(L2Character.class, actor.getTemplate().getAggroRange()))
- + for (L2Character target : actor.getKnownTypeInRadius(L2Character.class, actor.getTemplate().getAggroRange()))
- {
- if (!autoAttackCondition(target))
- continue;
- @@ -1426,7 +1426,7 @@
- final String[] actorClans = me.getTemplate().getClans();
- if (actorClans != null && me.getAttackByList().contains(attacker))
- {
- - for (L2Attackable called : me.getKnownList().getKnownTypeInRadius(L2Attackable.class, me.getTemplate().getClanRange()))
- + for (L2Attackable called : me.getKnownTypeInRadius(L2Attackable.class, me.getTemplate().getClanRange()))
- {
- // Caller hasn't AI or is dead.
- if (!called.hasAI() || called.isDead())
- @@ -1515,7 +1515,7 @@
- final String[] actorClans = me.getTemplate().getClans();
- if (actorClans != null && me.getAttackByList().contains(target))
- {
- - for (L2Attackable called : me.getKnownList().getKnownTypeInRadius(L2Attackable.class, me.getTemplate().getClanRange()))
- + for (L2Attackable called : me.getKnownTypeInRadius(L2Attackable.class, me.getTemplate().getClanRange()))
- {
- // Caller hasn't AI or is dead.
- if (!called.hasAI() || called.isDead())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2CharacterAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2CharacterAI.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2CharacterAI.java (working copy)
- @@ -619,59 +619,6 @@
- }
- /**
- - * Launch actions corresponding to the Event ForgetObject.
- - * <ul>
- - * <li>If the object was targeted and the Intention was INTERACT or PICK_UP, set the Intention to ACTIVE</li>
- - * <li>If the object was targeted to attack, stop the auto-attack, cancel target and set the Intention to ACTIVE</li>
- - * <li>If the object was targeted to cast, cancel target and set the Intention to ACTIVE</li>
- - * <li>If the object was targeted to follow, stop the movement, cancel AI Follow Task and set the Intention to ACTIVE</li>
- - * <li>If the targeted object was the actor , cancel AI target, stop AI Follow Task, stop the movement and set the Intention to IDLE</li>
- - * </ul>
- - */
- - @Override
- - protected void onEvtForgetObject(L2Object object)
- - {
- - // Check if the object was targeted to attack
- - if (getTarget() == object)
- - {
- - // Cancel attack target
- - setTarget(null);
- -
- - // Set the Intention of this AbstractAI to ACTIVE
- - setIntention(CtrlIntention.ACTIVE);
- - }
- -
- - // Check if the object was targeted to follow
- - if (getFollowTarget() == object)
- - {
- - // Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)
- - clientStopMoving(null);
- -
- - // Stop an AI Follow Task
- - stopFollow();
- -
- - // Set the Intention of this AbstractAI to ACTIVE
- - setIntention(CtrlIntention.ACTIVE);
- - }
- -
- - // Check if the targeted object was the actor
- - if (_actor == object)
- - {
- - // Cancel AI target
- - setTarget(null);
- -
- - // Stop an AI Follow Task
- - stopFollow();
- -
- - // Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)
- - clientStopMoving(null);
- -
- - // Set the Intention of this AbstractAI to IDLE
- - changeIntention(CtrlIntention.IDLE, null, null);
- - }
- - }
- -
- - /**
- * Launch actions corresponding to the Event Cancel.
- * <ul>
- * <li>Stop an AI Follow Task</li>
- @@ -918,7 +865,7 @@
- {
- if (sk.getTargetType() == L2Skill.SkillTargetType.TARGET_AURA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_BEHIND_AURA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_FRONT_AURA)
- {
- - for (L2Object target : _actor.getKnownList().getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- + for (L2Object target : _actor.getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- {
- if (target == getTarget())
- return true;
- @@ -934,7 +881,7 @@
- if (sk.getTargetType() == L2Skill.SkillTargetType.TARGET_AURA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_BEHIND_AURA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_FRONT_AURA)
- {
- boolean cancast = true;
- - for (L2Character target : _actor.getKnownList().getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- + for (L2Character target : _actor.getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- {
- if (!GeoEngine.getInstance().canSeeTarget(_actor, target))
- continue;
- @@ -952,7 +899,7 @@
- else if (sk.getTargetType() == L2Skill.SkillTargetType.TARGET_AREA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_BEHIND_AREA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_FRONT_AREA)
- {
- boolean cancast = true;
- - for (L2Character target : ((L2Character) getTarget()).getKnownList().getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- + for (L2Character target : ((L2Character) getTarget()).getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- {
- if (!GeoEngine.getInstance().canSeeTarget(_actor, target))
- continue;
- @@ -973,7 +920,7 @@
- if (sk.getTargetType() == L2Skill.SkillTargetType.TARGET_AURA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_BEHIND_AURA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_FRONT_AURA)
- {
- boolean cancast = false;
- - for (L2Character target : _actor.getKnownList().getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- + for (L2Character target : _actor.getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- {
- if (!GeoEngine.getInstance().canSeeTarget(_actor, target))
- continue;
- @@ -991,7 +938,7 @@
- else if (sk.getTargetType() == L2Skill.SkillTargetType.TARGET_AREA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_BEHIND_AREA || sk.getTargetType() == L2Skill.SkillTargetType.TARGET_FRONT_AREA)
- {
- boolean cancast = true;
- - for (L2Character target : ((L2Character) getTarget()).getKnownList().getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- + for (L2Character target : ((L2Character) getTarget()).getKnownTypeInRadius(L2Character.class, sk.getSkillRadius()))
- {
- if (!GeoEngine.getInstance().canSeeTarget(_actor, target))
- continue;
- @@ -1019,7 +966,7 @@
- int ccount = 0;
- final String[] actorClans = ((L2Npc) _actor).getTemplate().getClans();
- - for (L2Attackable target : _actor.getKnownList().getKnownTypeInRadius(L2Attackable.class, sk.getSkillRadius()))
- + for (L2Attackable target : _actor.getKnownTypeInRadius(L2Attackable.class, sk.getSkillRadius()))
- {
- if (!GeoEngine.getInstance().canSeeTarget(_actor, target))
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2DoorAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2DoorAI.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2DoorAI.java (working copy)
- @@ -129,11 +129,6 @@
- }
- @Override
- - protected void onEvtForgetObject(L2Object object)
- - {
- - }
- -
- - @Override
- protected void onEvtCancel()
- {
- }
- @@ -157,7 +152,7 @@
- @Override
- public void run()
- {
- - for (L2SiegeGuardInstance guard : _door.getKnownList().getKnownType(L2SiegeGuardInstance.class))
- + for (L2SiegeGuardInstance guard : _door.getKnownType(L2SiegeGuardInstance.class))
- {
- if (_actor.isInsideRadius(guard, guard.getTemplate().getClanRange(), false, true) && Math.abs(_attacker.getZ() - guard.getZ()) < 200)
- guard.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, _attacker, 15);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2PlayerAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2PlayerAI.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2PlayerAI.java (working copy)
- @@ -23,7 +23,9 @@
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2StaticObjectInstance;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- +import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- public class L2PlayerAI extends L2PlayableAI
- {
- @@ -247,6 +249,9 @@
- _actor.setIsCastingNow(false);
- return;
- }
- +
- + if (_actor.isSkillDisabled(_skill))
- + _actor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE).addSkillName(_skill));
- }
- if (_skill.getHitTime() > 50 && !_skill.isSimultaneousCast())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2SiegeGuardAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2SiegeGuardAI.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2SiegeGuardAI.java (working copy)
- @@ -22,7 +22,6 @@
- import net.sf.l2j.gameserver.ai.CtrlIntention;
- import net.sf.l2j.gameserver.geoengine.GeoEngine;
- -import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Skill;
- import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- @@ -94,7 +93,7 @@
- if (!_actor.isAlikeDead())
- {
- // If its _knownPlayer isn't empty, set the Intention to ACTIVE
- - if (!getActiveChar().getKnownList().getKnownType(L2PcInstance.class).isEmpty())
- + if (!getActiveChar().getKnownType(L2PcInstance.class).isEmpty())
- intention = CtrlIntention.ACTIVE;
- }
- @@ -149,7 +148,7 @@
- if (_globalAggro >= 0)
- {
- final L2Attackable npc = (L2Attackable) _actor;
- - for (L2Character target : npc.getKnownList().getKnownTypeInRadius(L2Character.class, npc.getTemplate().getClanRange()))
- + for (L2Character target : npc.getKnownTypeInRadius(L2Character.class, npc.getTemplate().getClanRange()))
- {
- if (autoAttackCondition(target)) // check aggression
- {
- @@ -176,7 +175,7 @@
- }
- }
- // Order to the L2SiegeGuardInstance to return to its home location because there's no target to attack
- - getActiveChar().returnHome();
- + getActiveChar().returnHome(true);
- }
- /**
- @@ -201,7 +200,7 @@
- */
- if (!actor.isInsideZone(ZoneId.SIEGE))
- {
- - actor.returnHome();
- + actor.returnHome(true);
- return;
- }
- @@ -264,7 +263,7 @@
- final String[] clans = actor.getTemplate().getClans();
- // Go through all characters around the actor that belongs to its faction.
- - for (L2Character cha : actor.getKnownList().getKnownTypeInRadius(L2Character.class, 1000))
- + for (L2Character cha : actor.getKnownTypeInRadius(L2Character.class, 1000))
- {
- // Don't bother about dead, not visible, or healthy characters.
- if (cha.isAlikeDead() || !GeoEngine.getInstance().canSeeTarget(actor, cha) || (cha.getCurrentHp() / cha.getMaxHp() > 0.75))
- @@ -382,9 +381,9 @@
- if (Rnd.get(100) <= 3)
- {
- - for (L2Object nearby : actor.getKnownList().getKnownObjects())
- + for (L2Attackable nearby : actor.getKnownTypeInRadius(L2Attackable.class, actorCollision))
- {
- - if (nearby instanceof L2Attackable && actor.isInsideRadius(nearby, actorCollision, false, false) && nearby != attackTarget)
- + if (nearby != attackTarget)
- {
- int newX = combinedCollision + Rnd.get(40);
- if (Rnd.nextBoolean())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2VehicleAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2VehicleAI.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2VehicleAI.java (working copy)
- @@ -123,11 +123,6 @@
- }
- @Override
- - protected void onEvtForgetObject(L2Object object)
- - {
- - }
- -
- - @Override
- protected void onEvtCancel()
- {
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/communitybbs/Manager/FriendsBBSManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/communitybbs/Manager/FriendsBBSManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/communitybbs/Manager/FriendsBBSManager.java (working copy)
- @@ -27,7 +27,7 @@
- import net.sf.l2j.gameserver.cache.HtmCache;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- import net.sf.l2j.gameserver.model.BlockList;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.FriendList;
- @@ -87,7 +87,7 @@
- for (int friendId : activeChar.getFriendList())
- {
- - L2PcInstance player = L2World.getInstance().getPlayer(friendId);
- + L2PcInstance player = World.getInstance().getPlayer(friendId);
- if (player != null)
- {
- player.getFriendList().remove(Integer.valueOf(activeChar.getObjectId()));
- @@ -122,7 +122,7 @@
- String name = CharNameTable.getInstance().getPlayerName(friendId);
- - L2PcInstance player = L2World.getInstance().getPlayer(friendId);
- + L2PcInstance player = World.getInstance().getPlayer(friendId);
- if (player != null)
- {
- player.getFriendList().remove(Integer.valueOf(activeChar.getObjectId()));
- @@ -227,7 +227,7 @@
- if (friendName == null)
- continue;
- - final L2PcInstance friend = L2World.getInstance().getPlayer(id);
- + final L2PcInstance friend = World.getInstance().getPlayer(id);
- StringUtil.append(sb, "<a action=\"bypass _friend;select;", id, "\">[Select]</a> ", friendName, " ", ((friend != null && friend.isOnline()) ? "(on)" : "(off)"), "<br1>");
- }
- content = content.replaceAll("%friendslist%", sb.toString());
- @@ -242,7 +242,7 @@
- if (friendName == null)
- continue;
- - final L2PcInstance friend = L2World.getInstance().getPlayer(id);
- + final L2PcInstance friend = World.getInstance().getPlayer(id);
- StringUtil.append(sb, "<a action=\"bypass _friend;deselect;", id, "\">[Deselect]</a> ", friendName, " ", ((friend != null && friend.isOnline()) ? "(on)" : "(off)"), "<br1>");
- }
- content = content.replaceAll("%selectedFriendsList%", sb.toString());
- @@ -275,7 +275,7 @@
- if (blockName == null)
- continue;
- - final L2PcInstance block = L2World.getInstance().getPlayer(id);
- + final L2PcInstance block = World.getInstance().getPlayer(id);
- StringUtil.append(sb, "<a action=\"bypass _block;select;", id, "\">[Select]</a> ", blockName, " ", ((block != null && block.isOnline()) ? "(on)" : "(off)"), "<br1>");
- }
- content = content.replaceAll("%blocklist%", sb.toString());
- @@ -290,7 +290,7 @@
- if (blockName == null)
- continue;
- - final L2PcInstance block = L2World.getInstance().getPlayer(id);
- + final L2PcInstance block = World.getInstance().getPlayer(id);
- StringUtil.append(sb, "<a action=\"bypass _block;deselect;", id, "\">[Deselect]</a> ", blockName, " ", ((block != null && block.isOnline()) ? "(on)" : "(off)"), "<br1>");
- }
- content = content.replaceAll("%selectedBlocksList%", sb.toString());
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/communitybbs/Manager/MailBBSManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/communitybbs/Manager/MailBBSManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/communitybbs/Manager/MailBBSManager.java (working copy)
- @@ -32,7 +32,7 @@
- import net.sf.l2j.gameserver.cache.HtmCache;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- import net.sf.l2j.gameserver.model.BlockList;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ExMailArrived;
- @@ -521,7 +521,7 @@
- continue;
- }
- - final L2PcInstance recipientPlayer = L2World.getInstance().getPlayer(recipientId);
- + final L2PcInstance recipientPlayer = World.getInstance().getPlayer(recipientId);
- if (!activeChar.isGM())
- {
- @@ -656,7 +656,7 @@
- private static boolean isBlocked(L2PcInstance activeChar, int recipId)
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- if (player.getObjectId() == recipId)
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/datatables/DoorTable.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/datatables/DoorTable.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/datatables/DoorTable.java (working copy)
- @@ -267,7 +267,7 @@
- // create door instance
- final L2DoorInstance door = new L2DoorInstance(IdFactory.getInstance().getNextId(), template);
- door.setCurrentHpMp(door.getMaxHp(), door.getMaxMp());
- - door.setXYZInvisible(posX, posY, posZ);
- + door.getPosition().set(posX, posY, posZ);
- _doors.put(door.getDoorId(), door);
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/datatables/ItemTable.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/datatables/ItemTable.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/datatables/ItemTable.java (working copy)
- @@ -27,7 +27,7 @@
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -166,8 +166,8 @@
- item.setDropProtection(actor.getObjectId(), false);
- }
- - // Add the ItemInstance object to _allObjects of L2world
- - L2World.getInstance().addObject(item);
- + // Add the ItemInstance object to _objects of World.
- + World.getInstance().addObject(item);
- // Set Item parameters
- if (item.isStackable() && count > 1)
- @@ -219,7 +219,7 @@
- item.setLocation(ItemLocation.VOID);
- item.setLastChange(ItemInstance.REMOVED);
- - L2World.getInstance().removeObject(item);
- + World.getInstance().removeObject(item);
- IdFactory.getInstance().releaseId(item.getObjectId());
- if (Config.LOG_ITEMS)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java (working copy)
- @@ -20,7 +20,6 @@
- import java.io.InputStream;
- import java.net.InetAddress;
- import java.net.UnknownHostException;
- -import java.util.Calendar;
- import java.util.logging.Level;
- import java.util.logging.LogManager;
- import java.util.logging.Logger;
- @@ -98,7 +97,7 @@
- import net.sf.l2j.gameserver.instancemanager.ZoneManager;
- import net.sf.l2j.gameserver.instancemanager.games.MonsterRace;
- import net.sf.l2j.gameserver.model.L2Manor;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.entity.Hero;
- import net.sf.l2j.gameserver.model.olympiad.Olympiad;
- import net.sf.l2j.gameserver.model.olympiad.OlympiadGameManager;
- @@ -116,7 +115,6 @@
- import net.sf.l2j.gameserver.taskmanager.DecayTaskManager;
- import net.sf.l2j.gameserver.taskmanager.GameTimeTaskManager;
- import net.sf.l2j.gameserver.taskmanager.ItemsOnGroundTaskManager;
- -import net.sf.l2j.gameserver.taskmanager.KnownListUpdateTaskManager;
- import net.sf.l2j.gameserver.taskmanager.MovementTaskManager;
- import net.sf.l2j.gameserver.taskmanager.PvpFlagTaskManager;
- import net.sf.l2j.gameserver.taskmanager.RandomAnimationTaskManager;
- @@ -135,7 +133,6 @@
- private final DeadLockDetector _deadDetectThread;
- public static GameServer gameServer;
- private final LoginServerThread _loginThread;
- - public static final Calendar dateTimeServerStarted = Calendar.getInstance();
- public long getUsedMemoryMB()
- {
- @@ -159,7 +156,7 @@
- IdFactory.getInstance();
- StringUtil.printSection("World");
- - L2World.getInstance();
- + World.getInstance();
- MapRegionTable.getInstance();
- AnnouncementTable.getInstance();
- ServerMemo.getInstance();
- @@ -223,7 +220,6 @@
- DecayTaskManager.getInstance();
- GameTimeTaskManager.getInstance();
- ItemsOnGroundTaskManager.getInstance();
- - KnownListUpdateTaskManager.getInstance();
- MovementTaskManager.getInstance();
- PvpFlagTaskManager.getInstance();
- RandomAnimationTaskManager.getInstance();
- @@ -280,9 +276,15 @@
- BoatTalkingGludin.load();
- }
- - StringUtil.printSection("Monster Derby Track");
- + StringUtil.printSection("Events");
- MonsterRace.getInstance();
- + if (Config.ALLOW_WEDDING)
- + CoupleManager.getInstance();
- +
- + if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
- + FishingChampionshipManager.getInstance();
- +
- StringUtil.printSection("Handlers");
- _log.config("AutoSpawnHandler: Loaded " + AutoSpawnManager.getInstance().size() + " handlers.");
- _log.config("AdminCommandHandler: Loaded " + AdminCommandHandler.getInstance().size() + " handlers.");
- @@ -291,12 +293,6 @@
- _log.config("SkillHandler: Loaded " + SkillHandler.getInstance().size() + " handlers.");
- _log.config("UserCommandHandler: Loaded " + UserCommandHandler.getInstance().size() + " handlers.");
- - if (Config.ALLOW_WEDDING)
- - CoupleManager.getInstance();
- -
- - if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
- - FishingChampionshipManager.getInstance();
- -
- StringUtil.printSection("System");
- Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());
- ForumsBBSManager.getInstance();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/geodata/GeoStructure.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/geodata/GeoStructure.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/geodata/GeoStructure.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.geoengine.geodata;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- /**
- * @author Hasha
- @@ -62,8 +62,8 @@
- public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y;
- // global geodata
- - public static final int GEO_REGIONS_X = (L2World.TILE_X_MAX - L2World.TILE_X_MIN + 1);
- - public static final int GEO_REGIONS_Y = (L2World.TILE_Y_MAX - L2World.TILE_Y_MIN + 1);
- + public static final int GEO_REGIONS_X = (World.TILE_X_MAX - World.TILE_X_MIN + 1);
- + public static final int GEO_REGIONS_Y = (World.TILE_Y_MAX - World.TILE_Y_MIN + 1);
- public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X;
- public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/GeoEngine.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/GeoEngine.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/GeoEngine.java (working copy)
- @@ -43,8 +43,8 @@
- import net.sf.l2j.gameserver.geoengine.geodata.IGeoObject;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- import net.sf.l2j.gameserver.model.Location;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -93,9 +93,9 @@
- final ExProperties props = Config.initProperties(Config.GEOENGINE_FILE);
- int loaded = 0;
- int failed = 0;
- - for (int rx = L2World.TILE_X_MIN; rx <= L2World.TILE_X_MAX; rx++)
- + for (int rx = World.TILE_X_MIN; rx <= World.TILE_X_MAX; rx++)
- {
- - for (int ry = L2World.TILE_Y_MIN; ry <= L2World.TILE_Y_MAX; ry++)
- + for (int ry = World.TILE_Y_MIN; ry <= World.TILE_Y_MAX; ry++)
- {
- if (props.containsKey(String.valueOf(rx) + "_" + String.valueOf(ry)))
- {
- @@ -158,8 +158,8 @@
- buffer.order(ByteOrder.LITTLE_ENDIAN);
- // get block indexes
- - final int blockX = (regionX - L2World.TILE_X_MIN) * GeoStructure.REGION_BLOCKS_X;
- - final int blockY = (regionY - L2World.TILE_Y_MIN) * GeoStructure.REGION_BLOCKS_Y;
- + final int blockX = (regionX - World.TILE_X_MIN) * GeoStructure.REGION_BLOCKS_X;
- + final int blockY = (regionY - World.TILE_Y_MIN) * GeoStructure.REGION_BLOCKS_Y;
- // loop over region blocks
- for (int ix = 0; ix < GeoStructure.REGION_BLOCKS_X; ix++)
- @@ -220,8 +220,8 @@
- private final void loadNullBlocks(int regionX, int regionY)
- {
- // get block indexes
- - final int blockX = (regionX - L2World.TILE_X_MIN) * GeoStructure.REGION_BLOCKS_X;
- - final int blockY = (regionY - L2World.TILE_Y_MIN) * GeoStructure.REGION_BLOCKS_Y;
- + final int blockX = (regionX - World.TILE_X_MIN) * GeoStructure.REGION_BLOCKS_X;
- + final int blockY = (regionY - World.TILE_Y_MIN) * GeoStructure.REGION_BLOCKS_Y;
- // load all null blocks
- for (int ix = 0; ix < GeoStructure.REGION_BLOCKS_X; ix++)
- @@ -238,7 +238,7 @@
- */
- public static final int getGeoX(int worldX)
- {
- - return (MathUtil.limit(worldX, L2World.WORLD_X_MIN, L2World.WORLD_X_MAX) - L2World.WORLD_X_MIN) >> 4;
- + return (MathUtil.limit(worldX, World.WORLD_X_MIN, World.WORLD_X_MAX) - World.WORLD_X_MIN) >> 4;
- }
- /**
- @@ -248,7 +248,7 @@
- */
- public static final int getGeoY(int worldY)
- {
- - return (MathUtil.limit(worldY, L2World.WORLD_Y_MIN, L2World.WORLD_Y_MAX) - L2World.WORLD_Y_MIN) >> 4;
- + return (MathUtil.limit(worldY, World.WORLD_Y_MIN, World.WORLD_Y_MAX) - World.WORLD_Y_MIN) >> 4;
- }
- /**
- @@ -258,7 +258,7 @@
- */
- public static final int getWorldX(int geoX)
- {
- - return (MathUtil.limit(geoX, 0, GeoStructure.GEO_CELLS_X) << 4) + L2World.WORLD_X_MIN + 8;
- + return (MathUtil.limit(geoX, 0, GeoStructure.GEO_CELLS_X) << 4) + World.WORLD_X_MIN + 8;
- }
- /**
- @@ -268,7 +268,7 @@
- */
- public static final int getWorldY(int geoY)
- {
- - return (MathUtil.limit(geoY, 0, GeoStructure.GEO_CELLS_Y) << 4) + L2World.WORLD_Y_MIN + 8;
- + return (MathUtil.limit(geoY, 0, GeoStructure.GEO_CELLS_Y) << 4) + World.WORLD_Y_MIN + 8;
- }
- /**
- @@ -1184,8 +1184,8 @@
- int gox = getGeoX(loc.getX());
- int goy = getGeoY(loc.getY());
- int goz = loc.getZ();
- - int rx = gox / GeoStructure.REGION_CELLS_X + L2World.TILE_X_MIN;
- - int ry = goy / GeoStructure.REGION_CELLS_Y + L2World.TILE_Y_MIN;
- + int rx = gox / GeoStructure.REGION_CELLS_X + World.TILE_X_MIN;
- + int ry = goy / GeoStructure.REGION_CELLS_Y + World.TILE_Y_MIN;
- int bx = (gox / GeoStructure.BLOCK_CELLS_X) % GeoStructure.REGION_BLOCKS_X;
- int by = (goy / GeoStructure.BLOCK_CELLS_Y) % GeoStructure.REGION_BLOCKS_Y;
- int cx = gox % GeoStructure.BLOCK_CELLS_X;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (working copy)
- @@ -35,7 +35,7 @@
- import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager;
- import net.sf.l2j.gameserver.instancemanager.ZoneManager;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -97,7 +97,7 @@
- }
- String firstParam = st.nextToken();
- - L2PcInstance player = L2World.getInstance().getPlayer(firstParam);
- + L2PcInstance player = World.getInstance().getPlayer(firstParam);
- if (player != null)
- {
- if (st.hasMoreTokens())
- @@ -106,7 +106,7 @@
- if (StringUtil.isDigit(secondParam))
- {
- int radius = Integer.parseInt(secondParam);
- - for (L2Character knownChar : player.getKnownList().getKnownTypeInRadius(L2Character.class, radius))
- + for (L2Character knownChar : player.getKnownTypeInRadius(L2Character.class, radius))
- {
- if (knownChar.equals(activeChar))
- continue;
- @@ -124,13 +124,9 @@
- else if (StringUtil.isDigit(firstParam))
- {
- int radius = Integer.parseInt(firstParam);
- - for (L2Character knownChar : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, radius))
- - {
- - if (knownChar.equals(activeChar))
- - continue;
- -
- + for (L2Character knownChar : activeChar.getKnownTypeInRadius(L2Character.class, radius))
- kill(activeChar, knownChar);
- - }
- +
- activeChar.sendMessage("Killed all characters within a " + radius + " unit radius.");
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAnnouncements.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAnnouncements.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAnnouncements.java (working copy)
- @@ -16,7 +16,7 @@
- import net.sf.l2j.gameserver.datatables.AnnouncementTable;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- /**
- @@ -53,7 +53,7 @@
- case "all":
- case "all_auto":
- final boolean isAuto = tokens[1].equalsIgnoreCase("all_auto");
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- AnnouncementTable.getInstance().showAnnouncements(player, isAuto);
- AnnouncementTable.getInstance().listAnnouncements(activeChar);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBan.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBan.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBan.java (working copy)
- @@ -23,7 +23,7 @@
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.LoginServerThread;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -71,7 +71,7 @@
- if (st.hasMoreTokens())
- {
- player = st.nextToken();
- - targetPlayer = L2World.getInstance().getPlayer(player);
- + targetPlayer = World.getInstance().getPlayer(player);
- // Second parameter, duration
- if (st.hasMoreTokens())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBuffs.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBuffs.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBuffs.java (working copy)
- @@ -7,7 +7,7 @@
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Effect;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -38,7 +38,7 @@
- if (st.hasMoreTokens())
- {
- String playername = st.nextToken();
- - L2PcInstance player = L2World.getInstance().getPlayer(playername);
- + L2PcInstance player = World.getInstance().getPlayer(playername);
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME);
- @@ -109,11 +109,8 @@
- String val = st.nextToken();
- int radius = Integer.parseInt(val);
- - for (L2PcInstance knownChar : activeChar.getKnownList().getKnownTypeInRadius(L2PcInstance.class, radius))
- - {
- - if (!knownChar.equals(activeChar))
- - knownChar.stopAllEffects();
- - }
- + for (L2PcInstance knownChar : activeChar.getKnownTypeInRadius(L2PcInstance.class, radius))
- + knownChar.stopAllEffects();
- activeChar.sendMessage("All effects canceled within radius " + radius + ".");
- return true;
- @@ -134,7 +131,7 @@
- {
- final String name = st.nextToken();
- - player = L2World.getInstance().getPlayer(name);
- + player = World.getInstance().getPlayer(name);
- if (player == null)
- {
- activeChar.sendMessage("The player " + name + " is not online.");
- @@ -211,7 +208,7 @@
- if (skillId < 1)
- return;
- - final L2Object obj = L2World.getInstance().getObject(objId);
- + final L2Object obj = World.getInstance().getObject(objId);
- if (obj instanceof L2Character)
- {
- final L2Character target = (L2Character) obj;
- @@ -230,7 +227,7 @@
- private static void removeAllBuffs(L2PcInstance activeChar, int objId)
- {
- - final L2Object target = L2World.getInstance().getObject(objId);
- + final L2Object target = World.getInstance().getObject(objId);
- if (target instanceof L2Character)
- {
- ((L2Character) target).stopAllEffects();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminChangeAccessLevel.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminChangeAccessLevel.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminChangeAccessLevel.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -56,7 +56,7 @@
- {
- String name = parts[1];
- int lvl = Integer.parseInt(parts[2]);
- - L2PcInstance player = L2World.getInstance().getPlayer(name);
- + L2PcInstance player = World.getInstance().getPlayer(name);
- if (player != null)
- onLineChange(activeChar, player, lvl);
- else
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminCreateItem.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminCreateItem.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminCreateItem.java (working copy)
- @@ -15,12 +15,13 @@
- package net.sf.l2j.gameserver.handler.admincommandhandlers;
- import java.util.Collection;
- +import java.util.List;
- import java.util.StringTokenizer;
- import net.sf.l2j.gameserver.datatables.ArmorSetsTable;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.item.ArmorSet;
- import net.sf.l2j.gameserver.model.item.kind.Item;
- @@ -63,7 +64,7 @@
- final int id = Integer.parseInt(st.nextToken());
- final int count = (st.hasMoreTokens()) ? Integer.parseInt(st.nextToken()) : 1;
- - final Collection<L2PcInstance> players = L2World.getInstance().getPlayers();
- + final Collection<L2PcInstance> players = World.getInstance().getPlayers();
- for (L2PcInstance player : players)
- createItem(activeChar, player, id, count, 0, false);
- @@ -176,23 +177,15 @@
- if (radius > 0)
- {
- - int counter = 0;
- -
- - for (L2PcInstance obj : activeChar.getKnownList().getKnownTypeInRadius(L2PcInstance.class, radius))
- + final List<L2PcInstance> players = activeChar.getKnownTypeInRadius(L2PcInstance.class, radius);
- + for (L2PcInstance obj : players)
- {
- - if (!(obj.equals(activeChar)))
- - {
- - obj.getInventory().addItem("Admin", id, num, obj, activeChar);
- - obj.sendMessage("A GM spawned " + num + " " + template.getName() + " in your inventory.");
- - counter++;
- -
- - // Send whole item list and open inventory window
- - obj.sendPacket(new ItemList(obj, true));
- - }
- + obj.addItem("Admin", id, num, activeChar, false);
- + obj.sendMessage("A GM spawned " + num + " " + template.getName() + " in your inventory.");
- }
- if (sendGmMessage)
- - activeChar.sendMessage(counter + " players rewarded with " + num + " " + template.getName() + " in a " + radius + " radius.");
- + activeChar.sendMessage(players.size() + " players rewarded with " + num + " " + template.getName() + " in a " + radius + " radius.");
- }
- else
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java (working copy)
- @@ -35,7 +35,7 @@
- import net.sf.l2j.gameserver.instancemanager.ClanHallManager;
- import net.sf.l2j.gameserver.model.L2Clan;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Summon;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- @@ -91,7 +91,7 @@
- {
- try
- {
- - final L2PcInstance target = L2World.getInstance().getPlayer(command.substring(21));
- + final L2PcInstance target = World.getInstance().getPlayer(command.substring(21));
- if (target != null)
- showCharacterInfo(activeChar, target);
- else
- @@ -430,7 +430,7 @@
- L2Object target;
- try
- {
- - target = L2World.getInstance().getPet(Integer.parseInt(command.substring(19)));
- + target = World.getInstance().getPet(Integer.parseInt(command.substring(19)));
- }
- catch (Exception e)
- {
- @@ -459,7 +459,7 @@
- L2Object target;
- try
- {
- - target = L2World.getInstance().getPlayer(command.substring(17));
- + target = World.getInstance().getPlayer(command.substring(17));
- if (target == null)
- target = activeChar.getTarget();
- }
- @@ -482,7 +482,7 @@
- {
- try
- {
- - final L2PcInstance player = L2World.getInstance().getPlayer(command.substring(16));
- + final L2PcInstance player = World.getInstance().getPlayer(command.substring(16));
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.TARGET_CANT_FOUND);
- @@ -529,7 +529,7 @@
- boolean changeCreateExpiryTime = st.nextToken().equalsIgnoreCase("create");
- String playerName = st.nextToken();
- - L2PcInstance player = L2World.getInstance().getPlayer(playerName);
- + L2PcInstance player = World.getInstance().getPlayer(playerName);
- if (player == null)
- {
- try (Connection con = L2DatabaseFactory.getInstance().getConnection())
- @@ -561,7 +561,7 @@
- private static void listCharacters(L2PcInstance activeChar, int page)
- {
- - List<L2PcInstance> players = new ArrayList<>(L2World.getInstance().getPlayers());
- + List<L2PcInstance> players = new ArrayList<>(World.getInstance().getPlayers());
- final int max = MathUtil.countPagesNumber(players.size(), PAGE_LIMIT);
- @@ -708,7 +708,7 @@
- final StringBuilder sb = new StringBuilder();
- // First use of sb, add player info into new Table row
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- String name = player.getName();
- if (name.toLowerCase().contains(characterToFind.toLowerCase()))
- @@ -767,7 +767,7 @@
- html.setFile("data/html/admin/ipfind.htm");
- final StringBuilder sb = new StringBuilder(1000);
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- L2GameClient client = player.getClient();
- if (client.isDetached())
- @@ -827,7 +827,7 @@
- return;
- }
- - final L2PcInstance player = L2World.getInstance().getPlayer(characterName);
- + final L2PcInstance player = World.getInstance().getPlayer(characterName);
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.TARGET_CANT_FOUND);
- @@ -854,7 +854,7 @@
- final Map<String, Integer> dualboxIPs = new HashMap<>();
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- L2GameClient client = player.getClient();
- if (client == null || client.isDetached())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEffects.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEffects.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEffects.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.gameserver.datatables.SkillTable;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.L2Summon;
- @@ -183,7 +183,7 @@
- }
- else if (command.startsWith("admin_para_all"))
- {
- - for (L2PcInstance player : activeChar.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : activeChar.getKnownType(L2PcInstance.class))
- {
- if (!player.isGM())
- {
- @@ -195,7 +195,7 @@
- }
- else if (command.startsWith("admin_unpara_all"))
- {
- - for (L2PcInstance player : activeChar.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : activeChar.getKnownType(L2PcInstance.class))
- {
- player.stopAbnormalEffect(0x0800);
- player.setIsParalyzed(false);
- @@ -255,31 +255,16 @@
- String oldName = "null";
- L2Object target = activeChar.getTarget();
- - L2Character player = null;
- - if (target instanceof L2Character)
- - {
- - player = (L2Character) target;
- - oldName = player.getName();
- - }
- - else
- - {
- - player = activeChar;
- - oldName = activeChar.getName();
- - }
- + if (!(target instanceof L2Npc))
- + return false;
- - if (player instanceof L2PcInstance)
- - L2World.getInstance().removePlayer((L2PcInstance) player);
- + oldName = target.getName();
- - player.setName(name);
- + target.setName(name);
- - if (player instanceof L2PcInstance)
- - {
- - L2World.getInstance().addVisibleObject(player, null);
- - ((L2PcInstance) player).broadcastUserInfo();
- - }
- - else if (player instanceof L2Npc)
- - player.broadcastPacket(new NpcInfo((L2Npc) player, null));
- + if (target instanceof L2Npc)
- + ((L2Npc) target).broadcastPacket(new NpcInfo((L2Npc) target, null));
- activeChar.sendMessage("Changed name from " + oldName + " to " + name + ".");
- }
- @@ -298,7 +283,7 @@
- final String targetOrRadius = st.nextToken();
- if (targetOrRadius != null)
- {
- - L2PcInstance player = L2World.getInstance().getPlayer(targetOrRadius);
- + L2PcInstance player = World.getInstance().getPlayer(targetOrRadius);
- if (player != null)
- {
- if (performSocial(social, player))
- @@ -310,7 +295,7 @@
- {
- final int radius = Integer.parseInt(targetOrRadius);
- - for (L2Object object : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, radius))
- + for (L2Character object : activeChar.getKnownTypeInRadius(L2Character.class, radius))
- performSocial(social, object);
- activeChar.sendMessage(radius + " units radius was affected by your social request.");
- @@ -347,7 +332,7 @@
- final String targetOrRadius = st.nextToken();
- if (targetOrRadius != null)
- {
- - L2PcInstance player = L2World.getInstance().getPlayer(targetOrRadius);
- + L2PcInstance player = World.getInstance().getPlayer(targetOrRadius);
- if (player != null)
- {
- if (performAbnormal(abnormal, player))
- @@ -359,7 +344,7 @@
- {
- final int radius = Integer.parseInt(targetOrRadius);
- - for (L2Object object : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, radius))
- + for (L2Character object : activeChar.getKnownTypeInRadius(L2Character.class, radius))
- performAbnormal(abnormal, object);
- activeChar.sendMessage(radius + " units radius was affected by your abnormal request.");
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGeoEngine.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGeoEngine.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGeoEngine.java (working copy)
- @@ -21,8 +21,8 @@
- import net.sf.l2j.gameserver.geoengine.geodata.GeoStructure;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- import net.sf.l2j.gameserver.model.Location;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -72,8 +72,8 @@
- {
- final int geoX = GeoEngine.getGeoX(activeChar.getX());
- final int geoY = GeoEngine.getGeoY(activeChar.getY());
- - final int rx = (activeChar.getX() - L2World.WORLD_X_MIN) / L2World.TILE_SIZE + L2World.TILE_X_MIN;
- - final int ry = (activeChar.getY() - L2World.WORLD_Y_MIN) / L2World.TILE_SIZE + L2World.TILE_Y_MIN;
- + final int rx = (activeChar.getX() - World.WORLD_X_MIN) / World.TILE_SIZE + World.TILE_X_MIN;
- + final int ry = (activeChar.getY() - World.WORLD_Y_MIN) / World.TILE_SIZE + World.TILE_Y_MIN;
- final ABlock block = GeoEngine.getInstance().getBlock(geoX, geoY);
- activeChar.sendMessage("Region: " + rx + "_" + ry + "; Block: " + block.getClass().getSimpleName());
- if (block.hasGeoPos())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminHeal.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminHeal.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminHeal.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -73,7 +73,7 @@
- L2Object obj = activeChar.getTarget();
- if (player != null)
- {
- - L2PcInstance plyr = L2World.getInstance().getPlayer(player);
- + L2PcInstance plyr = World.getInstance().getPlayer(player);
- if (plyr != null)
- obj = plyr;
- @@ -82,7 +82,7 @@
- try
- {
- int radius = Integer.parseInt(player);
- - for (L2Character character : activeChar.getKnownList().getKnownType(L2Character.class))
- + for (L2Character character : activeChar.getKnownType(L2Character.class))
- {
- character.setCurrentHpMp(character.getMaxHp(), character.getMaxMp());
- if (character instanceof L2PcInstance)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKick.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKick.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKick.java (working copy)
- @@ -18,7 +18,7 @@
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- public class AdminKick implements IAdminCommandHandler
- @@ -43,7 +43,7 @@
- {
- st.nextToken();
- String player = st.nextToken();
- - L2PcInstance plyr = L2World.getInstance().getPlayer(player);
- + L2PcInstance plyr = World.getInstance().getPlayer(player);
- if (plyr != null)
- {
- plyr.logout();
- @@ -56,7 +56,7 @@
- {
- int counter = 0;
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- if (player.isGM())
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKnownlist.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKnownlist.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKnownlist.java (working copy)
- @@ -14,27 +14,29 @@
- */
- package net.sf.l2j.gameserver.handler.admincommandhandlers;
- -import java.util.Collection;
- +import java.util.List;
- import java.util.StringTokenizer;
- import net.sf.l2j.commons.lang.StringUtil;
- +import net.sf.l2j.commons.math.MathUtil;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.ObjectKnownList;
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- /**
- * Handles visibility over target's knownlist, offering details about current target's vicinity.
- - * @author Tryskell
- */
- public class AdminKnownlist implements IAdminCommandHandler
- {
- + private static final int PAGE_LIMIT = 15;
- +
- private static final String[] ADMIN_COMMANDS =
- {
- - "admin_knownlist"
- + "admin_knownlist",
- + "admin_knownlist_page",
- };
- @Override
- @@ -55,11 +57,11 @@
- try
- {
- final int objectId = Integer.parseInt(parameter);
- - target = L2World.getInstance().getObject(objectId);
- + target = World.getInstance().getObject(objectId);
- }
- catch (NumberFormatException nfe)
- {
- - target = L2World.getInstance().getPlayer(parameter);
- + target = World.getInstance().getPlayer(parameter);
- }
- }
- @@ -71,25 +73,72 @@
- target = activeChar;
- }
- - final ObjectKnownList knownlist = target.getKnownList();
- - final Collection<L2Object> list = knownlist.getKnownObjects();
- + int page = 1;
- - // Generate data.
- - final StringBuilder sb = new StringBuilder(list.size() * 150);
- - for (L2Object object : list)
- - StringUtil.append(sb, "<tr><td>", object.getName(), "</td><td>", object.getClass().getSimpleName(), "</td></tr>");
- + if (command.startsWith("admin_knownlist_page") && st.hasMoreTokens())
- + {
- + try
- + {
- + page = Integer.parseInt(st.nextToken());
- + }
- + catch (NumberFormatException nfe)
- + {
- + }
- + }
- - final NpcHtmlMessage html = new NpcHtmlMessage(0);
- - html.setFile("data/html/admin/knownlist.htm");
- - html.replace("%target%", target.getName());
- - html.replace("%type%", knownlist.getClass().getSimpleName());
- - html.replace("%size%", list.size());
- - html.replace("%knownlist%", sb.toString());
- - activeChar.sendPacket(html);
- + showKnownlist(activeChar, target, page);
- }
- return true;
- }
- + private static void showKnownlist(L2PcInstance activeChar, L2Object target, int page)
- + {
- + List<L2Object> knownlist = target.getKnownType(L2Object.class);
- +
- + // Load static Htm.
- + final NpcHtmlMessage html = new NpcHtmlMessage(0);
- + html.setFile("data/html/admin/knownlist.htm");
- + html.replace("%target%", target.getName());
- + html.replace("%size%", knownlist.size());
- +
- + if (knownlist.isEmpty())
- + {
- + html.replace("%knownlist%", "<tr><td>No objects in vicinity.</td></tr>");
- + html.replace("%pages%", 0);
- + activeChar.sendPacket(html);
- + return;
- + }
- +
- + final int max = MathUtil.countPagesNumber(knownlist.size(), PAGE_LIMIT);
- + if (page > max)
- + page = max;
- +
- + knownlist = knownlist.subList((page - 1) * PAGE_LIMIT, Math.min(page * PAGE_LIMIT, knownlist.size()));
- +
- + // Generate data.
- + final StringBuilder sb = new StringBuilder(knownlist.size() * 150);
- + for (L2Object object : knownlist)
- + StringUtil.append(sb, "<tr><td>", object.getName(), "</td><td>", object.getClass().getSimpleName(), "</td></tr>");
- +
- + html.replace("%knownlist%", sb.toString());
- +
- + sb.setLength(0);
- +
- + // End of table, open a new table for pages system.
- + for (int i = 0; i < max; i++)
- + {
- + final int pagenr = i + 1;
- + if (page == pagenr)
- + StringUtil.append(sb, pagenr, " ");
- + else
- + StringUtil.append(sb, "<a action=\"bypass -h admin_knownlist_page ", target.getObjectId(), " ", pagenr, "\">", pagenr, "</a> ");
- + }
- +
- + html.replace("%pages%", sb.toString());
- +
- + activeChar.sendPacket(html);
- + }
- +
- @Override
- public String[] getAdminCommandList()
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java (working copy)
- @@ -18,7 +18,7 @@
- import net.sf.l2j.gameserver.LoginServerThread;
- import net.sf.l2j.gameserver.Shutdown;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- import net.sf.l2j.gameserver.taskmanager.GameTimeTaskManager;
- @@ -108,7 +108,7 @@
- {
- final NpcHtmlMessage html = new NpcHtmlMessage(0);
- html.setFile("data/html/admin/maintenance.htm");
- - html.replace("%count%", L2World.getInstance().getPlayers().size());
- + html.replace("%count%", World.getInstance().getPlayers().size());
- html.replace("%used%", Math.round((int) ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576)));
- html.replace("%server_name%", LoginServerThread.getInstance().getServerName());
- html.replace("%status%", LoginServerThread.getInstance().getStatusString());
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMenu.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMenu.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMenu.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.handler.admincommandhandlers;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- public class AdminMenu implements IAdminCommandHandler
- @@ -37,7 +37,7 @@
- if (data.length == 5)
- {
- String playerName = data[1];
- - L2PcInstance player = L2World.getInstance().getPlayer(playerName);
- + L2PcInstance player = World.getInstance().getPlayer(playerName);
- if (player != null)
- teleportCharacter(player, Integer.parseInt(data[2]), Integer.parseInt(data[3]), Integer.parseInt(data[4]), activeChar);
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminRes.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminRes.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminRes.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -72,7 +72,7 @@
- if (resParam != null)
- {
- // Check if a player name was specified as a param.
- - L2PcInstance plyr = L2World.getInstance().getPlayer(resParam);
- + L2PcInstance plyr = World.getInstance().getPlayer(resParam);
- if (plyr != null)
- obj = plyr;
- @@ -83,7 +83,7 @@
- {
- int radius = Integer.parseInt(resParam);
- - for (L2PcInstance knownPlayer : activeChar.getKnownList().getKnownTypeInRadius(L2PcInstance.class, radius))
- + for (L2PcInstance knownPlayer : activeChar.getKnownTypeInRadius(L2PcInstance.class, radius))
- doResurrect(knownPlayer);
- activeChar.sendMessage("Resurrected all players within a " + radius + " unit radius.");
- @@ -123,7 +123,7 @@
- {
- radius = Integer.parseInt(radiusStr);
- - for (L2Character knownChar : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, radius))
- + for (L2Character knownChar : activeChar.getKnownTypeInRadius(L2Character.class, radius))
- if (!(knownChar instanceof L2PcInstance))
- doResurrect(knownChar);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminSpawn.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminSpawn.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminSpawn.java (working copy)
- @@ -32,7 +32,7 @@
- import net.sf.l2j.gameserver.instancemanager.SevenSigns;
- import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Spawn;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.instance.L2FenceInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- @@ -198,7 +198,7 @@
- Broadcast.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.NPC_SERVER_NOT_OPERATING));
- RaidBossSpawnManager.getInstance().cleanUp();
- DayNightSpawnManager.getInstance().cleanUp();
- - L2World.getInstance().deleteVisibleNpcSpawns();
- + World.getInstance().deleteVisibleNpcSpawns();
- GmListTable.broadcastMessageToGMs("NPCs' unspawn is now complete.");
- }
- else if (command.startsWith("admin_spawnday"))
- @@ -210,7 +210,7 @@
- // make sure all spawns are deleted
- RaidBossSpawnManager.getInstance().cleanUp();
- DayNightSpawnManager.getInstance().cleanUp();
- - L2World.getInstance().deleteVisibleNpcSpawns();
- + World.getInstance().deleteVisibleNpcSpawns();
- // now respawn all
- NpcTable.getInstance().reloadAllNpc();
- SpawnTable.getInstance().reloadAll();
- @@ -246,7 +246,7 @@
- st.nextToken();
- try
- {
- - L2Object object = L2World.getInstance().getObject(Integer.parseInt(st.nextToken()));
- + L2Object object = World.getInstance().getObject(Integer.parseInt(st.nextToken()));
- if (object instanceof L2FenceInstance)
- {
- FenceTable.getInstance().removeFence((L2FenceInstance) object);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTarget.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTarget.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTarget.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.handler.admincommandhandlers;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -48,7 +48,7 @@
- try
- {
- String targetName = command.substring(13);
- - L2PcInstance obj = L2World.getInstance().getPlayer(targetName);
- + L2PcInstance obj = World.getInstance().getPlayer(targetName);
- if (obj != null)
- obj.onAction(activeChar);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTeleport.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTeleport.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTeleport.java (working copy)
- @@ -22,7 +22,7 @@
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Clan;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -71,7 +71,7 @@
- {
- st.nextToken();
- String plyr = st.nextToken();
- - L2PcInstance player = L2World.getInstance().getPlayer(plyr);
- + L2PcInstance player = World.getInstance().getPlayer(plyr);
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET);
- @@ -86,7 +86,7 @@
- try
- {
- String targetName = command.substring(13);
- - L2PcInstance player = L2World.getInstance().getPlayer(targetName);
- + L2PcInstance player = World.getInstance().getPlayer(targetName);
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET);
- @@ -104,7 +104,7 @@
- try
- {
- String targetName = command.substring(19);
- - L2PcInstance player = L2World.getInstance().getPlayer(targetName);
- + L2PcInstance player = World.getInstance().getPlayer(targetName);
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET);
- @@ -133,7 +133,7 @@
- try
- {
- String targetName = command.substring(18);
- - L2PcInstance player = L2World.getInstance().getPlayer(targetName);
- + L2PcInstance player = World.getInstance().getPlayer(targetName);
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET);
- @@ -178,7 +178,7 @@
- {
- st.nextToken();
- String plyr = st.nextToken();
- - L2PcInstance player = L2World.getInstance().getPlayer(plyr);
- + L2PcInstance player = World.getInstance().getPlayer(plyr);
- if (player == null)
- {
- activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZone.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZone.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZone.java (working copy)
- @@ -21,7 +21,7 @@
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.instancemanager.ZoneManager;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.zone.L2ZoneType;
- import net.sf.l2j.gameserver.model.zone.ZoneId;
- @@ -82,8 +82,8 @@
- {
- int x = activeChar.getX();
- int y = activeChar.getY();
- - int rx = (x - L2World.WORLD_X_MIN) / L2World.TILE_SIZE + L2World.TILE_X_MIN;
- - int ry = (y - L2World.WORLD_Y_MIN) / L2World.TILE_SIZE + L2World.TILE_Y_MIN;
- + int rx = (x - World.WORLD_X_MIN) / World.TILE_SIZE + World.TILE_X_MIN;
- + int ry = (y - World.WORLD_Y_MIN) / World.TILE_SIZE + World.TILE_Y_MIN;
- final NpcHtmlMessage html = new NpcHtmlMessage(0);
- html.setFile("data/html/admin/zone.htm");
- @@ -113,7 +113,7 @@
- html.replace("%NORESTART%", (activeChar.isInsideZone(ZoneId.NO_RESTART) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
- final StringBuilder sb = new StringBuilder(100);
- - for (L2ZoneType zone : L2World.getInstance().getRegion(x, y).getZones())
- + for (L2ZoneType zone : World.getInstance().getRegion(x, y).getZones())
- {
- if (zone.isCharacterInZone(activeChar))
- StringUtil.append(sb, zone.getId(), " ");
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java (working copy)
- @@ -35,7 +35,7 @@
- return;
- final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
- - for (L2PcInstance player : activeChar.getKnownList().getKnownTypeInRadius(L2PcInstance.class, 1250))
- + for (L2PcInstance player : activeChar.getKnownTypeInRadius(L2PcInstance.class, 1250))
- {
- if (!BlockList.isBlocked(player, activeChar))
- player.sendPacket(cs);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.handler.chathandlers;
- import net.sf.l2j.gameserver.handler.IChatHandler;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
- import net.sf.l2j.gameserver.util.FloodProtectors;
- @@ -38,7 +38,7 @@
- return;
- final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- player.sendPacket(cs);
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (working copy)
- @@ -17,7 +17,7 @@
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- import net.sf.l2j.gameserver.handler.IChatHandler;
- import net.sf.l2j.gameserver.model.BlockList;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
- import net.sf.l2j.gameserver.util.FloodProtectors;
- @@ -39,7 +39,7 @@
- final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
- final int region = MapRegionTable.getMapRegion(activeChar.getX(), activeChar.getY());
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- if (!BlockList.isBlocked(player, activeChar) && region == MapRegionTable.getMapRegion(player.getX(), player.getY()))
- player.sendPacket(cs);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTell.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTell.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTell.java (working copy)
- @@ -16,7 +16,7 @@
- import net.sf.l2j.gameserver.handler.IChatHandler;
- import net.sf.l2j.gameserver.model.BlockList;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
- @@ -34,7 +34,7 @@
- if (target == null)
- return;
- - final L2PcInstance receiver = L2World.getInstance().getPlayer(target);
- + final L2PcInstance receiver = World.getInstance().getPlayer(target);
- if (receiver == null || receiver.getClient().isDetached())
- {
- activeChar.sendPacket(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (working copy)
- @@ -17,7 +17,7 @@
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- import net.sf.l2j.gameserver.handler.IChatHandler;
- import net.sf.l2j.gameserver.model.BlockList;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
- import net.sf.l2j.gameserver.util.FloodProtectors;
- @@ -39,7 +39,7 @@
- final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
- final int region = MapRegionTable.getMapRegion(activeChar.getX(), activeChar.getY());
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- if (!BlockList.isBlocked(player, activeChar) && region == MapRegionTable.getMapRegion(player.getX(), player.getY()))
- player.sendPacket(cs);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java (working copy)
- @@ -74,6 +74,6 @@
- activeOwner.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.PET_USES_S1).addItemName(item.getItemId()));
- activePet.setChargedShot(ShotType.SOULSHOT, true);
- - Broadcast.toSelfAndKnownPlayersInRadiusSq(activeOwner, new MagicSkillUse(activePet, activePet, 2033, 1, 0, 0), 360000);
- + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, 2033, 1, 0, 0), 600);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java (working copy)
- @@ -76,6 +76,6 @@
- activeOwner.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.PET_USES_S1).addItemName(itemId));
- activePet.setChargedShot(isBlessed ? ShotType.BLESSED_SPIRITSHOT : ShotType.SPIRITSHOT, true);
- - Broadcast.toSelfAndKnownPlayersInRadiusSq(activeOwner, new MagicSkillUse(activePet, activePet, (isBlessed ? 2009 : 2008), 1, 0, 0), 360000);
- + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(activePet, activePet, (isBlessed ? 2009 : 2008), 1, 0, 0), 600);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java (working copy)
- @@ -72,6 +72,6 @@
- activeChar.sendPacket(SystemMessageId.ENABLED_SPIRITSHOT);
- activeChar.setChargedShot(ShotType.BLESSED_SPIRITSHOT, true);
- - Broadcast.toSelfAndKnownPlayersInRadiusSq(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getId(), 1, 0, 0), 360000);
- + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getId(), 1, 0, 0), 600);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java (working copy)
- @@ -77,6 +77,6 @@
- weaponInst.setChargedShot(ShotType.SOULSHOT, true);
- activeChar.sendPacket(SystemMessageId.ENABLED_SOULSHOT);
- - Broadcast.toSelfAndKnownPlayersInRadiusSq(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getId(), 1, 0, 0), 360000);
- + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getId(), 1, 0, 0), 600);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java (working copy)
- @@ -70,6 +70,6 @@
- activeChar.sendPacket(SystemMessageId.ENABLED_SPIRITSHOT);
- activeChar.setChargedShot(ShotType.SPIRITSHOT, true);
- - Broadcast.toSelfAndKnownPlayersInRadiusSq(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getId(), 1, 0, 0), 360000);
- + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getId(), 1, 0, 0), 600);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (working copy)
- @@ -29,6 +29,7 @@
- import net.sf.l2j.gameserver.handler.IItemHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Spawn;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.L2Playable;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- @@ -40,8 +41,8 @@
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.MagicSkillLaunched;
- import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- -import net.sf.l2j.gameserver.network.serverpackets.PetItemList;
- import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- import net.sf.l2j.gameserver.util.Broadcast;
- @@ -96,7 +97,7 @@
- case 0: // static summons (like Christmas tree)
- try
- {
- - for (L2XmassTreeInstance ch : activeChar.getKnownList().getKnownTypeInRadius(L2XmassTreeInstance.class, 1200))
- + for (L2XmassTreeInstance ch : activeChar.getKnownTypeInRadius(L2XmassTreeInstance.class, 1200)) // FIXME pointless
- {
- if (npcTemplate.getNpcId() == L2XmassTreeInstance.SPECIAL_TREE_ID)
- {
- @@ -126,7 +127,7 @@
- activeChar.setTarget(activeChar);
- Broadcast.toSelfAndKnownPlayers(activeChar, new MagicSkillUse(activeChar, 2046, 1, 5000, 0));
- activeChar.setTarget(oldTarget);
- - activeChar.sendPacket(new SetupGauge(0, 5000));
- + activeChar.sendPacket(new SetupGauge(GaugeColor.BLUE, 5000));
- activeChar.sendPacket(SystemMessageId.SUMMON_A_PET);
- activeChar.setIsCastingNow(true);
- @@ -164,35 +165,24 @@
- if (_item == null || _item.getOwnerId() != _activeChar.getObjectId() || _item.getLocation() != ItemInstance.ItemLocation.INVENTORY)
- return;
- - final L2PetInstance pet = L2PetInstance.spawnPet(_npcTemplate, _activeChar, _item);
- + // Owner has a pet listed in world.
- + if (World.getInstance().getPet(_activeChar.getObjectId()) != null)
- + return;
- +
- + // Add the pet instance to world.
- + final L2PetInstance pet = L2PetInstance.restore(_item, _npcTemplate, _activeChar);
- if (pet == null)
- return;
- - pet.setShowSummonAnimation(true);
- + World.getInstance().addPet(_activeChar.getObjectId(), pet);
- - if (!pet.isRespawned())
- - {
- - pet.setCurrentHp(pet.getMaxHp());
- - pet.setCurrentMp(pet.getMaxMp());
- - pet.getStat().setExp(pet.getExpForThisLevel());
- - pet.setCurrentFed(pet.getPetData().getMaxMeal());
- - }
- + _activeChar.setPet(pet);
- pet.setRunning();
- -
- - if (!pet.isRespawned())
- - pet.store();
- -
- - _activeChar.setPet(pet);
- -
- - pet.spawnMe(_activeChar.getX() + 50, _activeChar.getY() + 100, _activeChar.getZ());
- + pet.setTitle(_activeChar.getName());
- + pet.spawnMe();
- pet.startFeed();
- - _item.setEnchantLevel(pet.getLevel());
- -
- pet.setFollowStatus(true);
- -
- - pet.getOwner().sendPacket(new PetItemList(pet));
- - pet.broadcastStatusUpdate();
- }
- catch (Exception e)
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java (working copy)
- @@ -32,8 +32,7 @@
- private static final L2SkillType[] SKILL_IDS =
- {
- L2SkillType.HEAL_PERCENT,
- - L2SkillType.MANAHEAL_PERCENT,
- - L2SkillType.CPHEAL_PERCENT
- + L2SkillType.MANAHEAL_PERCENT
- };
- @Override
- @@ -44,16 +43,11 @@
- if (handler != null)
- handler.useSkill(activeChar, skill, targets);
- - boolean cp = false;
- boolean hp = false;
- boolean mp = false;
- switch (skill.getSkillType())
- {
- - case CPHEAL_PERCENT:
- - cp = true;
- - break;
- -
- case HEAL_PERCENT:
- hp = true;
- break;
- @@ -109,18 +103,8 @@
- {
- su = new StatusUpdate(target);
- - if (cp)
- + if (hp)
- {
- - amount = Math.min(((full) ? target.getMaxCp() : (target.getMaxCp() * skill.getPower() / 100.0)), target.getMaxCp() - target.getCurrentCp());
- - target.setCurrentCp(amount + target.getCurrentCp());
- -
- - sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_WILL_BE_RESTORED);
- - sm.addNumber((int) amount);
- - target.sendPacket(sm);
- - su.addAttribute(StatusUpdate.CUR_CP, (int) target.getCurrentCp());
- - }
- - else if (hp)
- - {
- if (activeChar != target)
- sm = SystemMessage.getSystemMessage(SystemMessageId.S2_HP_RESTORED_BY_S1).addCharName(activeChar);
- else
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/BoatManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/BoatManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/BoatManager.java (working copy)
- @@ -18,8 +18,8 @@
- import java.util.Map;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- -import net.sf.l2j.gameserver.model.L2World;
- import net.sf.l2j.gameserver.model.VehiclePathPoint;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Vehicle;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.template.CharTemplate;
- @@ -89,8 +89,7 @@
- _boats.put(boat.getObjectId(), boat);
- boat.setHeading(heading);
- - boat.setXYZInvisible(x, y, z);
- - boat.spawnMe();
- + boat.spawnMe(x, y, z);
- return boat;
- }
- @@ -132,7 +131,7 @@
- */
- public void broadcastPacket(VehiclePathPoint point1, VehiclePathPoint point2, L2GameServerPacket packet)
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- double dx = (double) player.getX() - point1.x;
- double dy = (double) player.getY() - point1.y;
- @@ -158,7 +157,7 @@
- */
- public void broadcastPackets(VehiclePathPoint point1, VehiclePathPoint point2, L2GameServerPacket... packets)
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- double dx = (double) player.getX() - point1.x;
- double dy = (double) player.getY() - point1.y;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/CastleManorManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/CastleManorManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/CastleManorManager.java (working copy)
- @@ -32,7 +32,7 @@
- import net.sf.l2j.gameserver.datatables.ClanTable;
- import net.sf.l2j.gameserver.model.L2Clan;
- import net.sf.l2j.gameserver.model.L2Manor;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.entity.Castle;
- import net.sf.l2j.gameserver.model.itemcontainer.ClanWarehouse;
- @@ -454,7 +454,7 @@
- // Sending notification to a clan leader
- L2PcInstance clanLeader = null;
- - clanLeader = L2World.getInstance().getPlayer(clan.getLeader().getName());
- + clanLeader = World.getInstance().getPlayer(clan.getLeader().getName());
- if (clanLeader != null)
- clanLeader.sendPacket(SystemMessageId.THE_MANOR_INFORMATION_HAS_BEEN_UPDATED);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/CoupleManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/CoupleManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/CoupleManager.java (working copy)
- @@ -17,125 +17,145 @@
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- -import java.util.ArrayList;
- -import java.util.List;
- +import java.util.Map;
- +import java.util.Map.Entry;
- +import java.util.concurrent.ConcurrentHashMap;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import net.sf.l2j.L2DatabaseFactory;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.idfactory.IdFactory;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -import net.sf.l2j.gameserver.model.entity.Couple;
- +import net.sf.l2j.gameserver.model.holder.IntIntHolder;
- -/**
- - * @author evill33t
- - */
- public class CoupleManager
- {
- private static final Logger _log = Logger.getLogger(CoupleManager.class.getName());
- + private final Map<Integer, IntIntHolder> _couples = new ConcurrentHashMap<>();
- +
- protected CoupleManager()
- {
- - load();
- - }
- -
- - public static final CoupleManager getInstance()
- - {
- - return SingletonHolder._instance;
- - }
- -
- - private List<Couple> _couples;
- -
- - public void reload()
- - {
- - _couples.clear();
- - load();
- - }
- -
- - private final void load()
- - {
- - _couples = new ArrayList<>();
- -
- try (Connection con = L2DatabaseFactory.getInstance().getConnection())
- {
- - PreparedStatement statement = con.prepareStatement("SELECT id FROM mods_wedding ORDER BY id");
- - ResultSet rs = statement.executeQuery();
- + PreparedStatement ps = con.prepareStatement("SELECT * FROM mods_wedding");
- + ResultSet rs = ps.executeQuery();
- while (rs.next())
- - _couples.add(new Couple(rs.getInt("id")));
- + _couples.put(rs.getInt("id"), new IntIntHolder(rs.getInt("requesterId"), rs.getInt("partnerId")));
- rs.close();
- - statement.close();
- + ps.close();
- - _log.info("CoupleManager : Loaded " + getCouples().size() + " couples.");
- + _log.info("CoupleManager : Loaded " + _couples.size() + " couples.");
- }
- catch (Exception e)
- {
- - _log.log(Level.WARNING, "Exception: CoupleManager.load(): " + e.getMessage(), e);
- + _log.log(Level.WARNING, "CoupleManager: " + e.getMessage(), e);
- }
- }
- - public final Couple getCouple(int coupleId)
- + public final Map<Integer, IntIntHolder> getCouples()
- {
- - int index = getCoupleIndex(coupleId);
- - if (index >= 0)
- - return _couples.get(index);
- + return _couples;
- + }
- +
- + public final IntIntHolder getCouple(int coupleId)
- + {
- + return _couples.get(coupleId);
- + }
- +
- + /**
- + * Add a couple to the couples map. Both players must be logged.
- + * @param requester : The wedding requester.
- + * @param partner : The wedding partner.
- + */
- + public void addCouple(L2PcInstance requester, L2PcInstance partner)
- + {
- + if (requester == null || partner == null)
- + return;
- - return null;
- + final int coupleId = IdFactory.getInstance().getNextId();
- +
- + _couples.put(coupleId, new IntIntHolder(requester.getObjectId(), partner.getObjectId()));
- +
- + requester.setCoupleId(coupleId);
- + partner.setCoupleId(coupleId);
- }
- - public void createCouple(L2PcInstance player1, L2PcInstance player2)
- + /**
- + * Delete the couple. If players are logged, reset wedding variables.
- + * @param coupleId : The couple id to delete.
- + */
- + public void deleteCouple(int coupleId)
- {
- - if (player1 != null && player2 != null)
- + final IntIntHolder couple = _couples.remove(coupleId);
- + if (couple == null)
- + return;
- +
- + final L2PcInstance requester = World.getInstance().getPlayer(couple.getId());
- + if (requester != null)
- {
- - Couple _new = new Couple(player1, player2);
- - _couples.add(_new);
- - player1.setCoupleId(_new.getId());
- - player2.setCoupleId(_new.getId());
- + requester.setCoupleId(0);
- + requester.sendMessage("You are now divorced.");
- }
- +
- + final L2PcInstance partner = World.getInstance().getPlayer(couple.getValue());
- + if (partner != null)
- + {
- + partner.setCoupleId(0);
- + partner.sendMessage("You are now divorced.");
- + }
- }
- - public void deleteCouple(int coupleId)
- + /**
- + * Save all couples on shutdown. Delete previous SQL infos.
- + */
- + public void save()
- {
- - int index = getCoupleIndex(coupleId);
- - Couple couple = _couples.get(index);
- - if (couple != null)
- + try (Connection con = L2DatabaseFactory.getInstance().getConnection())
- {
- - L2PcInstance player1 = L2World.getInstance().getPlayer(couple.getPlayer1Id());
- - L2PcInstance player2 = L2World.getInstance().getPlayer(couple.getPlayer2Id());
- + PreparedStatement ps = con.prepareStatement("DELETE FROM mods_wedding");
- + ps.execute();
- + ps.close();
- - if (player1 != null)
- + ps = con.prepareStatement("INSERT INTO mods_wedding (id, requesterId, partnerId) VALUES (?,?,?)");
- + for (Entry<Integer, IntIntHolder> coupleEntry : _couples.entrySet())
- {
- - player1.setMarried(false);
- - player1.setCoupleId(0);
- + final IntIntHolder couple = coupleEntry.getValue();
- +
- + ps.setInt(1, coupleEntry.getKey());
- + ps.setInt(2, couple.getId());
- + ps.setInt(3, couple.getValue());
- + ps.addBatch();
- }
- -
- - if (player2 != null)
- - {
- - player2.setMarried(false);
- - player2.setCoupleId(0);
- - }
- - couple.divorce();
- - _couples.remove(index);
- + ps.executeBatch();
- + ps.close();
- }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "CoupleManager: " + e.getMessage(), e);
- + }
- }
- - public final int getCoupleIndex(int coupleId)
- + /**
- + * @param coupleId : The couple id to check.
- + * @param objectId : The player objectId to check.
- + * @return the partner objectId, or 0 if not found.
- + */
- + public final int getPartnerId(int coupleId, int objectId)
- {
- - int i = 0;
- - for (Couple temp : _couples)
- - {
- - if (temp != null && temp.getId() == coupleId)
- - return i;
- -
- - i++;
- - }
- - return -1;
- + final IntIntHolder couple = _couples.get(coupleId);
- + if (couple == null)
- + return 0;
- +
- + return (couple.getId() == objectId) ? couple.getValue() : couple.getId();
- }
- - public final List<Couple> getCouples()
- + public static final CoupleManager getInstance()
- {
- - return _couples;
- + return SingletonHolder._instance;
- }
- private static class SingletonHolder
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/MercTicketManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/MercTicketManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/MercTicketManager.java (working copy)
- @@ -26,7 +26,7 @@
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.datatables.NpcTable;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2SiegeGuardInstance;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- @@ -712,7 +712,7 @@
- dropticket.setLocation(ItemInstance.ItemLocation.INVENTORY);
- dropticket.setDestroyProtected(true);
- dropticket.dropMe(null, x, y, z);
- - L2World.getInstance().addObject(dropticket);
- + World.getInstance().addObject(dropticket);
- _droppedTickets.add(dropticket);
- }
- break;
- @@ -842,7 +842,7 @@
- dropticket.setLocation(ItemInstance.ItemLocation.INVENTORY);
- dropticket.setDestroyProtected(true);
- dropticket.dropMe(activeChar, x, y, z);
- - L2World.getInstance().addObject(dropticket); // add to the world
- + World.getInstance().addObject(dropticket); // add to the world
- // and keep track of this ticket in the list
- _droppedTickets.add(dropticket);
- @@ -880,7 +880,7 @@
- if (item != null && getTicketCastleId(item.getItemId()) == castleId)
- {
- item.decayMe();
- - L2World.getInstance().removeObject(item);
- + World.getInstance().removeObject(item);
- it.remove();
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSigns.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSigns.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSigns.java (working copy)
- @@ -31,7 +31,7 @@
- import net.sf.l2j.gameserver.datatables.MapRegionTable.TeleportWhereType;
- import net.sf.l2j.gameserver.datatables.SkillTable;
- import net.sf.l2j.gameserver.instancemanager.AutoSpawnManager.AutoSpawnInstance;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SSQInfo;
- @@ -1222,7 +1222,7 @@
- */
- protected void teleLosingCabalFromDungeons(String compWinner)
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- StatsSet currPlayer = _signsPlayerData.get(player.getObjectId());
- @@ -1362,7 +1362,7 @@
- */
- public void giveSosEffect(int strifeOwner)
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- int cabal = getPlayerCabal(player.getObjectId());
- if (cabal != SevenSigns.CABAL_NULL)
- @@ -1382,7 +1382,7 @@
- */
- public void removeSosEffect()
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- // Remove Seal of Strife buffs/debuffs.
- player.removeSkill(SkillTable.FrequentSkill.THE_VICTOR_OF_WAR.getSkill());
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSignsFestival.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSignsFestival.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSignsFestival.java (working copy)
- @@ -41,8 +41,8 @@
- import net.sf.l2j.gameserver.model.L2Party;
- import net.sf.l2j.gameserver.model.L2Party.MessageType;
- import net.sf.l2j.gameserver.model.L2Spawn;
- -import net.sf.l2j.gameserver.model.L2World;
- import net.sf.l2j.gameserver.model.Location;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.instance.L2FestivalMonsterInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- @@ -3502,7 +3502,7 @@
- private static void addReputationPointsForPartyMemberClan(String partyMemberName)
- {
- - L2PcInstance player = L2World.getInstance().getPlayer(partyMemberName);
- + L2PcInstance player = World.getInstance().getPlayer(partyMemberName);
- if (player != null)
- {
- if (player.getClan() != null)
- @@ -3603,7 +3603,7 @@
- saveFestivalData(updateSettings);
- // Remove any unused blood offerings from online players.
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- ItemInstance bloodOfferings = player.getInventory().getItemByItemId(FESTIVAL_OFFERING_ID);
- if (bloodOfferings != null)
- @@ -3784,7 +3784,7 @@
- if (festivalParty == null)// leader has left
- for (int partyMemberObjId : getParticipants(oracle, festivalId))
- {
- - L2PcInstance partyMember = L2World.getInstance().getPlayer(partyMemberObjId);
- + L2PcInstance partyMember = World.getInstance().getPlayer(partyMemberObjId);
- if (partyMember == null)
- continue;
- @@ -4395,7 +4395,7 @@
- {
- for (int participantObjId : _participants)
- {
- - L2PcInstance participant = L2World.getInstance().getPlayer(participantObjId);
- + L2PcInstance participant = World.getInstance().getPlayer(participantObjId);
- if (participant == null)
- continue;
- @@ -4615,7 +4615,7 @@
- {
- for (int participantObjId : _participants)
- {
- - L2PcInstance participant = L2World.getInstance().getPlayer(participantObjId);
- + L2PcInstance participant = World.getInstance().getPlayer(participantObjId);
- if (participant == null)
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java (working copy)
- @@ -30,8 +30,8 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- -import net.sf.l2j.gameserver.model.L2WorldRegion;
- +import net.sf.l2j.gameserver.model.World;
- +import net.sf.l2j.gameserver.model.WorldRegion;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- import net.sf.l2j.gameserver.model.zone.L2SpawnZone;
- @@ -82,9 +82,9 @@
- // remove zones from world
- int count = 0;
- - for (L2WorldRegion[] worldRegion : L2World.getInstance().getWorldRegions())
- + for (WorldRegion[] worldRegion : World.getInstance().getWorldRegions())
- {
- - for (L2WorldRegion element : worldRegion)
- + for (WorldRegion element : worldRegion)
- {
- element.getZones().clear();
- count++;
- @@ -101,7 +101,7 @@
- load();
- // revalidate objects in zones
- - for (L2Object o : L2World.getInstance().getObjects())
- + for (L2Object o : World.getInstance().getObjects())
- {
- if (o instanceof L2Character)
- ((L2Character) o).revalidateZone(true);
- @@ -111,7 +111,7 @@
- private final void load()
- {
- // Get the world regions
- - L2WorldRegion[][] worldRegions = L2World.getInstance().getWorldRegions();
- + WorldRegion[][] worldRegions = World.getInstance().getWorldRegions();
- // Load the zone xml
- try
- @@ -148,7 +148,7 @@
- _log.info("ZoneManager: Loaded " + _classZones.size() + " zones classes and total " + size + " zones.");
- }
- - private void loadFileZone(final File f, L2WorldRegion[][] worldRegions) throws Exception
- + private void loadFileZone(final File f, WorldRegion[][] worldRegions) throws Exception
- {
- final Document doc = XMLDocumentFactory.getInstance().loadDocument(f);
- for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
- @@ -317,7 +317,7 @@
- {
- for (int y = 0; y < worldRegions[x].length; y++)
- {
- - if (temp.getZone().intersectsRectangle(L2World.getRegionX(x), L2World.getRegionX(x + 1), L2World.getRegionY(y), L2World.getRegionY(y + 1)))
- + if (temp.getZone().intersectsRectangle(World.getRegionX(x), World.getRegionX(x + 1), World.getRegionY(y), World.getRegionY(y + 1)))
- {
- if (Config.DEBUG)
- _log.info("Zone (" + zoneId + ") added to: " + x + " " + y);
- @@ -469,7 +469,7 @@
- public List<L2ZoneType> getZones(int x, int y)
- {
- final List<L2ZoneType> temp = new ArrayList<>();
- - for (L2ZoneType zone : L2World.getInstance().getRegion(x, y).getZones())
- + for (L2ZoneType zone : World.getInstance().getRegion(x, y).getZones())
- {
- if (zone.isInsideZone(x, y))
- temp.add(zone);
- @@ -487,7 +487,7 @@
- public List<L2ZoneType> getZones(int x, int y, int z)
- {
- final List<L2ZoneType> temp = new ArrayList<>();
- - for (L2ZoneType zone : L2World.getInstance().getRegion(x, y).getZones())
- + for (L2ZoneType zone : World.getInstance().getRegion(x, y).getZones())
- {
- if (zone.isInsideZone(x, y, z))
- temp.add(zone);
- @@ -507,7 +507,7 @@
- @SuppressWarnings("unchecked")
- public <T extends L2ZoneType> T getZone(int x, int y, int z, Class<T> type)
- {
- - for (L2ZoneType zone : L2World.getInstance().getRegion(x, y).getZones())
- + for (L2ZoneType zone : World.getInstance().getRegion(x, y).getZones())
- {
- if (zone.isInsideZone(x, y, z) && type.isInstance(zone))
- return (T) zone;
- @@ -579,7 +579,7 @@
- }
- /**
- - * Remove all debug items from l2world
- + * Remove all debug items from the world.
- */
- public void clearDebugItems()
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java (working copy)
- @@ -38,7 +38,7 @@
- import net.sf.l2j.commons.random.Rnd;
- import net.sf.l2j.Config;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.L2GameClient;
- import net.sf.l2j.gameserver.network.L2GameClient.GameClientState;
- @@ -271,7 +271,7 @@
- sendPacket(st);
- - final Collection<L2PcInstance> players = L2World.getInstance().getPlayers();
- + final Collection<L2PcInstance> players = World.getInstance().getPlayers();
- if (!players.isEmpty())
- {
- final List<String> playerList = new ArrayList<>();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2CabaleBufferInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2CabaleBufferInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2CabaleBufferInstance.java (working copy)
- @@ -139,7 +139,7 @@
- final List<L2PcInstance> playersList = new ArrayList<>();
- final List<L2PcInstance> gmsList = new ArrayList<>();
- - for (L2PcInstance player : getKnownList().getKnownTypeInRadius(L2PcInstance.class, 900))
- + for (L2PcInstance player : getKnownTypeInRadius(L2PcInstance.class, 900))
- {
- if (player.isGM())
- gmsList.add(player);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2CastleTeleporterInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2CastleTeleporterInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2CastleTeleporterInstance.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.commons.concurrent.ThreadPool;
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- import net.sf.l2j.gameserver.network.serverpackets.NpcSay;
- @@ -102,7 +102,7 @@
- final NpcSay cs = new NpcSay(getObjectId(), 1, getNpcId(), "The defenders of " + getCastle().getName() + " castle have been teleported to the inner castle.");
- final int region = MapRegionTable.getMapRegion(getX(), getY());
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- if (region == MapRegionTable.getMapRegion(player.getX(), player.getY()))
- player.sendPacket(cs);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2DoorInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2DoorInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2DoorInstance.java (working copy)
- @@ -31,7 +31,6 @@
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.L2Playable;
- -import net.sf.l2j.gameserver.model.actor.knownlist.DoorKnownList;
- import net.sf.l2j.gameserver.model.actor.stat.DoorStat;
- import net.sf.l2j.gameserver.model.actor.status.DoorStatus;
- import net.sf.l2j.gameserver.model.actor.template.DoorTemplate;
- @@ -200,18 +199,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new DoorKnownList(this));
- - }
- -
- - @Override
- - public final DoorKnownList getKnownList()
- - {
- - return (DoorKnownList) super.getKnownList();
- - }
- -
- - @Override
- public void initCharStat()
- {
- setStat(new DoorStat(this));
- @@ -427,7 +414,7 @@
- @Override
- public void broadcastStatusUpdate()
- {
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- player.sendPacket(new DoorStatusUpdate(this, player));
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2FriendlyMobInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2FriendlyMobInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2FriendlyMobInstance.java (working copy)
- @@ -16,11 +16,11 @@
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- -import net.sf.l2j.gameserver.model.actor.knownlist.FriendlyMobKnownList;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- /**
- - * This class represents Friendly Mobs lying over the world. These friendly mobs should only attack players with karma > 0 and it is always aggro, since it just attacks players with karma
- + * This class represents Friendly Mobs lying over the world.<br>
- + * These friendly mobs should only attack players with karma > 0 and it is always aggro, since it just attacks players with karma.
- */
- public class L2FriendlyMobInstance extends L2Attackable
- {
- @@ -30,24 +30,9 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new FriendlyMobKnownList(this));
- - }
- -
- - @Override
- - public final FriendlyMobKnownList getKnownList()
- - {
- - return (FriendlyMobKnownList) super.getKnownList();
- - }
- -
- - @Override
- public boolean isAutoAttackable(L2Character attacker)
- {
- - if (attacker instanceof L2PcInstance)
- - return ((L2PcInstance) attacker).getKarma() > 0;
- -
- - return false;
- + return attacker instanceof L2PcInstance && ((L2PcInstance) attacker).getKarma() > 0;
- }
- @Override
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java (working copy)
- @@ -22,7 +22,6 @@
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- -import net.sf.l2j.gameserver.model.actor.knownlist.GuardKnownList;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn;
- @@ -45,18 +44,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new GuardKnownList(this));
- - }
- -
- - @Override
- - public final GuardKnownList getKnownList()
- - {
- - return (GuardKnownList) super.getKnownList();
- - }
- -
- - @Override
- public boolean isAutoAttackable(L2Character attacker)
- {
- return attacker instanceof L2MonsterInstance;
- @@ -97,21 +84,28 @@
- }
- else
- {
- + // Rotate the player to face the instance
- + player.sendPacket(new MoveToPawn(player, this, L2Npc.INTERACTION_DISTANCE));
- +
- + // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- +
- // Some guards have no HTMs on retail. Bypass the chat window if such guard is met.
- switch (getNpcId())
- {
- - case 31671:
- + case 30733: // Guards in start villages
- + case 31032:
- + case 31033:
- + case 31034:
- + case 31035:
- + case 31036:
- + case 31671: // Patrols
- case 31672:
- case 31673:
- case 31674:
- - // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
- - player.sendPacket(ActionFailed.STATIC_PACKET);
- return;
- }
- - // Rotate the player to face the instance
- - player.sendPacket(new MoveToPawn(player, this, L2Npc.INTERACTION_DISTANCE));
- -
- if (hasRandomAnimation())
- onRandomAnimation(Rnd.get(8));
- @@ -135,17 +129,8 @@
- }
- @Override
- - public boolean returnHome()
- + public int getDriftRange()
- {
- - getAggroList().clear();
- -
- - if (getMoveSpeed() > 0 && hasAI() && getSpawn() != null && !isInsideRadius(getSpawn().getLocX(), getSpawn().getLocY(), 20, false))
- - {
- - setIsReturningToSpawnPoint(true);
- - setWalking();
- - getAI().setIntention(CtrlIntention.MOVE_TO, getSpawn().getLoc());
- - return true;
- - }
- - return false;
- + return 20;
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2MonsterInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2MonsterInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2MonsterInstance.java (working copy)
- @@ -17,7 +17,6 @@
- import net.sf.l2j.gameserver.model.MinionList;
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- -import net.sf.l2j.gameserver.model.actor.knownlist.MonsterKnownList;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- /**
- @@ -49,18 +48,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new MonsterKnownList(this));
- - }
- -
- - @Override
- - public final MonsterKnownList getKnownList()
- - {
- - return (MonsterKnownList) super.getKnownList();
- - }
- -
- - @Override
- public boolean isAutoAttackable(L2Character attacker)
- {
- // FIXME: to test to allow monsters hit others monsters
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -94,13 +94,13 @@
- import net.sf.l2j.gameserver.model.L2Skill;
- import net.sf.l2j.gameserver.model.L2Skill.SkillTargetType;
- import net.sf.l2j.gameserver.model.L2SkillLearn;
- -import net.sf.l2j.gameserver.model.L2World;
- import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.MacroList;
- import net.sf.l2j.gameserver.model.PetDataEntry;
- import net.sf.l2j.gameserver.model.ShortCuts;
- import net.sf.l2j.gameserver.model.ShotType;
- import net.sf.l2j.gameserver.model.SpawnLocation;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- @@ -108,7 +108,6 @@
- import net.sf.l2j.gameserver.model.actor.L2Summon;
- import net.sf.l2j.gameserver.model.actor.L2Vehicle;
- import net.sf.l2j.gameserver.model.actor.appearance.PcAppearance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.PcKnownList;
- import net.sf.l2j.gameserver.model.actor.stat.PcStat;
- import net.sf.l2j.gameserver.model.actor.status.PcStatus;
- import net.sf.l2j.gameserver.model.actor.template.PcTemplate;
- @@ -160,6 +159,7 @@
- import net.sf.l2j.gameserver.network.serverpackets.ChangeWaitType;
- import net.sf.l2j.gameserver.network.serverpackets.CharInfo;
- import net.sf.l2j.gameserver.network.serverpackets.ConfirmDlg;
- +import net.sf.l2j.gameserver.network.serverpackets.DeleteObject;
- import net.sf.l2j.gameserver.network.serverpackets.EtcStatusUpdate;
- import net.sf.l2j.gameserver.network.serverpackets.ExAutoSoulShot;
- import net.sf.l2j.gameserver.network.serverpackets.ExDuelUpdateUserInfo;
- @@ -200,11 +200,13 @@
- import net.sf.l2j.gameserver.network.serverpackets.SendTradeDone;
- import net.sf.l2j.gameserver.network.serverpackets.ServerClose;
- import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- import net.sf.l2j.gameserver.network.serverpackets.ShortBuffStatusUpdate;
- import net.sf.l2j.gameserver.network.serverpackets.ShortCutInit;
- import net.sf.l2j.gameserver.network.serverpackets.SkillCoolTime;
- import net.sf.l2j.gameserver.network.serverpackets.SkillList;
- import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
- +import net.sf.l2j.gameserver.network.serverpackets.SpawnItem;
- import net.sf.l2j.gameserver.network.serverpackets.StaticObject;
- import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
- import net.sf.l2j.gameserver.network.serverpackets.StopMove;
- @@ -389,7 +391,6 @@
- private int _lastCompassZone; // the last compass zone update send to the client
- - private boolean _isInWater;
- private boolean _isIn7sDungeon;
- private PunishLevel _punishLevel = PunishLevel.NONE;
- @@ -599,7 +600,6 @@
- private ScheduledFuture<?> _shortBuffTask;
- private int _shortBuffTaskSkillId;
- - private boolean _isMarried;
- private int _coupleId;
- private boolean _isUnderMarryRequest;
- private int _requesterId;
- @@ -765,18 +765,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new PcKnownList(this));
- - }
- -
- - @Override
- - public final PcKnownList getKnownList()
- - {
- - return (PcKnownList) super.getKnownList();
- - }
- -
- - @Override
- public void initCharStat()
- {
- setStat(new PcStat(this));
- @@ -1052,7 +1040,7 @@
- if (qs == null)
- return;
- - L2Object object = L2World.getInstance().getObject(getLastQuestNpcObject());
- + L2Object object = World.getInstance().getObject(getLastQuestNpcObject());
- if (!(object instanceof L2Npc) || !isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
- return;
- @@ -1263,7 +1251,12 @@
- super.revalidateZone(force);
- if (Config.ALLOW_WATER)
- - checkWaterState();
- + {
- + if (isInsideZone(ZoneId.WATER))
- + WaterTaskManager.getInstance().add(this);
- + else
- + WaterTaskManager.getInstance().remove(this);
- + }
- if (isInsideZone(ZoneId.SIEGE))
- {
- @@ -2247,7 +2240,7 @@
- {
- if (_throneId != 0)
- {
- - final L2Object object = L2World.getInstance().getObject(_throneId);
- + final L2Object object = World.getInstance().getObject(_throneId);
- if (object instanceof L2StaticObjectInstance)
- ((L2StaticObjectInstance) object).setBusy(false);
- @@ -2284,7 +2277,7 @@
- {
- if (_throneId != 0)
- {
- - final L2Object object = L2World.getInstance().getObject(_throneId);
- + final L2Object object = World.getInstance().getObject(_throneId);
- if (object instanceof L2StaticObjectInstance)
- ((L2StaticObjectInstance) object).setBusy(false);
- @@ -2934,7 +2927,7 @@
- public ItemInstance checkItemManipulation(int objectId, int count)
- {
- - if (L2World.getInstance().getObject(objectId) == null)
- + if (World.getInstance().getObject(objectId) == null)
- return null;
- final ItemInstance item = getInventory().getItemByObjectId(objectId);
- @@ -3312,7 +3305,7 @@
- public final void broadcastCharInfo()
- {
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- {
- player.sendPacket(new CharInfo(this));
- @@ -3799,16 +3792,6 @@
- return armor.getItemType() instanceof ArmorType && armor.getItemType() == type;
- }
- - public boolean isMarried()
- - {
- - return _isMarried;
- - }
- -
- - public void setMarried(boolean state)
- - {
- - _isMarried = state;
- - }
- -
- public boolean isUnderMarryRequest()
- {
- return _isUnderMarryRequest;
- @@ -3834,29 +3817,29 @@
- _requesterId = requesterId;
- }
- - public void EngageAnswer(int answer)
- + public void engageAnswer(int answer)
- {
- if (!_isUnderMarryRequest || _requesterId == 0)
- return;
- - L2PcInstance ptarget = L2World.getInstance().getPlayer(_requesterId);
- - if (ptarget != null)
- + final L2PcInstance requester = World.getInstance().getPlayer(_requesterId);
- + if (requester != null)
- {
- if (answer == 1)
- {
- // Create the couple
- - CoupleManager.getInstance().createCouple(ptarget, this);
- + CoupleManager.getInstance().addCouple(requester, this);
- // Then "finish the job"
- - L2WeddingManagerInstance.justMarried(ptarget, this);
- + L2WeddingManagerInstance.justMarried(requester, this);
- }
- else
- {
- setUnderMarryRequest(false);
- sendMessage("You declined your partner's marriage request.");
- - ptarget.setUnderMarryRequest(false);
- - ptarget.sendMessage("Your partner declined your marriage request.");
- + requester.setUnderMarryRequest(false);
- + requester.sendMessage("Your partner declined your marriage request.");
- }
- }
- }
- @@ -3966,7 +3949,7 @@
- if (_fusionSkill != null)
- abortCast();
- - for (L2Character character : getKnownList().getKnownType(L2Character.class))
- + for (L2Character character : getKnownType(L2Character.class))
- if (character.getFusionSkill() != null && character.getFusionSkill().getTarget() == this)
- character.abortCast();
- @@ -3976,7 +3959,7 @@
- // calculate death penalty buff
- calculateDeathPenaltyBuffLevel(killer);
- - stopWaterTask();
- + WaterTaskManager.getInstance().remove(this);
- if (isPhoenixBlessed() || (isAffected(L2EffectFlag.CHARM_OF_COURAGE) && isInSiege()))
- reviveRequest(this, null, false);
- @@ -4269,7 +4252,7 @@
- public void stopAllTimers()
- {
- stopHpMpRegeneration();
- - stopWaterTask();
- + WaterTaskManager.getInstance().remove(this);
- stopFeed();
- _petTemplate = null;
- @@ -4892,7 +4875,8 @@
- public boolean dismount()
- {
- - sendPacket(new SetupGauge(3, 0, 0));
- + sendPacket(new SetupGauge(GaugeColor.GREEN, 0));
- +
- int petId = _mountNpcId;
- if (setMount(0, 0, 0))
- {
- @@ -4982,14 +4966,14 @@
- {
- setCurrentFeed(((L2PetInstance) getPet()).getCurrentFed());
- _controlItemId = getPet().getControlItemId();
- - sendPacket(new SetupGauge(3, getCurrentFeed() * 10000 / getFeedConsume(), _petData.getMaxMeal() * 10000 / getFeedConsume()));
- + sendPacket(new SetupGauge(GaugeColor.GREEN, getCurrentFeed() * 10000 / getFeedConsume(), _petData.getMaxMeal() * 10000 / getFeedConsume()));
- if (!isDead())
- _mountFeedTask = ThreadPool.scheduleAtFixedRate(new FeedTask(), 10000, 10000);
- }
- else if (_canFeed)
- {
- setCurrentFeed(_petData.getMaxMeal());
- - sendPacket(new SetupGauge(3, getCurrentFeed() * 10000 / getFeedConsume(), _petData.getMaxMeal() * 10000 / getFeedConsume()));
- + sendPacket(new SetupGauge(GaugeColor.GREEN, getCurrentFeed() * 10000 / getFeedConsume(), _petData.getMaxMeal() * 10000 / getFeedConsume()));
- if (!isDead())
- _mountFeedTask = ThreadPool.scheduleAtFixedRate(new FeedTask(), 10000, 10000);
- }
- @@ -5026,8 +5010,9 @@
- public void setCurrentFeed(int num)
- {
- - _curFeed = (num > _petData.getMaxMeal()) ? _petData.getMaxMeal() : num;
- - sendPacket(new SetupGauge(3, getCurrentFeed() * 10000 / getFeedConsume(), _petData.getMaxMeal() * 10000 / getFeedConsume()));
- + _curFeed = Math.min(num, _petData.getMaxMeal());
- +
- + sendPacket(new SetupGauge(GaugeColor.GREEN, getCurrentFeed() * 10000 / getFeedConsume(), _petData.getMaxMeal() * 10000 / getFeedConsume()));
- }
- /**
- @@ -5266,10 +5251,9 @@
- }
- /**
- - * Retrieve a L2PcInstance from the characters table of the database and add it in _allObjects of the L2world.
- + * Retrieve a L2PcInstance from the characters table of the database.
- * <ul>
- * <li>Retrieve the L2PcInstance from the characters table of the database</li>
- - * <li>Add the L2PcInstance object in _allObjects</li>
- * <li>Set the x,y,z position of the L2PcInstance and make it invisible</li>
- * <li>Update the overloaded status of the L2PcInstance</li>
- * </ul>
- @@ -5402,7 +5386,7 @@
- player.setDeathPenaltyBuffLevel(rset.getInt("death_penalty_level"));
- // Set the x,y,z position of the L2PcInstance and make it invisible
- - player.setXYZInvisible(rset.getInt("x"), rset.getInt("y"), rset.getInt("z"));
- + player.getPosition().set(rset.getInt("x"), rset.getInt("y"), rset.getInt("z"));
- // Set Hero status if it applies
- if (Hero.getInstance().isActiveHero(objectId))
- @@ -5434,7 +5418,7 @@
- }
- // Restore pet if exists in the world
- - player.setPet(L2World.getInstance().getPet(player.getObjectId()));
- + player.setPet(World.getInstance().getPet(player.getObjectId()));
- if (player.getPet() != null)
- player.getPet().setOwner(player);
- @@ -6763,13 +6747,6 @@
- if (skill.isSiegeSummonSkill() && (!SiegeManager.checkIfOkToSummon(this) || !SevenSigns.getInstance().checkSummonConditions(this)))
- return false;
- - // Check if this skill is enabled (ex : reuse time)
- - if (isSkillDisabled(skill))
- - {
- - sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_PREPARED_FOR_REUSE).addSkillName(skill));
- - return false;
- - }
- -
- // ************************************* Check casting conditions *******************************************
- // Check if all casting conditions are completed
- @@ -7067,7 +7044,7 @@
- if (objectId == getObjectId())
- return true;
- - final L2PcInstance looter = L2World.getInstance().getPlayer(objectId);
- + final L2PcInstance looter = World.getInstance().getPlayer(objectId);
- if (looter == null)
- return false;
- @@ -7643,7 +7620,6 @@
- getAppearance().setInvisible();
- sendPacket(new ObservationMode(x, y, z));
- - getKnownList().removeAllKnownObjects(); // reinit knownlist
- setXYZ(x, y, z);
- broadcastUserInfo();
- @@ -7679,7 +7655,6 @@
- public void leaveObserverMode()
- {
- setTarget(null);
- - getKnownList().removeAllKnownObjects(); // reinit knownlist
- setXYZ(_savedLocation.getX(), _savedLocation.getY(), _savedLocation.getZ());
- setIsParalyzed(false);
- stopParalyze(false);
- @@ -8293,7 +8268,7 @@
- abortCast();
- // Stop casting for any player that may be casting a force buff on this l2pcinstance.
- - for (L2Character character : getKnownList().getKnownType(L2Character.class))
- + for (L2Character character : getKnownType(L2Character.class))
- if (character.getFusionSkill() != null && character.getFusionSkill().getTarget() == this)
- character.abortCast();
- @@ -8402,36 +8377,6 @@
- return _subclassLock.isLocked();
- }
- - public void stopWaterTask()
- - {
- - if (_isInWater)
- - {
- - _isInWater = false;
- - sendPacket(new SetupGauge(2, 0));
- - WaterTaskManager.getInstance().remove(this);
- - }
- - }
- -
- - public void startWaterTask()
- - {
- - if (!isDead() && !_isInWater)
- - {
- - _isInWater = true;
- - final int time = (int) calcStat(Stats.BREATH, 60000 * getRace().getBreathMultiplier(), this, null);
- -
- - sendPacket(new SetupGauge(2, time));
- - WaterTaskManager.getInstance().add(this, time);
- - }
- - }
- -
- - public void checkWaterState()
- - {
- - if (isInsideZone(ZoneId.WATER))
- - startWaterTask();
- - else
- - stopWaterTask();
- - }
- -
- public void onPlayerEnter()
- {
- if (isCursedWeaponEquipped())
- @@ -8914,7 +8859,7 @@
- stopAllTimers();
- // Cancel the cast of eventual fusion skill users on this target.
- - for (L2Character character : getKnownList().getKnownType(L2Character.class))
- + for (L2Character character : getKnownType(L2Character.class))
- if (character.getFusionSkill() != null && character.getFusionSkill().getTarget() == this)
- character.abortCast();
- @@ -8970,10 +8915,9 @@
- if (isGM())
- GmListTable.getInstance().deleteGm(this);
- - // Check if the L2PcInstance is in observer mode to set its position to its position
- - // before entering in observer mode
- + // Check if the L2PcInstance is in observer mode to set its position to its position before entering in observer mode
- if (inObserverMode())
- - setXYZInvisible(_savedLocation.getX(), _savedLocation.getY(), _savedLocation.getZ());
- + setXYZInvisible(_savedLocation);
- // Oust player from boat
- if (getVehicle() != null)
- @@ -8992,20 +8936,17 @@
- if (isCursedWeaponEquipped())
- CursedWeaponsManager.getInstance().getCursedWeapon(_cursedWeaponEquippedId).setPlayer(null);
- - // Remove all L2Object from _knownObjects and _knownPlayer of the L2Character then cancel Attak or Cast and notify AI
- - getKnownList().removeAllKnownObjects();
- -
- if (getClanId() > 0)
- getClan().broadcastToOtherOnlineMembers(new PledgeShowMemberListUpdate(this), this);
- if (isSeated())
- {
- - final L2Object object = L2World.getInstance().getObject(_throneId);
- + final L2Object object = World.getInstance().getObject(_throneId);
- if (object instanceof L2StaticObjectInstance)
- ((L2StaticObjectInstance) object).setBusy(false);
- }
- - L2World.getInstance().removePlayer(this); // force remove in case of crash during teleport
- + World.getInstance().removePlayer(this); // force remove in case of crash during teleport
- // friends & blocklist update
- notifyFriends(false);
- @@ -10382,7 +10323,7 @@
- {
- for (int id : _friendList)
- {
- - L2PcInstance friend = L2World.getInstance().getPlayer(id);
- + L2PcInstance friend = World.getInstance().getPlayer(id);
- if (friend != null)
- {
- friend.sendPacket(new FriendList(friend));
- @@ -10413,7 +10354,7 @@
- @Override
- public void broadcastRelationsChanges()
- {
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- {
- final int relation = getRelation(player);
- final boolean isAutoAttackable = isAutoAttackable(player);
- @@ -10438,7 +10379,7 @@
- if (isSeated())
- {
- - final L2Object object = L2World.getInstance().getObject(_throneId);
- + final L2Object object = World.getInstance().getObject(_throneId);
- if (object instanceof L2StaticObjectInstance)
- activeChar.sendPacket(new ChairSit(getObjectId(), ((L2StaticObjectInstance) object).getStaticObjectId()));
- }
- @@ -10552,9 +10493,47 @@
- }
- @Override
- - protected void badCoords()
- + public void addKnownObject(L2Object object)
- {
- - teleToLocation(0, 0, 0, 0);
- - sendMessage("Error with your coords, Please ask a GM for help!");
- + sendInfoFrom(object);
- }
- +
- + @Override
- + public void removeKnownObject(L2Object object)
- + {
- + super.removeKnownObject(object);
- +
- + // send Server-Client Packet DeleteObject to the L2PcInstance
- + sendPacket(new DeleteObject(object, (object instanceof L2PcInstance) && ((L2PcInstance) object).isSeated()));
- + }
- +
- + public final void refreshInfos()
- + {
- + for (L2Object object : getKnownType(L2Object.class))
- + {
- + if (object instanceof L2PcInstance && ((L2PcInstance) object).inObserverMode())
- + continue;
- +
- + sendInfoFrom(object);
- + }
- + }
- +
- + private final void sendInfoFrom(L2Object object)
- + {
- + if (object.getPolyType() == PolyType.ITEM)
- + sendPacket(new SpawnItem(object));
- + else
- + {
- + // send object info to player
- + object.sendInfo(this);
- +
- + if (object instanceof L2Character)
- + {
- + // Update the state of the L2Character object client side by sending Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the L2PcInstance
- + L2Character obj = (L2Character) object;
- + if (obj.hasAI())
- + obj.getAI().describeStateToPlayer(this);
- + }
- + }
- + }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PetInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PetInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PetInstance.java (working copy)
- @@ -38,8 +38,8 @@
- import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Party;
- import net.sf.l2j.gameserver.model.L2Skill;
- -import net.sf.l2j.gameserver.model.L2World;
- import net.sf.l2j.gameserver.model.PetDataEntry;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Summon;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.TimeStamp;
- @@ -174,39 +174,17 @@
- }
- }
- - public synchronized static L2PetInstance spawnPet(NpcTemplate template, L2PcInstance owner, ItemInstance control)
- - {
- - // Owner has a pet listed in world.
- - if (L2World.getInstance().getPet(owner.getObjectId()) != null)
- - return null;
- -
- - // Add the pet instance to world.
- - final L2PetInstance pet = restore(control, template, owner);
- - if (pet != null)
- - {
- - pet.setTitle(owner.getName());
- - L2World.getInstance().addPet(owner.getObjectId(), pet);
- - }
- -
- - return pet;
- - }
- -
- public L2PetInstance(int objectId, NpcTemplate template, L2PcInstance owner, ItemInstance control)
- {
- super(objectId, template, owner);
- + getPosition().set(owner.getX() + 50, owner.getY() + 100, owner.getZ());
- +
- _controlItemId = control.getObjectId();
- - if (template.getNpcId() == 12564)
- - getStat().setLevel((byte) getOwner().getLevel());
- - else
- - getStat().setLevel(template.getLevel());
- -
- _inventory = new PetInventory(this);
- - _inventory.restore();
- _mountable = isMountable(template.getNpcId());
- - _petData = getTemplate().getPetDataEntry(getLevel());
- }
- @Override
- @@ -396,6 +374,13 @@
- return;
- }
- + // Can't pickup shots and arrows.
- + if (target.getItem().getItemType() == EtcItemType.ARROW || target.getItem().getItemType() == EtcItemType.SHOT)
- + {
- + getOwner().sendPacket(SystemMessageId.ITEM_NOT_FOR_PETS);
- + return;
- + }
- +
- synchronized (target)
- {
- if (!target.isVisible())
- @@ -562,9 +547,6 @@
- petIU.addRemovedItem(oldItem);
- sendPacket(petIU);
- - // Update pet current load aswell
- - updateAndBroadcastStatus(1);
- -
- // Send player inventory update packet
- InventoryUpdate playerIU = new InventoryUpdate();
- if (newItem.getCount() > count)
- @@ -606,7 +588,7 @@
- public void destroyControlItem(L2PcInstance owner)
- {
- // remove the pet instance from world
- - L2World.getInstance().removePet(owner.getObjectId());
- + World.getInstance().removePet(owner.getObjectId());
- // delete from inventory
- try
- @@ -628,7 +610,7 @@
- owner.broadcastUserInfo();
- - L2World.getInstance().removeObject(removedItem);
- + World.getInstance().removeObject(removedItem);
- }
- }
- catch (Exception e)
- @@ -657,7 +639,7 @@
- return _mountable;
- }
- - private static L2PetInstance restore(ItemInstance control, NpcTemplate template, L2PcInstance owner)
- + public static L2PetInstance restore(ItemInstance control, NpcTemplate template, L2PcInstance owner)
- {
- try (Connection con = L2DatabaseFactory.getInstance().getConnection())
- {
- @@ -674,6 +656,14 @@
- {
- rset.close();
- statement.close();
- +
- + pet.getStat().setLevel((template.getNpcId() == 12564) ? (byte) pet.getOwner().getLevel() : template.getLevel());
- + pet.getStat().setExp(pet.getExpForThisLevel());
- + pet.getStatus().setCurrentHp(pet.getMaxHp());
- + pet.getStatus().setCurrentMp(pet.getMaxMp());
- + pet.setCurrentFed(pet.getPetData().getMaxMeal());
- + pet.store();
- +
- return pet;
- }
- @@ -686,7 +676,6 @@
- pet.getStatus().setCurrentHp(rset.getDouble("curHp"));
- pet.getStatus().setCurrentMp(rset.getDouble("curMp"));
- - pet.getStatus().setCurrentCp(pet.getMaxCp());
- if (rset.getDouble("curHp") < 0.5)
- {
- pet.setIsDead(true);
- @@ -782,7 +771,7 @@
- // Drop pet from world's pet list.
- if (!isDead())
- - L2World.getInstance().removePet(owner.getObjectId());
- + World.getInstance().removePet(owner.getObjectId());
- }
- /**
- @@ -854,8 +843,8 @@
- int oldOwnerId = getOwner().getObjectId();
- setOwner(owner);
- - L2World.getInstance().removePet(oldOwnerId);
- - L2World.getInstance().addPet(oldOwnerId, this);
- + World.getInstance().removePet(oldOwnerId);
- + World.getInstance().addPet(oldOwnerId, this);
- }
- public int getCurrentLoad()
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2RaceManagerInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2RaceManagerInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2RaceManagerInstance.java (working copy)
- @@ -23,11 +23,13 @@
- import net.sf.l2j.gameserver.instancemanager.games.MonsterRace;
- import net.sf.l2j.gameserver.instancemanager.games.MonsterRace.HistoryInfo;
- import net.sf.l2j.gameserver.instancemanager.games.MonsterRace.RaceState;
- -import net.sf.l2j.gameserver.model.actor.knownlist.RaceManagerKnownList;
- +import net.sf.l2j.gameserver.model.L2Object;
- +import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- +import net.sf.l2j.gameserver.network.serverpackets.DeleteObject;
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -51,18 +53,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new RaceManagerKnownList(this));
- - }
- -
- - @Override
- - public final RaceManagerKnownList getKnownList()
- - {
- - return (RaceManagerKnownList) super.getKnownList();
- - }
- -
- - @Override
- public void onBypassFeedback(L2PcInstance player, String command)
- {
- if (command.startsWith("BuyTicket"))
- @@ -345,4 +335,25 @@
- else
- super.onBypassFeedback(player, command);
- }
- +
- + @Override
- + public void addKnownObject(L2Object object)
- + {
- + if (object instanceof L2PcInstance)
- + ((L2PcInstance) object).sendPacket(MonsterRace.getInstance().getRacePacket());
- + }
- +
- + @Override
- + public void removeKnownObject(L2Object object)
- + {
- + super.removeKnownObject(object);
- +
- + if (object instanceof L2PcInstance)
- + {
- + final L2PcInstance player = ((L2PcInstance) object);
- +
- + for (L2Npc npc : MonsterRace.getInstance().getMonsters())
- + player.sendPacket(new DeleteObject(npc));
- + }
- + }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SepulcherNpcInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SepulcherNpcInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SepulcherNpcInstance.java (working copy)
- @@ -23,7 +23,7 @@
- import net.sf.l2j.gameserver.ai.CtrlIntention;
- import net.sf.l2j.gameserver.datatables.DoorTable;
- import net.sf.l2j.gameserver.instancemanager.FourSepulchersManager;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -374,7 +374,7 @@
- return;// wrong usage
- final CreatureSay sm = new CreatureSay(0, Say2.SHOUT, getName(), msg);
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- if (Util.checkIfInRange(15000, player, this, true))
- player.sendPacket(sm);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SiegeGuardInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SiegeGuardInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SiegeGuardInstance.java (working copy)
- @@ -20,7 +20,6 @@
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- -import net.sf.l2j.gameserver.model.actor.knownlist.SiegeGuardKnownList;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn;
- @@ -36,18 +35,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new SiegeGuardKnownList(this));
- - }
- -
- - @Override
- - public final SiegeGuardKnownList getKnownList()
- - {
- - return (SiegeGuardKnownList) super.getKnownList();
- - }
- -
- - @Override
- public L2CharacterAI getAI()
- {
- L2CharacterAI ai = _ai;
- @@ -131,17 +118,8 @@
- }
- @Override
- - public boolean returnHome()
- + public int getDriftRange()
- {
- - getAggroList().clear();
- -
- - if (getMoveSpeed() > 0 && hasAI() && getSpawn() != null && !isInsideRadius(getSpawn().getLocX(), getSpawn().getLocY(), 20, false))
- - {
- - setIsReturningToSpawnPoint(true);
- - setWalking();
- - getAI().setIntention(CtrlIntention.MOVE_TO, getSpawn().getLoc());
- - return true;
- - }
- - return false;
- + return 20;
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SummonInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SummonInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SummonInstance.java (working copy)
- @@ -49,7 +49,6 @@
- public L2SummonInstance(int objectId, NpcTemplate template, L2PcInstance owner, L2Skill skill)
- {
- super(objectId, template, owner);
- - setShowSummonAnimation(true);
- if (skill != null)
- {
- @@ -161,7 +160,7 @@
- return false;
- // Send aggro of mobs to summoner.
- - for (L2Attackable mob : getKnownList().getKnownType(L2Attackable.class))
- + for (L2Attackable mob : getKnownType(L2Attackable.class))
- {
- if (mob.isDead())
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2WeddingManagerInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2WeddingManagerInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2WeddingManagerInstance.java (working copy)
- @@ -23,11 +23,9 @@
- import net.sf.l2j.gameserver.datatables.SkillTable.FrequentSkill;
- import net.sf.l2j.gameserver.instancemanager.CastleManager;
- import net.sf.l2j.gameserver.instancemanager.CoupleManager;
- -import net.sf.l2j.gameserver.model.L2Skill;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- -import net.sf.l2j.gameserver.model.entity.Couple;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- @@ -37,9 +35,6 @@
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- import net.sf.l2j.gameserver.util.Broadcast;
- -/**
- - * @author evill33t & squeezed, rework Tryskell
- - */
- public class L2WeddingManagerInstance extends L2NpcInstance
- {
- public L2WeddingManagerInstance(int objectId, NpcTemplate template)
- @@ -68,18 +63,18 @@
- // Shouldn't be able to see wedding content if the mod isn't activated on configs
- if (!Config.ALLOW_WEDDING)
- - sendHtmlMessage(player, "data/html/mods/Wedding_disabled.htm");
- + sendHtmlMessage(player, "data/html/mods/wedding/disabled.htm");
- else
- {
- // Married people got access to another menu
- - if (player.isMarried())
- - sendHtmlMessage(player, "data/html/mods/Wedding_start2.htm");
- + if (player.getCoupleId() > 0)
- + sendHtmlMessage(player, "data/html/mods/wedding/start2.htm");
- // "Under marriage acceptance" people go to this one
- else if (player.isUnderMarryRequest())
- - sendHtmlMessage(player, "data/html/mods/Wedding_waitforpartner.htm");
- + sendHtmlMessage(player, "data/html/mods/wedding/waitforpartner.htm");
- // And normal players go here :)
- else
- - sendHtmlMessage(player, "data/html/mods/Wedding_start.htm");
- + sendHtmlMessage(player, "data/html/mods/wedding/start.htm");
- }
- }
- }
- @@ -95,43 +90,41 @@
- if (st.hasMoreTokens())
- {
- - final L2PcInstance ptarget = L2World.getInstance().getPlayer(st.nextToken());
- - if (ptarget == null)
- + final L2PcInstance partner = World.getInstance().getPlayer(st.nextToken());
- + if (partner == null)
- {
- - sendHtmlMessage(player, "data/html/mods/Wedding_notfound.htm");
- + sendHtmlMessage(player, "data/html/mods/wedding/notfound.htm");
- return;
- }
- // check conditions
- - if (!weddingConditions(player, ptarget))
- + if (!weddingConditions(player, partner))
- return;
- // block the wedding manager until an answer is given.
- player.setUnderMarryRequest(true);
- - ptarget.setUnderMarryRequest(true);
- + partner.setUnderMarryRequest(true);
- // memorize the requesterId for future use, and send a popup to the target
- - ptarget.setRequesterId(player.getObjectId());
- - ptarget.sendPacket(new ConfirmDlg(1983).addString(player.getName() + " asked you to marry. Do you want to start a new relationship ?"));
- + partner.setRequesterId(player.getObjectId());
- + partner.sendPacket(new ConfirmDlg(1983).addString(player.getName() + " asked you to marry. Do you want to start a new relationship ?"));
- }
- else
- - sendHtmlMessage(player, "data/html/mods/Wedding_notfound.htm");
- + sendHtmlMessage(player, "data/html/mods/wedding/notfound.htm");
- }
- else if (command.startsWith("Divorce"))
- - {
- - player.sendMessage("You are now divorced.");
- -
- - // Find the partner using the couple information
- - final L2PcInstance partner = L2World.getInstance().getPlayer(Couple.getPartnerId(player.getObjectId()));
- - if (partner != null)
- - partner.sendMessage("Your beloved has decided to divorce.");
- -
- CoupleManager.getInstance().deleteCouple(player.getCoupleId());
- - }
- else if (command.startsWith("GoToLove"))
- {
- - // Find the partner using the couple information
- - final L2PcInstance partner = L2World.getInstance().getPlayer(Couple.getPartnerId(player.getObjectId()));
- + // Find the partner using the couple id.
- + final int partnerId = CoupleManager.getInstance().getPartnerId(player.getCoupleId(), player.getObjectId());
- + if (partnerId == 0)
- + {
- + player.sendMessage("Your partner can't be found.");
- + return;
- + }
- +
- + final L2PcInstance partner = World.getInstance().getPlayer(partnerId);
- if (partner == null)
- {
- player.sendMessage("Your partner is not online.");
- @@ -175,85 +168,76 @@
- return true;
- }
- - private boolean weddingConditions(L2PcInstance player, L2PcInstance ptarget)
- + private boolean weddingConditions(L2PcInstance requester, L2PcInstance partner)
- {
- // Check if player target himself
- - if (ptarget.getObjectId() == player.getObjectId())
- + if (partner.getObjectId() == requester.getObjectId())
- {
- - sendHtmlMessage(player, "data/html/mods/Wedding_error_wrongtarget.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_wrongtarget.htm");
- return false;
- }
- // Sex check
- - if (ptarget.getAppearance().getSex() == player.getAppearance().getSex() && !Config.WEDDING_SAMESEX)
- + if (!Config.WEDDING_SAMESEX && partner.getAppearance().getSex() == requester.getAppearance().getSex())
- {
- - sendHtmlMessage(player, "data/html/mods/Wedding_error_sex.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_sex.htm");
- return false;
- }
- // Check if player has the target on friendlist
- - if (!player.getFriendList().contains(ptarget.getObjectId()))
- + if (!requester.getFriendList().contains(partner.getObjectId()))
- {
- - sendHtmlMessage(player, "data/html/mods/Wedding_error_friendlist.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_friendlist.htm");
- return false;
- }
- // Target mustn't be already married
- - if (ptarget.isMarried())
- + if (partner.getCoupleId() > 0)
- {
- - sendHtmlMessage(player, "data/html/mods/Wedding_error_alreadymarried.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_alreadymarried.htm");
- return false;
- }
- // Check for Formal Wear
- - if (Config.WEDDING_FORMALWEAR)
- - if (!wearsFormalWear(player, ptarget))
- - {
- - sendHtmlMessage(player, "data/html/mods/Wedding_error_noformal.htm");
- - return false;
- - }
- + if (Config.WEDDING_FORMALWEAR && !wearsFormalWear(requester, partner))
- + {
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_noformal.htm");
- + return false;
- + }
- // Check and reduce wedding price
- - if (player.getAdena() < Config.WEDDING_PRICE || ptarget.getAdena() < Config.WEDDING_PRICE)
- + if (requester.getAdena() < Config.WEDDING_PRICE || partner.getAdena() < Config.WEDDING_PRICE)
- {
- - sendHtmlMessage(player, "data/html/mods/Wedding_error_adena.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_adena.htm");
- return false;
- }
- return true;
- }
- - public static void justMarried(L2PcInstance player, L2PcInstance ptarget)
- + public static void justMarried(L2PcInstance requester, L2PcInstance partner)
- {
- // Unlock the wedding manager for both users, and set them as married
- - player.setUnderMarryRequest(false);
- - ptarget.setUnderMarryRequest(false);
- + requester.setUnderMarryRequest(false);
- + partner.setUnderMarryRequest(false);
- - player.setMarried(true);
- - ptarget.setMarried(true);
- -
- // reduce adenas amount according to configs
- - player.reduceAdena("Wedding", Config.WEDDING_PRICE, player.getCurrentFolkNPC(), true);
- - ptarget.reduceAdena("Wedding", Config.WEDDING_PRICE, player.getCurrentFolkNPC(), true);
- + requester.reduceAdena("Wedding", Config.WEDDING_PRICE, requester.getCurrentFolkNPC(), true);
- + partner.reduceAdena("Wedding", Config.WEDDING_PRICE, requester.getCurrentFolkNPC(), true);
- - // Flag players as married
- - Couple couple = CoupleManager.getInstance().getCouple(player.getCoupleId());
- - couple.marry();
- -
- // Messages to the couple
- - player.sendMessage("Congratulations, you are now married with " + ptarget.getName() + " !");
- - ptarget.sendMessage("Congratulations, you are now married with " + player.getName() + " !");
- + requester.sendMessage("Congratulations, you are now married with " + partner.getName() + " !");
- + partner.sendMessage("Congratulations, you are now married with " + requester.getName() + " !");
- // Wedding march
- - player.broadcastPacket(new MagicSkillUse(player, player, 2230, 1, 1, 0));
- - ptarget.broadcastPacket(new MagicSkillUse(ptarget, ptarget, 2230, 1, 1, 0));
- + requester.broadcastPacket(new MagicSkillUse(requester, requester, 2230, 1, 1, 0));
- + partner.broadcastPacket(new MagicSkillUse(partner, partner, 2230, 1, 1, 0));
- // Fireworks
- - L2Skill skill = FrequentSkill.LARGE_FIREWORK.getSkill();
- - player.doCast(skill);
- - ptarget.doCast(skill);
- + requester.doCast(FrequentSkill.LARGE_FIREWORK.getSkill());
- + partner.doCast(FrequentSkill.LARGE_FIREWORK.getSkill());
- - Broadcast.announceToOnlinePlayers("Congratulations to " + player.getName() + " and " + ptarget.getName() + "! They have been married.");
- + Broadcast.announceToOnlinePlayers("Congratulations to " + requester.getName() + " and " + partner.getName() + "! They have been married.");
- }
- private void sendHtmlMessage(L2PcInstance player, String file)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2XmassTreeInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2XmassTreeInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2XmassTreeInstance.java (working copy)
- @@ -62,7 +62,7 @@
- return;
- }
- - for (L2PcInstance player : getKnownList().getKnownTypeInRadius(L2PcInstance.class, 200))
- + for (L2PcInstance player : getKnownTypeInRadius(L2PcInstance.class, 200))
- {
- if (player.getFirstEffect(_skill.getId()) == null)
- _skill.getEffects(player, player);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (working copy)
- @@ -44,7 +44,6 @@
- import net.sf.l2j.gameserver.model.RewardInfo;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.AttackableKnownList;
- import net.sf.l2j.gameserver.model.actor.status.AttackableStatus;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.model.holder.IntIntHolder;
- @@ -94,18 +93,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new AttackableKnownList(this));
- - }
- -
- - @Override
- - public AttackableKnownList getKnownList()
- - {
- - return (AttackableKnownList) super.getKnownList();
- - }
- -
- - @Override
- public void initCharStatus()
- {
- setStatus(new AttackableStatus(this));
- @@ -311,7 +298,7 @@
- if (attackerParty == null)
- {
- // Calculate Exp and SP rewards.
- - if (attacker.getKnownList().knowsObject(this) && !attacker.isDead())
- + if (!attacker.isDead() && attacker.getKnownType(L2Attackable.class).contains(this))
- {
- // Calculate the difference of level between this attacker and the L2Attackable.
- final int levelDiff = attacker.getLevel() - getLevel();
- @@ -1218,11 +1205,12 @@
- getAI().setIntention(CtrlIntention.CAST, skill, target);
- }
- - public boolean returnHome()
- + public final boolean returnHome(boolean cleanAggro)
- {
- - _aggroList.clear();
- + if (cleanAggro)
- + _aggroList.clear();
- - if (getMoveSpeed() > 0 && hasAI() && getSpawn() != null && !isInsideRadius(getSpawn().getLocX(), getSpawn().getLocY(), Config.MAX_DRIFT_RANGE, false))
- + if (hasAI() && !isDead() && getMoveSpeed() > 0 && getSpawn() != null && !isInsideRadius(getSpawn().getLocX(), getSpawn().getLocY(), getDriftRange(), false))
- {
- setIsReturningToSpawnPoint(true);
- setWalking();
- @@ -1232,6 +1220,11 @@
- return false;
- }
- + public int getDriftRange()
- + {
- + return Config.MAX_DRIFT_RANGE;
- + }
- +
- public final Set<L2Character> getAttackByList()
- {
- return _attackByList;
- @@ -1630,4 +1623,21 @@
- _quest.notifyKill(_attackable, _killer, _isPet);
- }
- }
- +
- + @Override
- + public void addKnownObject(L2Object object)
- + {
- + if (object instanceof L2PcInstance && getAI().getIntention() == CtrlIntention.IDLE)
- + getAI().setIntention(CtrlIntention.ACTIVE, null);
- + }
- +
- + @Override
- + public void removeKnownObject(L2Object object)
- + {
- + super.removeKnownObject(object);
- +
- + // remove object from agro list
- + if (object instanceof L2Character)
- + getAggroList().remove(object);
- + }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)
- @@ -46,17 +46,16 @@
- import net.sf.l2j.gameserver.model.L2Party;
- import net.sf.l2j.gameserver.model.L2Skill;
- import net.sf.l2j.gameserver.model.L2Skill.SkillTargetType;
- -import net.sf.l2j.gameserver.model.L2World;
- -import net.sf.l2j.gameserver.model.L2WorldRegion;
- import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.ShotType;
- import net.sf.l2j.gameserver.model.SpawnLocation;
- +import net.sf.l2j.gameserver.model.World;
- +import net.sf.l2j.gameserver.model.WorldRegion;
- import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2NpcWalkerInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2RiftInvaderInstance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.CharKnownList;
- import net.sf.l2j.gameserver.model.actor.stat.CharStat;
- import net.sf.l2j.gameserver.model.actor.status.CharStatus;
- import net.sf.l2j.gameserver.model.actor.template.CharTemplate;
- @@ -84,6 +83,7 @@
- import net.sf.l2j.gameserver.network.serverpackets.Revive;
- import net.sf.l2j.gameserver.network.serverpackets.ServerObjectInfo;
- import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
- import net.sf.l2j.gameserver.network.serverpackets.StopMove;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -150,7 +150,6 @@
- private CharStat _stat;
- private CharStatus _status;
- private CharTemplate _template; // The link on the L2CharTemplate object containing generic and static properties
- - private CharKnownList _knownList;
- private String _title;
- private double _hpUpdateIncCheck = .0;
- @@ -196,7 +195,6 @@
- public L2Character(int objectId, CharTemplate template)
- {
- super(objectId);
- - initKnownList();
- initCharStat();
- initCharStatus();
- @@ -246,9 +244,8 @@
- /**
- * Remove the L2Character from the world when the decay task is launched.<BR>
- * <BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packets to players</B></FONT><BR>
- - * <BR>
- + * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _objects of World.</B></FONT><BR>
- + * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packets to players.</B></FONT>
- */
- public void onDecay()
- {
- @@ -529,7 +526,7 @@
- if (!isAlikeDead())
- {
- - if (this instanceof L2Npc && target.isAlikeDead() || !getKnownList().knowsObject(target))
- + if (this instanceof L2Npc && target.isAlikeDead() || !getKnownType(L2Character.class).contains(target))
- {
- getAI().setIntention(CtrlIntention.ACTIVE);
- sendPacket(ActionFailed.STATIC_PACKET);
- @@ -633,9 +630,6 @@
- }
- }
- - // Add the L2PcInstance to _knownObjects and _knownPlayer of the target
- - target.getKnownList().addKnownObject(this);
- -
- // Recharge any active auto soulshot tasks for current L2Character instance.
- rechargeShots(true, false);
- @@ -805,7 +799,7 @@
- sendPacket(SystemMessage.getSystemMessage(SystemMessageId.GETTING_READY_TO_SHOOT_AN_ARROW));
- // Send SetupGauge
- - sendPacket(new SetupGauge(SetupGauge.RED, sAtk + reuse));
- + sendPacket(new SetupGauge(GaugeColor.RED, sAtk + reuse));
- }
- // Create a new hit task with Medium priority
- @@ -917,7 +911,7 @@
- boolean hitted = doAttackHitSimple(attack, target, 100, sAtk);
- double attackpercent = 85;
- - for (L2Character obj : getKnownList().getKnownType(L2Character.class))
- + for (L2Character obj : getKnownType(L2Character.class))
- {
- if (obj == target || obj.isAlikeDead())
- continue;
- @@ -1322,7 +1316,7 @@
- {
- // Send SetupGauge with the color of the gauge and the casting time
- if (this instanceof L2PcInstance && !effectWhileCasting)
- - sendPacket(new SetupGauge(SetupGauge.BLUE, hitTime));
- + sendPacket(new SetupGauge(GaugeColor.BLUE, hitTime));
- if (effectWhileCasting)
- mut.phase = 2;
- @@ -1408,7 +1402,7 @@
- // prevent casting signets to peace zone
- if (skill.getSkillType() == L2SkillType.SIGNET || skill.getSkillType() == L2SkillType.SIGNET_CASTTIME)
- {
- - final L2WorldRegion region = getRegion();
- + final WorldRegion region = getRegion();
- if (region == null)
- return false;
- @@ -1535,7 +1529,7 @@
- if (hasAI())
- getAI().notifyEvent(CtrlEvent.EVT_DEAD, null);
- - final L2WorldRegion region = getRegion();
- + final WorldRegion region = getRegion();
- if (region != null)
- region.onDeath(this);
- @@ -1570,7 +1564,7 @@
- // Start broadcast status
- broadcastPacket(new Revive(this));
- - final L2WorldRegion region = getRegion();
- + final WorldRegion region = getRegion();
- if (region != null)
- region.onRevive(this);
- }
- @@ -1858,7 +1852,7 @@
- ((L2Summon) this).broadcastStatusUpdate();
- else if (this instanceof L2Npc)
- {
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- {
- if (getMoveSpeed() == 0)
- player.sendPacket(new ServerObjectInfo((L2Npc) this, player));
- @@ -1910,22 +1904,6 @@
- return false;
- }
- - public void initKnownList()
- - {
- - setKnownList(new CharKnownList(this));
- - }
- -
- - @Override
- - public CharKnownList getKnownList()
- - {
- - return _knownList;
- - }
- -
- - public void setKnownList(CharKnownList value)
- - {
- - _knownList = value;
- - }
- -
- public void initCharStat()
- {
- _stat = new CharStat(this);
- @@ -2888,7 +2866,7 @@
- {
- if (broadcastFull)
- {
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- {
- if (getMoveSpeed() == 0)
- player.sendPacket(new ServerObjectInfo((L2Npc) this, player));
- @@ -3217,26 +3195,19 @@
- }
- /**
- - * Stop movement of the L2Character (Called by AI Accessor only).<BR>
- - * <BR>
- - * <B><U> Actions</U> :</B>
- + * Stop movement of the L2Character (called by AI Accessor only).
- * <ul>
- * <li>Delete movement data of the L2Character</li>
- - * <li>Set the current position (x,y,z), its current L2WorldRegion if necessary and its heading</li>
- - * <li>Remove the L2Object object from _gmList** of GmListTable</li>
- - * <li>Remove object from _knownObjects and _knownPlayer* of all surrounding L2WorldRegion L2Characters</li>
- + * <li>Set the current position and refresh the region if necessary</li>
- * </ul>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T send Server->Client packet StopMove/StopRotation </B></FONT><BR>
- - * <BR>
- - * @param loc
- + * @param loc : The SpawnLocation where the character must stop.
- */
- public void stopMove(SpawnLocation loc)
- {
- // Delete movement data of the L2Character
- _move = null;
- - // Set the current position (x,y,z), its current L2WorldRegion if necessary and its heading
- - // All data are contained in a L2CharPosition object
- + // Set the current position and refresh the region if necessary.
- if (loc != null)
- {
- setXYZ(loc.getX(), loc.getY(), loc.getZ());
- @@ -3281,18 +3252,8 @@
- */
- public void setTarget(L2Object object)
- {
- - if (object != null)
- - {
- - if (!object.isVisible())
- - object = null;
- - else if (object != _target)
- - {
- - getKnownList().addKnownObject(object);
- -
- - if (object.getKnownList() != null)
- - object.getKnownList().addKnownObject(this);
- - }
- - }
- + if (object != null && !object.isVisible())
- + object = null;
- _target = object;
- }
- @@ -3302,10 +3263,7 @@
- */
- public final int getTargetId()
- {
- - if (_target != null)
- - return _target.getObjectId();
- -
- - return -1;
- + return (_target != null) ? _target.getObjectId() : -1;
- }
- /**
- @@ -3445,8 +3403,8 @@
- int originalX = x;
- int originalY = y;
- int originalZ = z;
- - int gtx = (originalX - L2World.WORLD_X_MIN) >> 4;
- - int gty = (originalY - L2World.WORLD_Y_MIN) >> 4;
- + int gtx = (originalX - World.WORLD_X_MIN) >> 4;
- + int gty = (originalY - World.WORLD_Y_MIN) >> 4;
- // Movement checks:
- // when geodata == 2, for all characters except mobs returning home (could be changed later to teleport if pathfinding fails)
- @@ -3469,7 +3427,7 @@
- }
- }
- - if (curX < L2World.WORLD_X_MIN || curX > L2World.WORLD_X_MAX || curY < L2World.WORLD_Y_MIN || curY > L2World.WORLD_Y_MAX)
- + if (curX < World.WORLD_X_MIN || curX > World.WORLD_X_MAX || curY < World.WORLD_Y_MIN || curY > World.WORLD_Y_MAX)
- {
- // Temporary fix for character outside world region errors
- _log.warning("Character " + getName() + " outside world area, in coordinates x:" + curX + " y:" + curY);
- @@ -3827,7 +3785,7 @@
- return;
- }
- - if ((this instanceof L2Npc && target.isAlikeDead()) || target.isDead() || (!getKnownList().knowsObject(target) && !(this instanceof L2DoorInstance)))
- + if ((this instanceof L2Npc && target.isAlikeDead()) || target.isDead() || (!getKnownType(L2Character.class).contains(target) && !(this instanceof L2DoorInstance)))
- {
- getAI().notifyEvent(CtrlEvent.EVT_CANCEL);
- @@ -4096,7 +4054,7 @@
- {
- try
- {
- - L2WorldRegion region = L2World.getInstance().getRegion(getX(), getY());
- + WorldRegion region = World.getInstance().getRegion(getX(), getY());
- return ((region != null) && (region.isActive()));
- }
- catch (Exception e)
- @@ -4952,7 +4910,7 @@
- }
- // Mobs in range 1000 see spell
- - for (L2Npc npcMob : player.getKnownList().getKnownTypeInRadius(L2Npc.class, 1000))
- + for (L2Npc npcMob : player.getKnownTypeInRadius(L2Npc.class, 1000))
- {
- List<Quest> quests = npcMob.getTemplate().getEventQuests(EventType.ON_SKILL_SEE);
- if (quests != null)
- @@ -5521,14 +5479,8 @@
- }
- @Override
- - protected void badCoords()
- + public final void setRegion(WorldRegion value)
- {
- - decayMe();
- - }
- -
- - @Override
- - public final void setRegion(L2WorldRegion value)
- - {
- // confirm revalidation of old region's zones
- if (getRegion() != null)
- {
- @@ -5540,4 +5492,12 @@
- super.setRegion(value);
- }
- +
- + @Override
- + public void removeKnownObject(L2Object object)
- + {
- + // If object is targeted by the L2Character, cancel Attack or Cast
- + if (object == getTarget())
- + setTarget(null);
- + }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Npc.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy)
- @@ -51,7 +51,6 @@
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2TeleporterInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2WarehouseInstance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.NpcKnownList;
- import net.sf.l2j.gameserver.model.actor.stat.NpcStat;
- import net.sf.l2j.gameserver.model.actor.status.NpcStatus;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- @@ -96,7 +95,7 @@
- */
- public class L2Npc extends L2Character
- {
- - public static final int INTERACTION_DISTANCE = 150;
- + public static final int INTERACTION_DISTANCE = 100;
- private static final int SOCIAL_INTERVAL = 12000;
- private L2Spawn _spawn;
- @@ -191,18 +190,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new NpcKnownList(this));
- - }
- -
- - @Override
- - public NpcKnownList getKnownList()
- - {
- - return (NpcKnownList) super.getKnownList();
- - }
- -
- - @Override
- public void initCharStat()
- {
- setStat(new NpcStat(this));
- @@ -280,7 +267,7 @@
- public void updateAbnormalEffect()
- {
- // Send NpcInfo with state of abnormal effect to all L2PcInstance in the _KnownPlayers of the L2Npc
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- {
- if (getMoveSpeed() == 0)
- player.sendPacket(new ServerObjectInfo(this, player));
- @@ -1340,17 +1327,6 @@
- quest.notifySpawn(this);
- }
- - /**
- - * Remove the L2Npc from the world and update its spawn object (for a complete removal use the deleteMe method).<BR>
- - * <BR>
- - * <B><U> Actions</U> :</B><BR>
- - * <BR>
- - * <li>Remove the L2Npc from the world when the decay task is launched</li> <li>Decrease its spawn counter</li> <li>Manage Siege task (killFlag, killCT)</li><BR>
- - * <BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packets to players</B></FONT><BR>
- - * <BR>
- - */
- @Override
- public void onDecay()
- {
- @@ -1372,25 +1348,12 @@
- _spawn.doRespawn();
- }
- - /**
- - * Remove PROPERLY the L2Npc from the world.<BR>
- - * <BR>
- - * <B><U> Actions</U> :</B><BR>
- - * <BR>
- - * <li>Remove the L2Npc from the world and update its spawn object</li> <li>Remove all L2Object from _knownObjects and _knownPlayer of the L2Npc then cancel Attak or Cast and notify AI</li> <li>Remove L2Object object from _allObjects of L2World</li><BR>
- - * <BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packets to players</B></FONT><BR>
- - * <BR>
- - */
- @Override
- public void deleteMe()
- {
- // Decay
- onDecay();
- - // Remove all L2Object from _knownObjects and _knownPlayer of the L2Character then cancel Attak or Cast and notify AI
- - getKnownList().removeAllKnownObjects();
- -
- super.deleteMe();
- }
- @@ -1574,7 +1537,7 @@
- return;
- _currentSsCount--;
- - Broadcast.toSelfAndKnownPlayersInRadiusSq(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 360000);
- + Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 600);
- setChargedShot(ShotType.SOULSHOT, true);
- }
- @@ -1587,7 +1550,7 @@
- return;
- _currentSpsCount--;
- - Broadcast.toSelfAndKnownPlayersInRadiusSq(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 360000);
- + Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 600);
- setChargedShot(ShotType.SPIRITSHOT, true);
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Playable.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Playable.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Playable.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.gameserver.model.L2Effect;
- import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Skill;
- -import net.sf.l2j.gameserver.model.L2WorldRegion;
- +import net.sf.l2j.gameserver.model.WorldRegion;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.stat.PlayableStat;
- import net.sf.l2j.gameserver.model.actor.status.PlayableStatus;
- @@ -141,7 +141,7 @@
- // Notify L2Character AI
- getAI().notifyEvent(CtrlEvent.EVT_DEAD);
- - final L2WorldRegion region = getRegion();
- + final WorldRegion region = getRegion();
- if (region != null)
- region.onDeath(this);
- @@ -181,7 +181,7 @@
- // Start broadcast status
- broadcastPacket(new Revive(this));
- - final L2WorldRegion region = getRegion();
- + final WorldRegion region = getRegion();
- if (region != null)
- region.onRevive(this);
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Summon.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Summon.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Summon.java (working copy)
- @@ -33,7 +33,6 @@
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.SummonKnownList;
- import net.sf.l2j.gameserver.model.actor.stat.SummonStat;
- import net.sf.l2j.gameserver.model.actor.status.SummonStatus;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- @@ -75,24 +74,9 @@
- _showSummonAnimation = true;
- _owner = owner;
- - _ai = new L2SummonAI(this);
- -
- - setXYZInvisible(owner.getX() + 50, owner.getY() + 100, owner.getZ() + 100);
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new SummonKnownList(this));
- - }
- -
- - @Override
- - public final SummonKnownList getKnownList()
- - {
- - return (SummonKnownList) super.getKnownList();
- - }
- -
- - @Override
- public void initCharStat()
- {
- setStat(new SummonStat(this));
- @@ -145,7 +129,7 @@
- @Override
- public void updateAbnormalEffect()
- {
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- player.sendPacket(new SummonInfo(this, player, 1));
- }
- @@ -343,7 +327,6 @@
- owner.sendPacket(new PetDelete(getSummonType(), getObjectId()));
- decayMe();
- - getKnownList().removeAllKnownObjects();
- owner.setPet(null);
- super.deleteMe();
- }
- @@ -371,7 +354,6 @@
- decayMe();
- - getKnownList().removeAllKnownObjects();
- setTarget(null);
- // Disable beastshots
- @@ -796,17 +778,14 @@
- sendPacket(new PetStatusUpdate(this));
- if (isVisible())
- - broadcastNpcInfo(val);
- - }
- -
- - public void broadcastNpcInfo(int val)
- - {
- - for (L2PcInstance player : getKnownList().getKnownType(L2PcInstance.class))
- {
- - if (player == getOwner())
- - continue;
- -
- - player.sendPacket(new SummonInfo(this, player, val));
- + for (L2PcInstance player : getKnownType(L2PcInstance.class))
- + {
- + if (player == getOwner())
- + continue;
- +
- + player.sendPacket(new SummonInfo(this, player, val));
- + }
- }
- }
- @@ -826,7 +805,7 @@
- @Override
- public void broadcastRelationsChanges()
- {
- - for (L2PcInstance player : getOwner().getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : getOwner().getKnownType(L2PcInstance.class))
- player.sendPacket(new RelationChanged(this, getOwner().getRelation(player), isAutoAttackable(player)));
- }
- @@ -834,7 +813,7 @@
- public void sendInfo(L2PcInstance activeChar)
- {
- // Check if the L2PcInstance is the owner of the Pet
- - if (activeChar.equals(getOwner()))
- + if (activeChar == getOwner())
- {
- activeChar.sendPacket(new PetInfo(this, 0));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Vehicle.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Vehicle.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Vehicle.java (working copy)
- @@ -28,7 +28,6 @@
- import net.sf.l2j.gameserver.model.SpawnLocation;
- import net.sf.l2j.gameserver.model.VehiclePathPoint;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.VehicleKnownList;
- import net.sf.l2j.gameserver.model.actor.stat.VehicleStat;
- import net.sf.l2j.gameserver.model.actor.template.CharTemplate;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -158,12 +157,6 @@
- }
- @Override
- - public void initKnownList()
- - {
- - setKnownList(new VehicleKnownList(this));
- - }
- -
- - @Override
- public VehicleStat getStat()
- {
- return (VehicleStat) super.getStat();
- @@ -212,7 +205,7 @@
- if (player.isOnline())
- player.teleToLocation(loc.getX(), loc.getY(), loc.getZ(), 0);
- else
- - player.setXYZInvisible(loc.getX(), loc.getY(), loc.getZ()); // disconnects handling
- + player.setXYZInvisible(loc); // disconnects handling
- }
- public boolean addPassenger(L2PcInstance player)
- @@ -264,7 +257,7 @@
- */
- public void payForRide(int itemId, int count, Location loc)
- {
- - for (L2PcInstance player : getKnownList().getKnownTypeInRadius(L2PcInstance.class, 1000))
- + for (L2PcInstance player : getKnownTypeInRadius(L2PcInstance.class, 1000))
- {
- if (player.isInBoat() && player.getBoat() == this)
- {
- @@ -356,9 +349,6 @@
- // Decay the vehicle.
- decayMe();
- - // Remove from knownlist.
- - getKnownList().removeAllKnownObjects();
- -
- super.deleteMe();
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PetStat.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PetStat.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PetStat.java (working copy)
- @@ -80,9 +80,7 @@
- {
- getActiveChar().setPetData(getActiveChar().getTemplate().getPetDataEntry(value));
- - getActiveChar().stopFeed();
- super.setLevel(value); // Set level.
- - getActiveChar().startFeed();
- // If a control item exists and its level is different of the new level.
- final ItemInstance controlItem = getActiveChar().getControlItem();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/template/PcTemplate.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/template/PcTemplate.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/template/PcTemplate.java (working copy)
- @@ -18,15 +18,13 @@
- import java.util.List;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- +import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.base.ClassId;
- import net.sf.l2j.gameserver.model.base.ClassRace;
- import net.sf.l2j.gameserver.model.base.Sex;
- import net.sf.l2j.gameserver.model.item.kind.Item;
- import net.sf.l2j.gameserver.templates.StatsSet;
- -/**
- - * @author mkizub
- - */
- public class PcTemplate extends CharTemplate
- {
- private final ClassId _classId;
- @@ -38,9 +36,7 @@
- private final double _collisionRadiusFemale;
- private final double _collisionHeightFemale;
- - private final int _spawnX;
- - private final int _spawnY;
- - private final int _spawnZ;
- + private final Location _spawn;
- private final int _classBaseLevel;
- @@ -63,9 +59,7 @@
- _collisionRadiusFemale = set.getDouble("radiusFemale");
- _collisionHeightFemale = set.getDouble("heightFemale");
- - _spawnX = set.getInteger("spawnX");
- - _spawnY = set.getInteger("spawnY");
- - _spawnZ = set.getInteger("spawnZ");
- + _spawn = new Location(set.getInteger("spawnX"), set.getInteger("spawnY"), set.getInteger("spawnZ"));
- _classBaseLevel = set.getInteger("baseLvl");
- @@ -153,21 +147,11 @@
- return (sex == Sex.MALE) ? _collisionHeight : _collisionHeightFemale;
- }
- - public final int getSpawnX()
- + public final Location getSpawn()
- {
- - return _spawnX;
- + return _spawn;
- }
- - public final int getSpawnY()
- - {
- - return _spawnY;
- - }
- -
- - public final int getSpawnZ()
- - {
- - return _spawnZ;
- - }
- -
- public final int getClassBaseLevel()
- {
- return _classBaseLevel;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/AggroInfo.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/AggroInfo.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/AggroInfo.java (working copy)
- @@ -48,7 +48,7 @@
- public int checkHate(L2Character owner)
- {
- - if (_attacker.isAlikeDead() || !_attacker.isVisible() || !owner.getKnownList().knowsObject(_attacker))
- + if (_attacker.isAlikeDead() || !_attacker.isVisible() || !owner.getKnownType(L2Character.class).contains(_attacker))
- _hate = 0;
- return _hate;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/BlockList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/BlockList.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/BlockList.java (working copy)
- @@ -184,7 +184,7 @@
- sm.addString(charName);
- listOwner.sendPacket(sm);
- - L2PcInstance player = L2World.getInstance().getPlayer(targetId);
- + L2PcInstance player = World.getInstance().getPlayer(targetId);
- if (player != null)
- {
- @@ -249,7 +249,7 @@
- */
- public static boolean isInBlockList(int ownerId, int targetId)
- {
- - L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
- + L2PcInstance player = World.getInstance().getPlayer(ownerId);
- if (player != null)
- return BlockList.isBlocked(player, targetId);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/CharEffectList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/CharEffectList.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/CharEffectList.java (working copy)
- @@ -288,6 +288,7 @@
- switch (e.getSkill().getSkillType())
- {
- case BUFF:
- + case COMBATPOINTHEAL:
- case REFLECT:
- case HEAL_PERCENT:
- case MANAHEAL_PERCENT:
- @@ -656,6 +657,12 @@
- // array modified, then rebuild on next request
- _rebuildCache = true;
- + if (isAffected(newEffect.getEffectFlags()) && !newEffect.onSameEffect(null))
- + {
- + newEffect.stopEffectTask();
- + return;
- + }
- +
- if (newSkill.isDebuff())
- {
- if (_debuffs == null)
- @@ -704,6 +711,7 @@
- case REFLECT:
- case HEAL_PERCENT:
- case MANAHEAL_PERCENT:
- + case COMBATPOINTHEAL:
- for (L2Effect e : _buffs)
- {
- if (e == null)
- @@ -715,6 +723,7 @@
- case REFLECT:
- case HEAL_PERCENT:
- case MANAHEAL_PERCENT:
- + case COMBATPOINTHEAL:
- e.exit();
- effectsToRemove--;
- break; // break switch()
- @@ -1064,9 +1073,14 @@
- */
- public boolean isAffected(L2EffectFlag flag)
- {
- - return (_effectFlags & flag.getMask()) != 0;
- + return isAffected(flag.getMask());
- }
- + public boolean isAffected(int mask)
- + {
- + return (_effectFlags & mask) != 0;
- + }
- +
- /**
- * Clear and null all queues and lists Use only during delete character from the world.
- */
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/Hero.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/Hero.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/Hero.java (working copy)
- @@ -41,7 +41,7 @@
- import net.sf.l2j.gameserver.datatables.NpcTable;
- import net.sf.l2j.gameserver.instancemanager.CastleManager;
- import net.sf.l2j.gameserver.model.L2Clan;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -595,7 +595,7 @@
- {
- String name = hero.getString(Olympiad.CHAR_NAME);
- - L2PcInstance player = L2World.getInstance().getPlayer(name);
- + L2PcInstance player = World.getInstance().getPlayer(name);
- if (player == null)
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java (working copy)
- @@ -35,8 +35,6 @@
- import net.sf.l2j.gameserver.instancemanager.MercTicketManager;
- import net.sf.l2j.gameserver.model.L2Augmentation;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- -import net.sf.l2j.gameserver.model.L2WorldRegion;
- import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.ShotType;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- @@ -921,7 +919,7 @@
- /**
- * Init a dropped ItemInstance and add it in the world as a visible object.<BR>
- * <BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of L2World </B></FONT><BR>
- + * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _objects of World </B></FONT><BR>
- * <BR>
- * @param dropper : the character who dropped the item.
- * @param x : X location of the item.
- @@ -961,20 +959,9 @@
- _z = dropDest.getZ();
- }
- - synchronized (_itm)
- - {
- - // Set the x,y,z position of the ItemInstance dropped and update its _worldregion
- - _itm.setIsVisible(true);
- - _itm.getPosition().set(_x, _y, _z);
- - _itm.setRegion(L2World.getInstance().getRegion(getPosition()));
- - }
- -
- - _itm.getRegion().addVisibleObject(_itm);
- _itm.setDropperObjectId(_dropper != null ? _dropper.getObjectId() : 0); // Set the dropper Id for the knownlist packets in sendInfo
- + _itm.spawnMe(_x, _y, _z);
- - // Add the ItemInstance dropped in the world as a visible object
- - L2World.getInstance().addVisibleObject(_itm, _itm.getRegion());
- -
- ItemsOnGroundTaskManager.getInstance().add(_itm, _dropper);
- _itm.setDropperObjectId(0); // Set the dropper Id back to 0 so it no longer shows the drop packet
- @@ -982,46 +969,32 @@
- }
- /**
- - * Remove a ItemInstance from the world and send server->client GetItem packets.<BR>
- + * Remove a ItemInstance from the visible world and send server->client GetItem packets.<BR>
- * <BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World </B></FONT><BR>
- + * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _objects of World.</B></FONT><BR>
- * <BR>
- * @param player Player that pick up the item
- */
- public final void pickupMe(L2Character player)
- {
- - assert getRegion() != null;
- -
- - L2WorldRegion oldregion = getRegion();
- -
- - // Create a server->client GetItem packet to pick up the ItemInstance
- player.broadcastPacket(new GetItem(this, player.getObjectId()));
- - synchronized (this)
- - {
- - setIsVisible(false);
- - setRegion(null);
- - }
- -
- - // if this item is a mercenary ticket, remove the spawns!
- - int itemId = getItemId();
- -
- - if (MercTicketManager.getTicketCastleId(itemId) > 0)
- + if (MercTicketManager.getTicketCastleId(_itemId) > 0)
- MercTicketManager.getInstance().removeTicket(this);
- - if (!Config.DISABLE_TUTORIAL && (itemId == 57 || itemId == 6353))
- + if (!Config.DISABLE_TUTORIAL && (_itemId == 57 || _itemId == 6353))
- {
- L2PcInstance actor = player.getActingPlayer();
- if (actor != null)
- {
- QuestState qs = actor.getQuestState("Tutorial");
- if (qs != null)
- - qs.getQuest().notifyEvent("CE" + itemId + "", null, actor);
- + qs.getQuest().notifyEvent("CE" + _itemId + "", null, actor);
- }
- }
- - // Remove the ItemInstance from the world (out of synchro, to avoid deadlocks)
- - L2World.getInstance().removeVisibleObject(this, oldregion);
- + // Calls directly setRegion(null), we don't have to care about.
- + setIsVisible(false);
- }
- /**
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Weapon.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Weapon.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Weapon.java (working copy)
- @@ -373,7 +373,7 @@
- if (caster instanceof L2PcInstance)
- {
- // Mobs in range 1000 see spell
- - for (L2Npc npcMob : caster.getKnownList().getKnownTypeInRadius(L2Npc.class, 1000))
- + for (L2Npc npcMob : caster.getKnownTypeInRadius(L2Npc.class, 1000))
- {
- List<Quest> quests = npcMob.getTemplate().getEventQuests(EventType.ON_SKILL_SEE);
- if (quests != null)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/Inventory.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/Inventory.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/Inventory.java (working copy)
- @@ -25,7 +25,7 @@
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Playable;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -956,7 +956,7 @@
- item.setLocation(ItemLocation.INVENTORY);
- }
- - L2World.getInstance().addObject(item);
- + World.getInstance().addObject(item);
- // If stackable item is found in inventory just add to current quantity
- if (item.isStackable() && getItemByItemId(item.getItemId()) != null)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/ItemContainer.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/ItemContainer.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/ItemContainer.java (working copy)
- @@ -29,7 +29,7 @@
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -509,7 +509,7 @@
- for (ItemInstance item : _items)
- {
- item.updateDatabase();
- - L2World.getInstance().removeObject(item);
- + World.getInstance().removeObject(item);
- }
- }
- _items.clear();
- @@ -545,7 +545,7 @@
- if (item == null)
- continue;
- - L2World.getInstance().addObject(item);
- + World.getInstance().addObject(item);
- L2PcInstance owner = (getOwner() == null) ? null : getOwner().getActingPlayer();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/PetInventory.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/PetInventory.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/PetInventory.java (working copy)
- @@ -14,12 +14,12 @@
- */
- package net.sf.l2j.gameserver.model.itemcontainer;
- -import net.sf.l2j.gameserver.datatables.ItemTable;
- +import net.sf.l2j.commons.random.Rnd;
- +
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance.ItemLocation;
- -import net.sf.l2j.gameserver.model.item.kind.Item;
- import net.sf.l2j.gameserver.model.item.type.EtcItemType;
- public class PetInventory extends Inventory
- @@ -61,6 +61,7 @@
- {
- super.refreshWeight();
- getOwner().updateAndBroadcastStatus(1);
- + getOwner().sendPetInfosToOwner();
- }
- public boolean validateCapacity(ItemInstance item)
- @@ -79,16 +80,9 @@
- return (_items.size() + slots <= _owner.getInventoryLimit());
- }
- - public boolean validateWeight(ItemInstance item, long count)
- + public boolean validateWeight(ItemInstance item, int count)
- {
- - int weight = 0;
- -
- - Item template = ItemTable.getInstance().getTemplate(item.getItemId());
- - if (template == null)
- - return false;
- -
- - weight += count * template.getWeight();
- - return validateWeight(weight);
- + return validateWeight(count * item.getItem().getWeight());
- }
- @Override
- @@ -110,29 +104,22 @@
- }
- @Override
- - public void restore()
- - {
- - super.restore();
- -
- - // check for equipped items from other pets
- - for (ItemInstance item : _items)
- - {
- - if (item.isEquipped())
- - {
- - if (!item.getItem().checkCondition(getOwner(), getOwner(), false))
- - unEquipItemInSlot(item.getLocationSlot());
- - }
- - }
- - }
- -
- - @Override
- public void deleteMe()
- {
- final L2PcInstance petOwner = getOwner().getOwner();
- if (petOwner != null)
- {
- for (ItemInstance item : _items)
- - getOwner().transferItem("return", item.getObjectId(), item.getCount(), petOwner.getInventory(), petOwner, getOwner());
- + {
- + if (petOwner.getInventory().validateCapacity(1))
- + getOwner().transferItem("return", item.getObjectId(), item.getCount(), petOwner.getInventory(), petOwner, getOwner());
- + else
- + {
- + final ItemInstance droppedItem = dropItem("drop", item.getObjectId(), item.getCount(), petOwner, getOwner());
- + droppedItem.dropMe(getOwner(), getOwner().getX() + Rnd.get(-70, 70), getOwner().getY() + Rnd.get(-70, 70), getOwner().getZ() + 30);
- + }
- +
- + }
- }
- _items.clear();
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Effect.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Effect.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Effect.java (working copy)
- @@ -542,4 +542,9 @@
- {
- return false;
- }
- +
- + public boolean onSameEffect(L2Effect effect)
- + {
- + return true;
- + }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Object.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Object.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Object.java (working copy)
- @@ -14,18 +14,23 @@
- */
- package net.sf.l2j.gameserver.model;
- +import java.util.ArrayList;
- +import java.util.Collections;
- +import java.util.List;
- import java.util.logging.Logger;
- +import net.sf.l2j.commons.math.MathUtil;
- +
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.datatables.NpcTable;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -import net.sf.l2j.gameserver.model.actor.knownlist.ObjectKnownList;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.model.zone.ZoneId;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- +import net.sf.l2j.gameserver.util.Util;
- /**
- * Mother class of all interactive objects in the world (PC, NPC, Item...)
- @@ -49,15 +54,13 @@
- private int _polyId;
- private SpawnLocation _position = new SpawnLocation(0, 0, 0, 0);
- - private L2WorldRegion _region;
- + private WorldRegion _region;
- private boolean _isVisible;
- public L2Object(int objectId)
- {
- _objectId = objectId;
- -
- - setRegion(L2World.getInstance().getRegion(_position));
- }
- public void onAction(L2PcInstance player)
- @@ -84,24 +87,14 @@
- */
- public void decayMe()
- {
- - assert _region != null;
- + setRegion(null);
- - final L2WorldRegion region = _region;
- -
- - synchronized (this)
- - {
- - _isVisible = false;
- - setRegion(null);
- - }
- -
- - // Out of synchronized to avoid deadlocks
- - L2World.getInstance().removeVisibleObject(this, region);
- - L2World.getInstance().removeObject(this);
- + World.getInstance().removeObject(this);
- }
- public void refreshID()
- {
- - L2World.getInstance().removeObject(this);
- + World.getInstance().removeObject(this);
- IdFactory.getInstance().releaseId(getObjectId());
- _objectId = IdFactory.getInstance().getNextId();
- }
- @@ -111,69 +104,22 @@
- */
- public final void spawnMe()
- {
- - assert _region == null;
- + _isVisible = true;
- - synchronized (this)
- - {
- - // Set the x,y,z position of the L2Object spawn and update its _worldregion
- - _isVisible = true;
- - setRegion(L2World.getInstance().getRegion(_position));
- - }
- + setRegion(World.getInstance().getRegion(_position));
- - // Add the L2Object spawn in the _allobjects of L2World
- - L2World.getInstance().addObject(this);
- + World.getInstance().addObject(this);
- - // Add the L2Object spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion
- - _region.addVisibleObject(this);
- -
- - // Add the L2Object spawn in the world as a visible object -- out of synchronized to avoid deadlocks
- - L2World.getInstance().addVisibleObject(this, _region);
- -
- onSpawn();
- }
- public final void spawnMe(int x, int y, int z)
- {
- - assert _region == null;
- + _position.set(MathUtil.limit(x, World.WORLD_X_MIN + 100, World.WORLD_X_MAX - 100), MathUtil.limit(y, World.WORLD_Y_MIN + 100, World.WORLD_Y_MAX - 100), z);
- - synchronized (this)
- - {
- - // Set the x,y,z position of the L2Object spawn and update its _worldregion
- - _isVisible = true;
- -
- - if (x > L2World.WORLD_X_MAX)
- - x = L2World.WORLD_X_MAX - 5000;
- - if (x < L2World.WORLD_X_MIN)
- - x = L2World.WORLD_X_MIN + 5000;
- - if (y > L2World.WORLD_Y_MAX)
- - y = L2World.WORLD_Y_MAX - 5000;
- - if (y < L2World.WORLD_Y_MIN)
- - y = L2World.WORLD_Y_MIN + 5000;
- -
- - _position.set(x, y, z);
- - setRegion(L2World.getInstance().getRegion(_position));
- - }
- -
- - // Add the L2Object spawn in the _allobjects of L2World
- - L2World.getInstance().addObject(this);
- -
- - // Add the L2Object spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion
- - _region.addVisibleObject(this);
- -
- - // Add the L2Object spawn in the world as a visible object
- - L2World.getInstance().addVisibleObject(this, _region);
- -
- - onSpawn();
- + spawnMe();
- }
- - public void toggleVisible()
- - {
- - if (isVisible())
- - decayMe();
- - else
- - spawnMe();
- - }
- -
- public boolean isAttackable()
- {
- return false;
- @@ -202,11 +148,6 @@
- setRegion(null);
- }
- - public ObjectKnownList getKnownList()
- - {
- - return null;
- - }
- -
- public final String getName()
- {
- return _name;
- @@ -343,41 +284,17 @@
- */
- public final void setXYZ(int x, int y, int z)
- {
- - assert _region != null;
- -
- _position.set(x, y, z);
- - try
- - {
- - if (!isVisible())
- - return;
- -
- - final L2WorldRegion region = L2World.getInstance().getRegion(_position);
- - if (region != _region)
- - {
- - _region.removeVisibleObject(this);
- -
- - setRegion(region);
- -
- - // Add the L2Oject spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion
- - _region.addVisibleObject(this);
- - }
- - }
- - catch (Exception e)
- - {
- - _log.warning("Object Id at bad coords: (x: " + getX() + ", y: " + getY() + ", z: " + getZ() + ").");
- - badCoords();
- - }
- + if (!isVisible())
- + return;
- +
- + final WorldRegion region = World.getInstance().getRegion(_position);
- + if (region != _region)
- + setRegion(region);
- }
- /**
- - * Called on setXYZ exception.
- - */
- - protected void badCoords()
- - {
- - }
- -
- - /**
- * Set the x,y,z position of the L2Object and make it invisible. A L2Object is invisble if <B>_hidden</B>=true or <B>_worldregion</B>==null
- * @param x
- * @param y
- @@ -385,48 +302,28 @@
- */
- public final void setXYZInvisible(int x, int y, int z)
- {
- - assert _region == null;
- + _position.set(MathUtil.limit(x, World.WORLD_X_MIN + 100, World.WORLD_X_MAX - 100), MathUtil.limit(y, World.WORLD_Y_MIN + 100, World.WORLD_Y_MAX - 100), z);
- - if (x > L2World.WORLD_X_MAX)
- - x = L2World.WORLD_X_MAX - 5000;
- - if (x < L2World.WORLD_X_MIN)
- - x = L2World.WORLD_X_MIN + 5000;
- - if (y > L2World.WORLD_Y_MAX)
- - y = L2World.WORLD_Y_MAX - 5000;
- - if (y < L2World.WORLD_Y_MIN)
- - y = L2World.WORLD_Y_MIN + 5000;
- -
- - _position.set(x, y, z);
- setIsVisible(false);
- }
- - /**
- - * @return the x position of the L2Object.
- - */
- + public final void setXYZInvisible(Location loc)
- + {
- + setXYZInvisible(loc.getX(), loc.getY(), loc.getZ());
- + }
- +
- public final int getX()
- {
- - assert _region != null || _isVisible;
- -
- return _position.getX();
- }
- - /**
- - * @return the y position of the L2Object.
- - */
- public final int getY()
- {
- - assert _region != null || _isVisible;
- -
- return _position.getY();
- }
- - /**
- - * @return the z position of the L2Object.
- - */
- public final int getZ()
- {
- - assert _region != null || _isVisible;
- -
- return _position.getZ();
- }
- @@ -435,13 +332,150 @@
- return _position;
- }
- - public final L2WorldRegion getRegion()
- + public final WorldRegion getRegion()
- {
- return _region;
- }
- - public void setRegion(L2WorldRegion value)
- + /**
- + * Update current and surrounding regions, based on both current region and region setted as parameter.
- + * @param newRegion : null to remove the object, or the new region.
- + */
- + public void setRegion(WorldRegion newRegion)
- {
- - _region = value;
- + List<WorldRegion> oldAreas = Collections.emptyList();
- +
- + if (_region != null)
- + {
- + _region.removeVisibleObject(this);
- + oldAreas = _region.getSurroundingRegions();
- + }
- +
- + List<WorldRegion> newAreas = Collections.emptyList();
- +
- + if (newRegion != null)
- + {
- + newRegion.addVisibleObject(this);
- + newAreas = newRegion.getSurroundingRegions();
- + }
- +
- + // For every old surrounding area NOT SHARED with new surrounding areas.
- + for (WorldRegion region : oldAreas)
- + {
- + if (!newAreas.contains(region))
- + {
- + // Update all objects.
- + for (L2Object obj : region.getObjects())
- + {
- + if (obj == this)
- + continue;
- +
- + obj.removeKnownObject(this);
- + removeKnownObject(obj);
- + }
- +
- + // Desactivate the old neighbor region.
- + if (this instanceof L2PcInstance && region.isEmptyNeighborhood())
- + region.setActive(false);
- + }
- + }
- +
- + // For every new surrounding area NOT SHARED with old surrounding areas.
- + for (WorldRegion region : newAreas)
- + {
- + if (!oldAreas.contains(region))
- + {
- + // Update all objects.
- + for (L2Object obj : region.getObjects())
- + {
- + if (obj == this)
- + continue;
- +
- + obj.addKnownObject(this);
- + addKnownObject(obj);
- + }
- +
- + // Activate the new neighbor region.
- + if (this instanceof L2PcInstance)
- + region.setActive(true);
- + }
- + }
- +
- + _region = newRegion;
- }
- +
- + /**
- + * Add object to known list.
- + * @param object : {@link L2Object} to be added.
- + */
- + public void addKnownObject(L2Object object)
- + {
- + }
- +
- + /**
- + * Remove object from known list.
- + * @param object : {@link L2Object} to be removed.
- + */
- + public void removeKnownObject(L2Object object)
- + {
- + }
- +
- + /**
- + * Return the known list of given object type.
- + * @param <A> : Object type must be instance of {@link L2Object}.
- + * @param type : Class specifying object type.
- + * @return List<A> : Known list of given object type.
- + */
- + @SuppressWarnings("unchecked")
- + public final <A> List<A> getKnownType(Class<A> type)
- + {
- + final WorldRegion region = _region;
- + if (region == null)
- + return Collections.emptyList();
- +
- + final List<A> result = new ArrayList<>();
- +
- + for (WorldRegion reg : region.getSurroundingRegions())
- + {
- + for (L2Object obj : reg.getObjects())
- + {
- + if (obj == this || !type.isAssignableFrom(obj.getClass()))
- + continue;
- +
- + result.add((A) obj);
- + }
- + }
- +
- + return result;
- + }
- +
- + /**
- + * Return the known list of given object type within specified radius.
- + * @param <A> : Object type must be instance of {@link L2Object}.
- + * @param type : Class specifying object type.
- + * @param radius : Radius to in which object must be located.
- + * @return List<A> : Known list of given object type.
- + */
- + @SuppressWarnings("unchecked")
- + public final <A> List<A> getKnownTypeInRadius(Class<A> type, int radius)
- + {
- + final WorldRegion region = _region;
- + if (region == null)
- + return Collections.emptyList();
- +
- + final List<A> result = new ArrayList<>();
- +
- + for (WorldRegion reg : region.getSurroundingRegions())
- + {
- + for (L2Object obj : reg.getObjects())
- + {
- + if (obj == this || !type.isAssignableFrom(obj.getClass()) || !Util.checkIfInRange(radius, this, obj, true))
- + continue;
- +
- + result.add((A) obj);
- + }
- + }
- +
- + return result;
- + }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Party.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Party.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Party.java (working copy)
- @@ -402,7 +402,7 @@
- if (player.getFusionSkill() != null)
- player.abortCast();
- - for (L2Character character : player.getKnownList().getKnownType(L2Character.class))
- + for (L2Character character : player.getKnownType(L2Character.class))
- if (character.getFusionSkill() != null && character.getFusionSkill().getTarget() == player)
- character.abortCast();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java (working copy)
- @@ -1390,7 +1390,7 @@
- final L2PcInstance sourcePlayer = activeChar.getActingPlayer();
- targetList.add(activeChar);
- - for (L2Character obj : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, _skillRadius))
- + for (L2Character obj : activeChar.getKnownTypeInRadius(L2Character.class, _skillRadius))
- {
- if (!(obj == activeChar || obj == sourcePlayer || obj instanceof L2Npc || obj instanceof L2Attackable))
- continue;
- @@ -1402,7 +1402,7 @@
- {
- final boolean srcInArena = activeChar.isInArena();
- - for (L2Character obj : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, _skillRadius))
- + for (L2Character obj : activeChar.getKnownTypeInRadius(L2Character.class, _skillRadius))
- {
- if (obj instanceof L2Attackable || obj instanceof L2Playable)
- {
- @@ -1448,7 +1448,7 @@
- final boolean srcInArena = activeChar.isInArena();
- List<L2Character> targetList = new ArrayList<>();
- - for (L2Character obj : target.getKnownList().getKnownType(L2Character.class))
- + for (L2Character obj : target.getKnownType(L2Character.class))
- {
- if (obj == null || obj == target || obj == activeChar)
- continue;
- @@ -1501,7 +1501,7 @@
- else
- origin = activeChar;
- - for (L2Character obj : activeChar.getKnownList().getKnownType(L2Character.class))
- + for (L2Character obj : activeChar.getKnownType(L2Character.class))
- {
- if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
- continue;
- @@ -1657,7 +1657,7 @@
- if (player.getClan() != null)
- {
- - for (L2PcInstance obj : activeChar.getKnownList().getKnownTypeInRadius(L2PcInstance.class, radius))
- + for (L2PcInstance obj : activeChar.getKnownTypeInRadius(L2PcInstance.class, radius))
- {
- if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId()) && (obj.getClan() == null || obj.getClanId() != player.getClanId()))
- continue;
- @@ -1703,7 +1703,7 @@
- if (player.getClan() != null)
- {
- - for (L2PcInstance obj : activeChar.getKnownList().getKnownTypeInRadius(L2PcInstance.class, radius))
- + for (L2PcInstance obj : activeChar.getKnownTypeInRadius(L2PcInstance.class, radius))
- {
- if (!obj.isDead())
- continue;
- @@ -1786,7 +1786,7 @@
- else if (activeChar instanceof L2Npc)
- {
- targetList.add(activeChar);
- - for (L2Npc newTarget : activeChar.getKnownList().getKnownTypeInRadius(L2Npc.class, _castRange))
- + for (L2Npc newTarget : activeChar.getKnownTypeInRadius(L2Npc.class, _castRange))
- {
- if (newTarget.isDead() || !ArraysUtil.contains(((L2Npc) activeChar).getTemplate().getClans(), newTarget.getTemplate().getClans()))
- continue;
- @@ -1912,7 +1912,7 @@
- final boolean srcInArena = activeChar.isInArena();
- - for (L2Character obj : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, _skillRadius))
- + for (L2Character obj : activeChar.getKnownTypeInRadius(L2Character.class, _skillRadius))
- {
- if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
- continue;
- @@ -1962,7 +1962,7 @@
- {
- List<L2Character> targetList = new ArrayList<>();
- - for (L2Character obj : activeChar.getKnownList().getKnownTypeInRadius(L2Character.class, _skillRadius))
- + for (L2Character obj : activeChar.getKnownTypeInRadius(L2Character.class, _skillRadius))
- {
- if (obj instanceof L2Npc || obj instanceof L2SummonInstance)
- target = obj;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/AbstractOlympiadGame.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/AbstractOlympiadGame.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/AbstractOlympiadGame.java (working copy)
- @@ -242,10 +242,10 @@
- }
- /**
- - * Buff and heal the player. WW2 for fighter/mage + haste 1 if fighter.
- + * Buff the player. WW2 for fighter/mage + haste 1 if fighter.
- * @param player : the happy benefactor.
- */
- - protected static final void buffAndHealPlayer(L2PcInstance player)
- + protected static final void buffPlayer(L2PcInstance player)
- {
- L2Skill skill = SkillTable.getInstance().getInfo(1204, 2); // Windwalk 2
- if (skill != null)
- @@ -263,8 +263,14 @@
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(1086));
- }
- }
- -
- - // Heal Player fully
- + }
- +
- + /**
- + * Heal the player.
- + * @param player : the happy benefactor.
- + */
- + protected static final void healPlayer(L2PcInstance player)
- + {
- player.setCurrentCp(player.getMaxCp());
- player.setCurrentHp(player.getMaxHp());
- player.setCurrentMp(player.getMaxMp());
- @@ -405,8 +411,10 @@
- protected abstract void removals();
- - protected abstract void buffAndHealPlayers();
- + protected abstract void buffPlayers();
- + protected abstract void healPlayers();
- +
- protected abstract boolean portPlayersToArena(List<Location> spawns);
- protected abstract void cleanEffects();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java (working copy)
- @@ -24,8 +24,8 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.L2DatabaseFactory;
- -import net.sf.l2j.gameserver.model.L2World;
- import net.sf.l2j.gameserver.model.Location;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.zone.type.L2OlympiadStadiumZone;
- @@ -68,11 +68,11 @@
- while (list.size() > 1)
- {
- playerOneObjectId = list.remove(Rnd.get(list.size()));
- - playerOne = L2World.getInstance().getPlayer(playerOneObjectId);
- + playerOne = World.getInstance().getPlayer(playerOneObjectId);
- if (playerOne == null || !playerOne.isOnline())
- continue;
- - playerTwo = L2World.getInstance().getPlayer(list.remove(Rnd.get(list.size())));
- + playerTwo = World.getInstance().getPlayer(list.remove(Rnd.get(list.size())));
- if (playerTwo == null || !playerTwo.isOnline())
- {
- list.add(playerOneObjectId);
- @@ -160,16 +160,26 @@
- }
- @Override
- - protected final void buffAndHealPlayers()
- + protected final void buffPlayers()
- {
- if (_aborted)
- return;
- - buffAndHealPlayer(_playerOne.player);
- - buffAndHealPlayer(_playerTwo.player);
- + buffPlayer(_playerOne.player);
- + buffPlayer(_playerTwo.player);
- }
- @Override
- + protected final void healPlayers()
- + {
- + if (_aborted)
- + return;
- +
- + healPlayer(_playerOne.player);
- + healPlayer(_playerTwo.player);
- + }
- +
- + @Override
- protected final boolean makeCompetitionStart()
- {
- if (!super.makeCompetitionStart())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameTask.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameTask.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameTask.java (working copy)
- @@ -205,7 +205,10 @@
- _zone.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_GAME_WILL_START_IN_S1_SECOND_S).addNumber(_countDown));
- if (_countDown == 20)
- - _game.buffAndHealPlayers();
- + {
- + _game.buffPlayers();
- + _game.healPlayers();
- + }
- delay = getDelay(BATTLE_START_TIME);
- if (_countDown <= 0)
- @@ -217,7 +220,10 @@
- case BATTLE_STARTED:
- {
- _countDown = 0;
- +
- + _game.healPlayers();
- _game.resetDamage();
- +
- _state = GameState.BATTLE_IN_PROGRESS; // set state first, used in zone update
- if (!startBattle())
- _state = GameState.GAME_STOPPED;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/Participant.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/Participant.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/Participant.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.model.olympiad;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.templates.StatsSet;
- @@ -55,7 +55,7 @@
- public final void updatePlayer()
- {
- if (player == null || !player.isOnline())
- - player = L2World.getInstance().getPlayer(objectId);
- + player = World.getInstance().getPlayer(objectId);
- }
- public final void updateStat(String statName, int increment)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/tradelist/TradeList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/tradelist/TradeList.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/tradelist/TradeList.java (working copy)
- @@ -23,7 +23,7 @@
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.model.ItemRequest;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- import net.sf.l2j.gameserver.model.item.kind.Item;
- @@ -187,7 +187,7 @@
- if (isLocked())
- return null;
- - L2Object o = L2World.getInstance().getObject(objectId);
- + L2Object o = World.getInstance().getObject(objectId);
- if (!(o instanceof ItemInstance))
- return null;
- @@ -395,7 +395,7 @@
- private boolean validate()
- {
- // Check for Owner validity
- - if (_owner == null || L2World.getInstance().getPlayer(_owner.getObjectId()) == null)
- + if (_owner == null || World.getInstance().getPlayer(_owner.getObjectId()) == null)
- return false;
- // Check for Item validity
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/World.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/World.java (revision 0)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/World.java (working copy)
- @@ -0,0 +1,223 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.model;
- +
- +import java.util.Collection;
- +import java.util.Map;
- +import java.util.concurrent.ConcurrentHashMap;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.gameserver.datatables.CharNameTable;
- +import net.sf.l2j.gameserver.datatables.SpawnTable;
- +import net.sf.l2j.gameserver.model.actor.L2Npc;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- +
- +public final class World
- +{
- + private static Logger _log = Logger.getLogger(World.class.getName());
- +
- + // Geodata min/max tiles
- + public static final int TILE_X_MIN = 16;
- + public static final int TILE_X_MAX = 26;
- + public static final int TILE_Y_MIN = 10;
- + public static final int TILE_Y_MAX = 25;
- +
- + // Map dimensions
- + public static final int TILE_SIZE = 32768;
- + public static final int WORLD_X_MIN = (TILE_X_MIN - 20) * TILE_SIZE;
- + public static final int WORLD_X_MAX = (TILE_X_MAX - 19) * TILE_SIZE;
- + public static final int WORLD_Y_MIN = (TILE_Y_MIN - 18) * TILE_SIZE;
- + public static final int WORLD_Y_MAX = (TILE_Y_MAX - 17) * TILE_SIZE;
- +
- + // Regions and offsets
- + private static final int REGION_SIZE = 4096;
- + private static final int REGIONS_X = (WORLD_X_MAX - WORLD_X_MIN) / REGION_SIZE;
- + private static final int REGIONS_Y = (WORLD_Y_MAX - WORLD_Y_MIN) / REGION_SIZE;
- + private static final int REGION_X_OFFSET = Math.abs(WORLD_X_MIN / REGION_SIZE);
- + private static final int REGION_Y_OFFSET = Math.abs(WORLD_Y_MIN / REGION_SIZE);
- +
- + private final Map<Integer, L2Object> _objects = new ConcurrentHashMap<>();
- + private final Map<Integer, L2PetInstance> _pets = new ConcurrentHashMap<>();
- + private final Map<Integer, L2PcInstance> _players = new ConcurrentHashMap<>();
- +
- + private final WorldRegion[][] _worldRegions = new WorldRegion[REGIONS_X + 1][REGIONS_Y + 1];
- +
- + protected World()
- + {
- + for (int i = 0; i <= REGIONS_X; i++)
- + {
- + for (int j = 0; j <= REGIONS_Y; j++)
- + _worldRegions[i][j] = new WorldRegion(i, j);
- + }
- +
- + for (int x = 0; x <= REGIONS_X; x++)
- + {
- + for (int y = 0; y <= REGIONS_Y; y++)
- + {
- + for (int a = -1; a <= 1; a++)
- + {
- + for (int b = -1; b <= 1; b++)
- + {
- + if (validRegion(x + a, y + b))
- + _worldRegions[x + a][y + b].addSurroundingRegion(_worldRegions[x][y]);
- + }
- + }
- + }
- + }
- + _log.info("World: WorldRegion grid (" + REGIONS_X + " by " + REGIONS_Y + ") is now setted up.");
- + }
- +
- + public void addObject(L2Object object)
- + {
- + _objects.putIfAbsent(object.getObjectId(), object);
- + }
- +
- + public void removeObject(L2Object object)
- + {
- + _objects.remove(object.getObjectId());
- + }
- +
- + public Collection<L2Object> getObjects()
- + {
- + return _objects.values();
- + }
- +
- + public L2Object getObject(int objectId)
- + {
- + return _objects.get(objectId);
- + }
- +
- + public void addPlayer(L2PcInstance cha)
- + {
- + _players.putIfAbsent(cha.getObjectId(), cha);
- + }
- +
- + public void removePlayer(L2PcInstance cha)
- + {
- + _players.remove(cha.getObjectId());
- + }
- +
- + public Collection<L2PcInstance> getPlayers()
- + {
- + return _players.values();
- + }
- +
- + public L2PcInstance getPlayer(String name)
- + {
- + return _players.get(CharNameTable.getInstance().getPlayerObjectId(name));
- + }
- +
- + public L2PcInstance getPlayer(int objectId)
- + {
- + return _players.get(objectId);
- + }
- +
- + public L2PetInstance addPet(int ownerId, L2PetInstance pet)
- + {
- + return _pets.putIfAbsent(ownerId, pet);
- + }
- +
- + public void removePet(int ownerId)
- + {
- + _pets.remove(ownerId);
- + }
- +
- + public L2PetInstance getPet(int ownerId)
- + {
- + return _pets.get(ownerId);
- + }
- +
- + public static int getRegionX(int regionX)
- + {
- + return (regionX - REGION_X_OFFSET) * REGION_SIZE;
- + }
- +
- + public static int getRegionY(int regionY)
- + {
- + return (regionY - REGION_Y_OFFSET) * REGION_SIZE;
- + }
- +
- + /**
- + * @param point position of the object.
- + * @return the current WorldRegion of the object according to its position (x,y).
- + */
- + public WorldRegion getRegion(Location point)
- + {
- + return getRegion(point.getX(), point.getY());
- + }
- +
- + public WorldRegion getRegion(int x, int y)
- + {
- + return _worldRegions[(x - WORLD_X_MIN) / REGION_SIZE][(y - WORLD_Y_MIN) / REGION_SIZE];
- + }
- +
- + /**
- + * @return the whole 2d array containing the world regions used by ZoneData.java to setup zones inside the world regions
- + */
- + public WorldRegion[][] getWorldRegions()
- + {
- + return _worldRegions;
- + }
- +
- + /**
- + * @param x X position of the object
- + * @param y Y position of the object
- + * @return True if the given coordinates are valid WorldRegion coordinates.
- + */
- + private static boolean validRegion(int x, int y)
- + {
- + return (x >= 0 && x <= REGIONS_X && y >= 0 && y <= REGIONS_Y);
- + }
- +
- + /**
- + * Delete all spawns in the world.
- + */
- + public void deleteVisibleNpcSpawns()
- + {
- + _log.info("Deleting all visible NPCs.");
- + for (int i = 0; i <= REGIONS_X; i++)
- + {
- + for (int j = 0; j <= REGIONS_Y; j++)
- + {
- + for (L2Object obj : _worldRegions[i][j].getObjects())
- + {
- + if (obj instanceof L2Npc)
- + {
- + ((L2Npc) obj).deleteMe();
- +
- + final L2Spawn spawn = ((L2Npc) obj).getSpawn();
- + if (spawn != null)
- + {
- + spawn.setRespawnState(false);
- + SpawnTable.getInstance().deleteSpawn(spawn, false);
- + }
- + }
- + }
- + }
- + }
- + _log.info("All visibles NPCs are now deleted.");
- + }
- +
- + public static World getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final World _instance = new World();
- + }
- +}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/WorldRegion.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/WorldRegion.java (revision 0)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/WorldRegion.java (working copy)
- @@ -0,0 +1,259 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.model;
- +
- +import java.util.ArrayList;
- +import java.util.Collection;
- +import java.util.List;
- +import java.util.Map;
- +import java.util.concurrent.ConcurrentHashMap;
- +import java.util.concurrent.atomic.AtomicInteger;
- +
- +import net.sf.l2j.gameserver.ai.CtrlIntention;
- +import net.sf.l2j.gameserver.model.actor.L2Attackable;
- +import net.sf.l2j.gameserver.model.actor.L2Character;
- +import net.sf.l2j.gameserver.model.actor.L2Npc;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.model.zone.L2ZoneType;
- +import net.sf.l2j.gameserver.model.zone.type.L2DerbyTrackZone;
- +import net.sf.l2j.gameserver.model.zone.type.L2PeaceZone;
- +import net.sf.l2j.gameserver.model.zone.type.L2TownZone;
- +
- +public final class WorldRegion
- +{
- + private final Map<Integer, L2Object> _objects = new ConcurrentHashMap<>();
- +
- + private final List<WorldRegion> _surroundingRegions = new ArrayList<>();
- + private final List<L2ZoneType> _zones = new ArrayList<>();
- +
- + private final int _tileX;
- + private final int _tileY;
- +
- + private boolean _active;
- + private AtomicInteger _playersCount = new AtomicInteger();
- +
- + public WorldRegion(int x, int y)
- + {
- + _tileX = x;
- + _tileY = y;
- + }
- +
- + @Override
- + public String toString()
- + {
- + return "WorldRegion " + _tileX + "_" + _tileY + ", _active=" + _active + ", _playersCount=" + _playersCount.get() + "]";
- + }
- +
- + public Collection<L2Object> getObjects()
- + {
- + return _objects.values();
- + }
- +
- + public void addSurroundingRegion(WorldRegion region)
- + {
- + _surroundingRegions.add(region);
- + }
- +
- + public List<WorldRegion> getSurroundingRegions()
- + {
- + return _surroundingRegions;
- + }
- +
- + public List<L2ZoneType> getZones()
- + {
- + return _zones;
- + }
- +
- + public void addZone(L2ZoneType zone)
- + {
- + _zones.add(zone);
- + }
- +
- + public void removeZone(L2ZoneType zone)
- + {
- + _zones.remove(zone);
- + }
- +
- + public void revalidateZones(L2Character character)
- + {
- + // Do NOT update the world region while the character is still in the process of teleporting
- + if (character.isTeleporting())
- + return;
- +
- + _zones.forEach(z -> z.revalidateInZone(character));
- + }
- +
- + public void removeFromZones(L2Character character)
- + {
- + _zones.forEach(z -> z.removeCharacter(character));
- + }
- +
- + public boolean containsZone(int zoneId)
- + {
- + for (L2ZoneType z : _zones)
- + {
- + if (z.getId() == zoneId)
- + return true;
- + }
- + return false;
- + }
- +
- + public boolean checkEffectRangeInsidePeaceZone(L2Skill skill, final int x, final int y, final int z)
- + {
- + final int range = skill.getEffectRange();
- + final int up = y + range;
- + final int down = y - range;
- + final int left = x + range;
- + final int right = x - range;
- +
- + for (L2ZoneType e : _zones)
- + {
- + if ((e instanceof L2TownZone && ((L2TownZone) e).isPeaceZone()) || e instanceof L2DerbyTrackZone || e instanceof L2PeaceZone)
- + {
- + if (e.isInsideZone(x, up, z))
- + return false;
- +
- + if (e.isInsideZone(x, down, z))
- + return false;
- +
- + if (e.isInsideZone(left, y, z))
- + return false;
- +
- + if (e.isInsideZone(right, y, z))
- + return false;
- +
- + if (e.isInsideZone(x, y, z))
- + return false;
- + }
- + }
- + return true;
- + }
- +
- + public void onDeath(L2Character character)
- + {
- + _zones.stream().filter(z -> z.isCharacterInZone(character)).forEach(z -> z.onDieInside(character));
- + }
- +
- + public void onRevive(L2Character character)
- + {
- + _zones.stream().filter(z -> z.isCharacterInZone(character)).forEach(z -> z.onReviveInside(character));
- + }
- +
- + public boolean isActive()
- + {
- + return _active;
- + }
- +
- + public int getPlayersCount()
- + {
- + return _playersCount.get();
- + }
- +
- + /**
- + * Check if neighbors (including self) aren't inhabited.
- + * @return true if the above condition is met.
- + */
- + public boolean isEmptyNeighborhood()
- + {
- + for (WorldRegion neighbor : _surroundingRegions)
- + {
- + if (neighbor.getPlayersCount() != 0)
- + return false;
- + }
- + return true;
- + }
- +
- + /**
- + * This function turns this region's AI on or off.
- + * @param value : if true, activate hp/mp regen and random animation. If false, clean aggro/attack list, set objects on IDLE and drop their AI tasks.
- + */
- + public void setActive(boolean value)
- + {
- + if (_active == value)
- + return;
- +
- + _active = value;
- +
- + if (!value)
- + {
- + for (L2Object o : _objects.values())
- + {
- + if (o instanceof L2Attackable)
- + {
- + L2Attackable mob = (L2Attackable) o;
- +
- + // Set target to null and cancel Attack or Cast
- + mob.setTarget(null);
- +
- + // Stop movement
- + mob.stopMove(null);
- +
- + // Stop all active skills effects in progress on the L2Character
- + mob.stopAllEffects();
- +
- + mob.getAggroList().clear();
- + mob.getAttackByList().clear();
- +
- + // stop the ai tasks
- + if (mob.hasAI())
- + {
- + mob.getAI().setIntention(CtrlIntention.IDLE);
- + mob.getAI().stopAITask();
- + }
- + }
- + }
- + }
- + else
- + {
- + for (L2Object o : _objects.values())
- + {
- + if (o instanceof L2Attackable)
- + ((L2Attackable) o).getStatus().startHpMpRegeneration();
- + else if (o instanceof L2Npc)
- + ((L2Npc) o).startRandomAnimationTimer();
- + }
- + }
- + }
- +
- + /**
- + * Put the given object into WorldRegion objects map. If it's a player, increment the counter (used for region activation/desactivation).
- + * @param object : The object to register into this region.
- + */
- + public void addVisibleObject(L2Object object)
- + {
- + if (object == null)
- + return;
- +
- + _objects.put(object.getObjectId(), object);
- +
- + if (object instanceof L2PcInstance)
- + _playersCount.incrementAndGet();
- + }
- +
- + /**
- + * Remove the given object from WorldRegion objects map. If it's a player, decrement the counter (used for region activation/desactivation).
- + * @param object : The object to remove from this region.
- + */
- + public void removeVisibleObject(L2Object object)
- + {
- + if (object == null)
- + return;
- +
- + _objects.remove(object.getObjectId());
- +
- + if (object instanceof L2PcInstance)
- + _playersCount.decrementAndGet();
- + }
- +}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java (working copy)
- @@ -192,19 +192,15 @@
- for (L2Attackable raid : getKnownTypeInside(L2Attackable.class))
- {
- - if (raid.isRaid())
- - {
- - if (raid.getSpawn() == null || raid.isDead())
- - continue;
- -
- - if (!raid.isInsideRadius(raid.getSpawn().getLocX(), raid.getSpawn().getLocY(), 150, false))
- - raid.returnHome();
- - }
- + if (!raid.isRaid())
- + continue;
- +
- + raid.returnHome(true);
- }
- }
- }
- - else if (character instanceof L2Attackable && character.isRaid() && !character.isDead())
- - ((L2Attackable) character).returnHome();
- + else if (character instanceof L2Attackable && character.isRaid())
- + ((L2Attackable) character).returnHome(true);
- }
- /**
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2DynamicZone.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2DynamicZone.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2DynamicZone.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.commons.concurrent.ThreadPool;
- import net.sf.l2j.gameserver.model.L2Skill;
- -import net.sf.l2j.gameserver.model.L2WorldRegion;
- +import net.sf.l2j.gameserver.model.WorldRegion;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.zone.L2ZoneType;
- @@ -30,12 +30,12 @@
- */
- public class L2DynamicZone extends L2ZoneType
- {
- - private final L2WorldRegion _region;
- + private final WorldRegion _region;
- private final L2Character _owner;
- private Future<?> _task;
- private final L2Skill _skill;
- - public L2DynamicZone(L2WorldRegion region, L2Character owner, L2Skill skill)
- + public L2DynamicZone(WorldRegion region, L2Character owner, L2Skill skill)
- {
- super(-1);
- _region = region;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2WaterZone.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2WaterZone.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2WaterZone.java (working copy)
- @@ -38,7 +38,7 @@
- ((L2PcInstance) character).broadcastUserInfo();
- else if (character instanceof L2Npc)
- {
- - for (L2PcInstance player : character.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : character.getKnownType(L2PcInstance.class))
- {
- if (character.getMoveSpeed() == 0)
- player.sendPacket(new ServerObjectInfo((L2Npc) character, player));
- @@ -53,12 +53,11 @@
- {
- character.setInsideZone(ZoneId.WATER, false);
- - // TODO: update to only send speed status when that packet is known
- if (character instanceof L2PcInstance)
- ((L2PcInstance) character).broadcastUserInfo();
- else if (character instanceof L2Npc)
- {
- - for (L2PcInstance player : character.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : character.getKnownType(L2PcInstance.class))
- {
- if (character.getMoveSpeed() == 0)
- player.sendPacket(new ServerObjectInfo((L2Npc) character, player));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Action.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Action.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Action.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- @@ -57,7 +57,7 @@
- return;
- }
- - final L2Object obj = (activeChar.getTargetId() == _objectId) ? activeChar.getTarget() : L2World.getInstance().getObject(_objectId);
- + final L2Object obj = (activeChar.getTargetId() == _objectId) ? activeChar.getTarget() : World.getInstance().getObject(_objectId);
- if (obj == null)
- {
- activeChar.sendPacket(ActionFailed.STATIC_PACKET);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AddTradeItem.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AddTradeItem.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AddTradeItem.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.tradelist.TradeItem;
- import net.sf.l2j.gameserver.model.tradelist.TradeList;
- @@ -56,7 +56,7 @@
- }
- final L2PcInstance partner = trade.getPartner();
- - if (partner == null || L2World.getInstance().getPlayer(partner.getObjectId()) == null || partner.getActiveTradeList() == null)
- + if (partner == null || World.getInstance().getPlayer(partner.getObjectId()) == null || partner.getActiveTradeList() == null)
- {
- // Trade partner not found, cancel trade
- if (partner != null)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AnswerJoinPartyRoom.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AnswerJoinPartyRoom.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AnswerJoinPartyRoom.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.partymatching.PartyMatchRoom;
- import net.sf.l2j.gameserver.model.partymatching.PartyMatchRoomList;
- @@ -47,7 +47,7 @@
- return;
- final L2PcInstance partner = player.getActiveRequester();
- - if (partner == null || L2World.getInstance().getPlayer(partner.getObjectId()) == null)
- + if (partner == null || World.getInstance().getPlayer(partner.getObjectId()) == null)
- {
- // Partner hasn't be found, cancel the invitation
- player.sendPacket(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AnswerTradeRequest.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SendTradeDone;
- @@ -44,7 +44,7 @@
- }
- final L2PcInstance partner = player.getActiveRequester();
- - if (partner == null || L2World.getInstance().getPlayer(partner.getObjectId()) == null)
- + if (partner == null || World.getInstance().getPlayer(partner.getObjectId()) == null)
- {
- // Trade partner not found, cancel trade
- player.sendPacket(new SendTradeDone(0));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- @@ -58,7 +58,7 @@
- if (activeChar.getTargetId() == _objectId)
- target = activeChar.getTarget();
- else
- - target = L2World.getInstance().getObject(_objectId);
- + target = World.getInstance().getObject(_objectId);
- if (target == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)
- @@ -24,7 +24,7 @@
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- import net.sf.l2j.gameserver.model.L2ShortCut;
- import net.sf.l2j.gameserver.model.L2SkillLearn;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.template.PcTemplate;
- import net.sf.l2j.gameserver.model.base.Sex;
- @@ -132,10 +132,10 @@
- // send acknowledgement
- sendPacket(CharCreateOk.STATIC_PACKET);
- - L2World.getInstance().addObject(newChar);
- + World.getInstance().addObject(newChar);
- newChar.addAdena("Init", Config.STARTING_ADENA, null, false);
- - newChar.setXYZInvisible(template.getSpawnX(), template.getSpawnY(), template.getSpawnZ());
- + newChar.getPosition().set(template.getSpawn());
- newChar.setTitle("");
- newChar.registerShortCut(new L2ShortCut(0, 0, 3, 2, -1, 1)); // attack shortcut
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterSelected.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterSelected.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterSelected.java (working copy)
- @@ -14,7 +14,6 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.model.CharSelectInfoPackage;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.L2GameClient;
- @@ -54,28 +53,18 @@
- if (!FloodProtectors.performAction(client, Action.CHARACTER_SELECT))
- return;
- - // we should always be able to acquire the lock
- - // but if we cant lock then nothing should be done (ie repeated packet)
- + // we should always be able to acquire the lock but if we cant lock then nothing should be done (ie repeated packet)
- if (client.getActiveCharLock().tryLock())
- {
- try
- {
- - // should always be null
- - // but if not then this is repeated packet and nothing should be done here
- + // should always be null but if not then this is repeated packet and nothing should be done here
- if (client.getActiveChar() == null)
- {
- final CharSelectInfoPackage info = client.getCharSelection(_charSlot);
- - if (info == null)
- + if (info == null || info.getAccessLevel() < 0)
- return;
- - // Selected character is banned. Acts like if nothing occured...
- - if (info.getAccessLevel() < 0)
- - return;
- -
- - // The L2PcInstance must be created here, so that it can be attached to the L2GameClient
- - if (Config.DEBUG)
- - _log.fine("Selected slot: " + _charSlot);
- -
- // Load up character from disk
- final L2PcInstance cha = client.loadCharFromDisk(_charSlot);
- if (cha == null)
- @@ -88,8 +77,8 @@
- sendPacket(SSQInfo.sendSky());
- client.setState(GameClientState.IN_GAME);
- - CharSelected cs = new CharSelected(cha, client.getSessionId().playOkID1);
- - sendPacket(cs);
- +
- + sendPacket(new CharSelected(cha, client.getSessionId().playOkID1));
- }
- }
- finally
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/DlgAnswer.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/DlgAnswer.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/DlgAnswer.java (working copy)
- @@ -47,7 +47,7 @@
- else if (_messageId == SystemMessageId.S1_WISHES_TO_SUMMON_YOU_FROM_S2_DO_YOU_ACCEPT.getId())
- activeChar.teleportAnswer(_answer, _requesterId);
- else if (_messageId == 1983 && Config.ALLOW_WEDDING)
- - activeChar.EngageAnswer(_answer);
- + activeChar.engageAnswer(_answer);
- else if (_messageId == SystemMessageId.WOULD_YOU_LIKE_TO_OPEN_THE_GATE.getId())
- activeChar.activateGate(_answer, 1);
- else if (_messageId == SystemMessageId.WOULD_YOU_LIKE_TO_CLOSE_THE_GATE.getId())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy)
- @@ -17,6 +17,7 @@
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- +import java.util.Map.Entry;
- import java.util.logging.Level;
- import net.sf.l2j.Config;
- @@ -35,12 +36,12 @@
- import net.sf.l2j.gameserver.instancemanager.SiegeManager;
- import net.sf.l2j.gameserver.model.L2Clan;
- import net.sf.l2j.gameserver.model.L2Clan.SubPledge;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.base.ClassRace;
- import net.sf.l2j.gameserver.model.entity.ClanHall;
- -import net.sf.l2j.gameserver.model.entity.Couple;
- import net.sf.l2j.gameserver.model.entity.Siege;
- +import net.sf.l2j.gameserver.model.holder.IntIntHolder;
- import net.sf.l2j.gameserver.model.olympiad.Olympiad;
- import net.sf.l2j.gameserver.model.zone.ZoneId;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -136,13 +137,13 @@
- // Send a login notification to sponsor or apprentice, if logged.
- if (activeChar.getSponsor() != 0)
- {
- - final L2PcInstance sponsor = L2World.getInstance().getPlayer(activeChar.getSponsor());
- + final L2PcInstance sponsor = World.getInstance().getPlayer(activeChar.getSponsor());
- if (sponsor != null)
- sponsor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_APPRENTICE_S1_HAS_LOGGED_IN).addPcName(activeChar));
- }
- else if (activeChar.getApprentice() != 0)
- {
- - final L2PcInstance apprentice = L2World.getInstance().getPlayer(activeChar.getApprentice());
- + final L2PcInstance apprentice = World.getInstance().getPlayer(activeChar.getApprentice());
- if (apprentice != null)
- apprentice.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_SPONSOR_S1_HAS_LOGGED_IN).addPcName(activeChar));
- }
- @@ -198,14 +199,13 @@
- // Engage and notify partner.
- if (Config.ALLOW_WEDDING)
- {
- - for (Couple cl : CoupleManager.getInstance().getCouples())
- + for (Entry<Integer, IntIntHolder> coupleEntry : CoupleManager.getInstance().getCouples().entrySet())
- {
- - if (cl.getPlayer1Id() == objectId || cl.getPlayer2Id() == objectId)
- + final IntIntHolder couple = coupleEntry.getValue();
- + if (couple.getId() == objectId || couple.getValue() == objectId)
- {
- - if (cl.getMaried())
- - activeChar.setMarried(true);
- -
- - activeChar.setCoupleId(cl.getId());
- + activeChar.setCoupleId(coupleEntry.getKey());
- + break;
- }
- }
- }
- @@ -227,6 +227,11 @@
- activeChar.sendPacket(new ItemList(activeChar, false));
- activeChar.sendPacket(new ShortCutInit(activeChar));
- activeChar.sendPacket(new ExStorageMaxCount(activeChar));
- +
- + // no broadcast needed since the player will already spawn dead to others
- + if (activeChar.isAlikeDead())
- + activeChar.sendPacket(new Die(activeChar));
- +
- activeChar.updateEffectIcons();
- activeChar.sendPacket(new EtcStatusUpdate(activeChar));
- activeChar.sendSkillList();
- @@ -309,10 +314,6 @@
- PetitionManager.getInstance().checkPetitionMessages(activeChar);
- - // no broadcast needed since the player will already spawn dead to others
- - if (activeChar.isAlikeDead())
- - sendPacket(new Die(activeChar));
- -
- activeChar.onPlayerEnter();
- sendPacket(new SkillCoolTime(activeChar));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAskJoinPartyRoom.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAskJoinPartyRoom.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestAskJoinPartyRoom.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ExAskJoinPartyRoom;
- @@ -38,7 +38,7 @@
- return;
- // Send PartyRoom invite request (with activeChar) name to the target
- - final L2PcInstance target = L2World.getInstance().getPlayer(_name);
- + final L2PcInstance target = World.getInstance().getPlayer(_name);
- if (target != null)
- {
- if (!target.isProcessingRequest())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
- @@ -23,7 +23,7 @@
- import net.sf.l2j.gameserver.handler.AdminCommandHandler;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.instance.L2OlympiadManagerInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- @@ -109,7 +109,7 @@
- try
- {
- - final L2Object object = L2World.getInstance().getObject(Integer.parseInt(id));
- + final L2Object object = World.getInstance().getObject(Integer.parseInt(id));
- if (object != null && object instanceof L2Npc && endOfId > 0 && ((L2Npc) object).canInteract(activeChar))
- ((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCrystallizeItem.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCrystallizeItem.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCrystallizeItem.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.L2Skill;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- import net.sf.l2j.gameserver.model.item.type.CrystalType;
- @@ -169,7 +169,7 @@
- activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(createditem.getItemId()).addItemNumber(crystalAmount));
- activeChar.broadcastUserInfo();
- - L2World.getInstance().removeObject(removedItem);
- + World.getInstance().removeObject(removedItem);
- activeChar.setCrystallizing(false);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDuelStart.java (working copy)
- @@ -16,7 +16,7 @@
- import net.sf.l2j.gameserver.model.L2CommandChannel;
- import net.sf.l2j.gameserver.model.L2Party;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ExDuelAskStart;
- @@ -41,7 +41,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance targetChar = L2World.getInstance().getPlayer(_player);
- + final L2PcInstance targetChar = World.getInstance().getPlayer(_player);
- if (targetChar == null || activeChar == targetChar)
- {
- activeChar.sendPacket(SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (working copy)
- @@ -20,7 +20,7 @@
- import net.sf.l2j.gameserver.datatables.ArmorSetsTable;
- import net.sf.l2j.gameserver.datatables.SkillTable;
- import net.sf.l2j.gameserver.model.L2Skill;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.item.ArmorSet;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -276,7 +276,7 @@
- else
- activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ENCHANTMENT_FAILED_S1_EVAPORATED).addItemName(item.getItemId()));
- - L2World.getInstance().removeObject(destroyItem);
- + World.getInstance().removeObject(destroyItem);
- if (crystalId == 0)
- activeChar.sendPacket(EnchantResult.UNK_RESULT_4);
- else
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEvaluate.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEvaluate.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEvaluate.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -37,7 +37,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance target = L2World.getInstance().getPlayer(_targetId);
- + final L2PcInstance target = World.getInstance().getPlayer(_targetId);
- if (target == null)
- {
- activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExAskJoinMPCC.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExAskJoinMPCC.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExAskJoinMPCC.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.L2Party;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ExAskJoinMPCC;
- @@ -42,7 +42,7 @@
- if (activeChar == null)
- return;
- - L2PcInstance player = L2World.getInstance().getPlayer(_name);
- + L2PcInstance player = World.getInstance().getPlayer(_name);
- if (player == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExMPCCShowPartyMembersInfo.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExMPCCShowPartyMembersInfo.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExMPCCShowPartyMembersInfo.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.ExMPCCShowPartyMemberInfo;
- @@ -39,7 +39,7 @@
- if (activeChar == null)
- return;
- - L2PcInstance player = L2World.getInstance().getPlayer(_partyLeaderId);
- + L2PcInstance player = World.getInstance().getPlayer(_partyLeaderId);
- if (player != null && player.isInParty())
- activeChar.sendPacket(new ExMPCCShowPartyMemberInfo(player.getParty()));
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExOustFromMPCC.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExOustFromMPCC.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExOustFromMPCC.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.L2Party;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -40,7 +40,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance target = L2World.getInstance().getPlayer(_name);
- + final L2PcInstance target = World.getInstance().getPlayer(_name);
- if (target == null)
- {
- activeChar.sendPacket(SystemMessageId.TARGET_CANT_FOUND);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendDel.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendDel.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendDel.java (working copy)
- @@ -20,7 +20,7 @@
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.FriendList;
- @@ -67,7 +67,7 @@
- activeChar.getFriendList().remove(Integer.valueOf(id));
- activeChar.sendPacket(new FriendList(activeChar)); // update friendList *heavy method*
- - L2PcInstance player = L2World.getInstance().getPlayer(_name);
- + L2PcInstance player = World.getInstance().getPlayer(_name);
- if (player != null)
- {
- player.getFriendList().remove(Integer.valueOf(activeChar.getObjectId()));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.BlockList;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.FriendAddRequest;
- @@ -38,7 +38,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance friend = L2World.getInstance().getPlayer(_name);
- + final L2PcInstance friend = World.getInstance().getPlayer(_name);
- // can't use friend invite for locating invisible characters
- if (friend == null || !friend.isOnline() || friend.getAppearance().getInvisible())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendList.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendList.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -43,7 +43,7 @@
- if (friendName == null)
- continue;
- - final L2PcInstance friend = L2World.getInstance().getPlayer(id);
- + final L2PcInstance friend = World.getInstance().getPlayer(id);
- activeChar.sendPacket(SystemMessage.getSystemMessage((friend == null || !friend.isOnline()) ? SystemMessageId.S1_OFFLINE : SystemMessageId.S1_ONLINE).addString(friendName));
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGetItemFromPet.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGetItemFromPet.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGetItemFromPet.java (working copy)
- @@ -59,7 +59,6 @@
- final L2PetInstance pet = (L2PetInstance) player.getPet();
- - if (pet.transferItem("Transfer", _objectId, _amount, player.getInventory(), player, pet) == null)
- - _log.warning("Invalid item transfer request: " + pet.getName() + "(pet) --> " + player.getName());
- + pet.transferItem("Transfer", _objectId, _amount, player.getInventory(), player, pet);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java (working copy)
- @@ -19,6 +19,7 @@
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.model.item.type.EtcItemType;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.EnchantResult;
- import net.sf.l2j.gameserver.util.Util;
- @@ -68,7 +69,7 @@
- if (item == null || item.isAugmented())
- return;
- - if (item.isHeroItem() || !item.isDropable() || !item.isDestroyable() || !item.isTradable())
- + if (item.isHeroItem() || !item.isDropable() || !item.isDestroyable() || !item.isTradable() || item.getItem().getItemType() == EtcItemType.ARROW || item.getItem().getItemType() == EtcItemType.SHOT)
- {
- player.sendPacket(SystemMessageId.ITEM_NOT_FOR_PETS);
- return;
- @@ -106,7 +107,6 @@
- player.sendPacket(SystemMessageId.ENCHANT_SCROLL_CANCELLED);
- }
- - if (player.transferItem("Transfer", _objectId, _amount, pet.getInventory(), pet) == null)
- - _log.warning("Invalid item transfer request: " + pet.getName() + "(pet) --> " + player.getName());
- + player.transferItem("Transfer", _objectId, _amount, pet.getInventory(), pet);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGMCommand.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGMCommand.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGMCommand.java (working copy)
- @@ -16,7 +16,7 @@
- import net.sf.l2j.gameserver.datatables.ClanTable;
- import net.sf.l2j.gameserver.model.L2Clan;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.GMViewCharacterInfo;
- import net.sf.l2j.gameserver.network.serverpackets.GMViewHennaInfo;
- @@ -49,7 +49,7 @@
- if (!activeChar.isGM() || !activeChar.getAccessLevel().allowAltG())
- return;
- - final L2PcInstance target = L2World.getInstance().getPlayer(_targetName);
- + final L2PcInstance target = World.getInstance().getPlayer(_targetName);
- final L2Clan clan = ClanTable.getInstance().getClanByName(_targetName);
- if (target == null && (clan == null || _command != 6))
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinAlly.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinAlly.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinAlly.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.L2Clan;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.AskJoinAlly;
- @@ -45,7 +45,7 @@
- return;
- }
- - final L2PcInstance target = L2World.getInstance().getPlayer(_id);
- + final L2PcInstance target = World.getInstance().getPlayer(_id);
- if (target == null)
- {
- activeChar.sendPacket(SystemMessageId.YOU_HAVE_INVITED_THE_WRONG_TARGET);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java (working copy)
- @@ -17,7 +17,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.model.BlockList;
- import net.sf.l2j.gameserver.model.L2Party;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.AskJoinParty;
- @@ -45,7 +45,7 @@
- if (requestor == null)
- return;
- - final L2PcInstance target = L2World.getInstance().getPlayer(_name);
- + final L2PcInstance target = World.getInstance().getPlayer(_name);
- if (target == null)
- {
- requestor.sendPacket(SystemMessageId.FIRST_SELECT_USER_TO_INVITE_TO_PARTY);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinPledge.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinPledge.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinPledge.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.model.L2Clan;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.AskJoinPledge;
- @@ -44,7 +44,7 @@
- if (clan == null)
- return;
- - final L2PcInstance target = L2World.getInstance().getPlayer(_target);
- + final L2PcInstance target = World.getInstance().getPlayer(_target);
- if (target == null)
- {
- activeChar.sendPacket(SystemMessageId.YOU_HAVE_INVITED_THE_WRONG_TARGET);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java (working copy)
- @@ -85,6 +85,12 @@
- if (activeChar.isAttackingNow())
- {
- + if (skill.isToggle())
- + {
- + activeChar.sendPacket(ActionFailed.STATIC_PACKET);
- + return;
- + }
- +
- activeChar.getAI().setNextAction(new NextAction(CtrlEvent.EVT_READY_TO_ACT, CtrlIntention.CAST, new Runnable()
- {
- @Override
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestOustFromPartyRoom.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestOustFromPartyRoom.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestOustFromPartyRoom.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.partymatching.PartyMatchRoom;
- import net.sf.l2j.gameserver.model.partymatching.PartyMatchRoomList;
- @@ -45,7 +45,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance member = L2World.getInstance().getPlayer(_charid);
- + final L2PcInstance member = World.getInstance().getPlayer(_charid);
- if (member == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPetGetItem.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPetGetItem.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPetGetItem.java (working copy)
- @@ -16,7 +16,7 @@
- import net.sf.l2j.gameserver.ai.CtrlIntention;
- import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- @@ -38,7 +38,7 @@
- if (activeChar == null || !activeChar.hasPet())
- return;
- - final L2Object item = L2World.getInstance().getObject(_objectId);
- + final L2Object item = World.getInstance().getObject(_objectId);
- if (item == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (working copy)
- @@ -19,7 +19,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.model.ItemRequest;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.StoreType;
- import net.sf.l2j.gameserver.model.tradelist.TradeList;
- @@ -69,7 +69,7 @@
- if (_items == null)
- return;
- - L2PcInstance storePlayer = L2World.getInstance().getPlayer(_storePlayerId);
- + L2PcInstance storePlayer = World.getInstance().getPlayer(_storePlayerId);
- if (storePlayer == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (working copy)
- @@ -16,7 +16,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.model.ItemRequest;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.StoreType;
- import net.sf.l2j.gameserver.model.tradelist.TradeList;
- @@ -67,7 +67,7 @@
- if (_items == null)
- return;
- - L2PcInstance storePlayer = L2World.getInstance().getPlayer(_storePlayerId);
- + L2PcInstance storePlayer = World.getInstance().getPlayer(_storePlayerId);
- if (storePlayer == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeInfo.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeInfo.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeInfo.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.StoreType;
- import net.sf.l2j.gameserver.network.serverpackets.RecipeShopItemInfo;
- @@ -37,7 +37,7 @@
- if (player == null)
- return;
- - final L2PcInstance shop = L2World.getInstance().getPlayer(_playerObjectId);
- + final L2PcInstance shop = World.getInstance().getPlayer(_playerObjectId);
- if (shop == null || shop.getStoreType() != StoreType.MANUFACTURE)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java (working copy)
- @@ -15,7 +15,7 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- import net.sf.l2j.gameserver.datatables.RecipeTable;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.StoreType;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -48,7 +48,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance manufacturer = L2World.getInstance().getPlayer(_id);
- + final L2PcInstance manufacturer = World.getInstance().getPlayer(_id);
- if (manufacturer == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java (working copy)
- @@ -32,6 +32,6 @@
- return;
- activeChar.sendPacket(new UserInfo(activeChar));
- - activeChar.getKnownList().refreshInfos();
- + activeChar.refreshInfos();
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java (working copy)
- @@ -19,7 +19,7 @@
- import java.util.logging.Logger;
- import net.sf.l2j.Config;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.L2FriendSay;
- @@ -52,7 +52,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance targetPlayer = L2World.getInstance().getPlayer(_reciever);
- + final L2PcInstance targetPlayer = World.getInstance().getPlayer(_reciever);
- if (targetPlayer == null || !targetPlayer.getFriendList().contains(activeChar.getObjectId()))
- {
- activeChar.sendPacket(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SnoopQuit.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SnoopQuit.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SnoopQuit.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- /**
- @@ -37,7 +37,7 @@
- if (activeChar == null)
- return;
- - final L2PcInstance target = L2World.getInstance().getPlayer(_snoopID);
- + final L2PcInstance target = World.getInstance().getPlayer(_snoopID);
- if (target == null)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeDone.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeDone.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeDone.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.network.clientpackets;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.tradelist.TradeList;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -57,7 +57,7 @@
- // Trade partner not found, cancel trade
- final L2PcInstance partner = trade.getPartner();
- - if (partner == null || L2World.getInstance().getPlayer(partner.getObjectId()) == null)
- + if (partner == null || World.getInstance().getPlayer(partner.getObjectId()) == null)
- {
- player.sendPacket(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME);
- player.cancelActiveTrade();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java (working copy)
- @@ -16,7 +16,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.model.BlockList;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- @@ -47,8 +47,8 @@
- return;
- }
- - final L2PcInstance target = L2World.getInstance().getPlayer(_objectId);
- - if (target == null || !player.getKnownList().knowsObject(target) || target.equals(player))
- + final L2PcInstance target = World.getInstance().getPlayer(_objectId);
- + if (target == null || !player.getKnownType(L2PcInstance.class).contains(target) || target.equals(player))
- {
- player.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/L2GameClient.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/L2GameClient.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/L2GameClient.java (working copy)
- @@ -40,7 +40,7 @@
- import net.sf.l2j.gameserver.datatables.ClanTable;
- import net.sf.l2j.gameserver.model.CharSelectInfoPackage;
- import net.sf.l2j.gameserver.model.L2Clan;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
- @@ -395,37 +395,39 @@
- }
- }
- - public L2PcInstance loadCharFromDisk(int charslot)
- + public L2PcInstance loadCharFromDisk(int slot)
- {
- - final int objId = getObjectIdForSlot(charslot);
- - if (objId < 0)
- + final int objectId = getObjectIdForSlot(slot);
- + if (objectId < 0)
- return null;
- - L2PcInstance character = L2World.getInstance().getPlayer(objId);
- - if (character != null)
- + L2PcInstance player = World.getInstance().getPlayer(objectId);
- + if (player != null)
- {
- // exploit prevention, should not happens in normal way
- - _log.severe("Attempt of double login: " + character.getName() + "(" + objId + ") " + getAccountName());
- - if (character.getClient() != null)
- - character.getClient().closeNow();
- + _log.severe("Attempt of double login: " + player.getName() + "(" + objectId + ") " + getAccountName());
- +
- + if (player.getClient() != null)
- + player.getClient().closeNow();
- else
- - character.deleteMe();
- + player.deleteMe();
- return null;
- }
- - character = L2PcInstance.restore(objId);
- - if (character != null)
- + player = L2PcInstance.restore(objectId);
- + if (player != null)
- {
- - character.setRunning(); // running is default
- - character.standUp(); // standing is default
- + player.setRunning(); // running is default
- + player.standUp(); // standing is default
- - character.setOnlineStatus(true, false);
- + player.setOnlineStatus(true, false);
- + World.getInstance().addPlayer(player);
- }
- else
- - _log.severe("L2GameClient: could not restore in slot: " + charslot);
- + _log.severe("L2GameClient: could not restore in slot: " + slot);
- - return character;
- + return player;
- }
- /**
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExRegenMax.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExRegenMax.java (revision 0)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/ExRegenMax.java (working copy)
- @@ -0,0 +1,40 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.network.serverpackets;
- +
- +public final class ExRegenMax extends L2GameServerPacket
- +{
- + private final int _count;
- + private final int _time;
- + private final double _hpRegen;
- +
- + public ExRegenMax(int count, int time, double hpRegen)
- + {
- + _count = count;
- + _time = time;
- + _hpRegen = hpRegen * 0.66;
- + }
- +
- + @Override
- + protected void writeImpl()
- + {
- + writeC(0xFE);
- + writeH(0x01);
- + writeD(1);
- + writeD(_count);
- + writeD(_time);
- + writeF(_hpRegen);
- + }
- +}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/FriendList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/FriendList.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/FriendList.java (working copy)
- @@ -18,7 +18,7 @@
- import java.util.List;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- /**
- @@ -50,7 +50,7 @@
- for (int objId : player.getFriendList())
- {
- final String name = CharNameTable.getInstance().getPlayerName(objId);
- - final L2PcInstance player1 = L2World.getInstance().getPlayer(objId);
- + final L2PcInstance player1 = World.getInstance().getPlayer(objId);
- _info.add(new FriendInfo(objId, name, (player1 != null && player1.isOnline())));
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/FriendStatus.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/FriendStatus.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/FriendStatus.java (working copy)
- @@ -13,7 +13,7 @@
- package net.sf.l2j.gameserver.network.serverpackets;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- /**
- * Support for "Chat with Friends" dialog. <BR>
- @@ -34,7 +34,7 @@
- {
- _objid = objId;
- _name = CharNameTable.getInstance().getPlayerName(objId);
- - _online = L2World.getInstance().getPlayer(objId) != null;
- + _online = World.getInstance().getPlayer(objId) != null;
- }
- @Override
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeBookItemList.java (working copy)
- @@ -56,7 +56,7 @@
- for (RecipeList recipe : _recipes)
- {
- writeD(recipe.getId());
- - writeD(i + 1);
- + writeD(++i);
- }
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/RecipeShopManageList.java (working copy)
- @@ -72,7 +72,7 @@
- for (RecipeList recipe : _recipes)
- {
- writeD(recipe.getId());
- - writeD(i + 1);
- + writeD(++i);
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SetupGauge.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SetupGauge.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/SetupGauge.java (working copy)
- @@ -16,34 +16,38 @@
- public class SetupGauge extends L2GameServerPacket
- {
- - public static final int BLUE = 0;
- - public static final int RED = 1;
- - public static final int CYAN = 2;
- + public enum GaugeColor
- + {
- + BLUE,
- + RED,
- + CYAN,
- + GREEN
- + }
- - private final int _dat1;
- + private final GaugeColor _color;
- private final int _time;
- - private final int _time2;
- + private final int _maxTime;
- - public SetupGauge(int dat1, int time)
- + public SetupGauge(GaugeColor color, int time)
- {
- - _dat1 = dat1;
- + _color = color;
- _time = time;
- - _time2 = time;
- + _maxTime = time;
- }
- - public SetupGauge(int color, int currentTime, int maxTime)
- + public SetupGauge(GaugeColor color, int currentTime, int maxTime)
- {
- - _dat1 = color;
- + _color = color;
- _time = currentTime;
- - _time2 = maxTime;
- + _maxTime = maxTime;
- }
- @Override
- protected final void writeImpl()
- {
- writeC(0x6d);
- - writeD(_dat1);
- + writeD(_color.ordinal());
- writeD(_time);
- - writeD(_time2);
- + writeD(_maxTime);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/quests/Q420_LittleWing.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/quests/Q420_LittleWing.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/quests/Q420_LittleWing.java (working copy)
- @@ -16,6 +16,7 @@
- import net.sf.l2j.commons.random.Rnd;
- +import net.sf.l2j.gameserver.model.SpawnLocation;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.scripting.Quest;
- @@ -72,13 +73,23 @@
- private static final int SHAMHAI = 30752;
- private static final int COOPER = 30829;
- + // Spawn Points
- + private static final SpawnLocation[] LOCATIONS =
- + {
- + new SpawnLocation(109816, 40854, -4640, 0),
- + new SpawnLocation(108940, 41615, -4643, 0),
- + new SpawnLocation(110395, 41625, -4642, 0)
- + };
- +
- + private static int _counter = 0;
- +
- public Q420_LittleWing()
- {
- super(420, "Little Wing");
- setItemsIds(FAIRY_STONE, DELUXE_FAIRY_STONE, FAIRY_STONE_LIST, DELUXE_FAIRY_STONE_LIST, TOAD_LORD_BACK_SKIN, JUICE_OF_MONKSHOOD, SCALE_OF_DRAKE_EXARION, EGG_OF_DRAKE_EXARION, SCALE_OF_DRAKE_ZWOV, EGG_OF_DRAKE_ZWOV, SCALE_OF_DRAKE_KALIBRAN, EGG_OF_DRAKE_KALIBRAN, SCALE_OF_WYVERN_SUZET, EGG_OF_WYVERN_SUZET, SCALE_OF_WYVERN_SHAMHAI, EGG_OF_WYVERN_SHAMHAI);
- - addStartNpc(COOPER);
- + addStartNpc(COOPER, MIMYU);
- addTalkId(MARIA, CRONOS, BYRON, MIMYU, EXARION, ZWOV, KALIBRAN, SUZET, SHAMHAI, COOPER);
- addKillId(20202, 20231, 20233, 20270, 20551, 20580, 20589, 20590, 20591, 20592, 20593, 20594, 20595, 20596, 20597, 20598, 20599);
- @@ -278,7 +289,17 @@
- switch (st.getState())
- {
- case STATE_CREATED:
- - htmltext = (player.getLevel() >= 35) ? "30829-01.htm" : "30829-03.htm";
- + switch (npc.getNpcId())
- + {
- + case COOPER:
- + htmltext = (player.getLevel() >= 35) ? "30829-01.htm" : "30829-03.htm";
- + break;
- +
- + case MIMYU:
- + _counter += 1;
- + npc.teleToLocation(LOCATIONS[_counter % 3], 0);
- + return null;
- + }
- break;
- case STATE_STARTED:
- @@ -384,6 +405,12 @@
- }
- else if (cond == 7)
- htmltext = "30747-11.htm";
- + else
- + {
- + _counter += 1;
- + npc.teleToLocation(LOCATIONS[_counter % 3], 0);
- + return null;
- + }
- break;
- case EXARION:
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/quests/SagasScripts/SagasSuperClass.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/quests/SagasScripts/SagasSuperClass.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/quests/SagasScripts/SagasSuperClass.java (working copy)
- @@ -26,7 +26,7 @@
- import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Party;
- import net.sf.l2j.gameserver.model.L2Skill;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Attackable;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- @@ -183,7 +183,7 @@
- {
- if (_SpawnList.containsKey(npc))
- {
- - final L2PcInstance player = L2World.getInstance().getPlayer(_SpawnList.get(npc));
- + final L2PcInstance player = World.getInstance().getPlayer(_SpawnList.get(npc));
- if (player != null)
- return player.getQuestState(getName());
- }
- @@ -480,7 +480,7 @@
- else if (event.equalsIgnoreCase("Mob_3 Timer 1"))
- {
- // Search the NPC.
- - L2Npc Mob_2 = (L2Npc) L2World.getInstance().getObject(st.getInt("Mob_2"));
- + L2Npc Mob_2 = (L2Npc) World.getInstance().getObject(st.getInt("Mob_2"));
- if (Mob_2 == null)
- return null;
- @@ -820,7 +820,7 @@
- {
- if (_SpawnList.containsKey(npc) && _SpawnList.get(npc) != player.getObjectId())
- {
- - L2PcInstance quest_player = L2World.getInstance().getPlayer(_SpawnList.get(npc));
- + L2PcInstance quest_player = World.getInstance().getPlayer(_SpawnList.get(npc));
- if (quest_player == null)
- return null;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/Monastery.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/Monastery.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/Monastery.java (working copy)
- @@ -25,7 +25,6 @@
- import net.sf.l2j.gameserver.scripting.EventType;
- import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript;
- import net.sf.l2j.gameserver.templates.skills.L2SkillType;
- -import net.sf.l2j.gameserver.util.Util;
- /**
- * This script holds MoS monsters behavior. If they see you with an equipped weapon, they will speak and attack you.
- @@ -108,9 +107,9 @@
- @Override
- public String onSpawn(L2Npc npc)
- {
- - for (L2PcInstance target : npc.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance target : npc.getKnownTypeInRadius(L2PcInstance.class, npc.getTemplate().getAggroRange()))
- {
- - if (!target.isDead() && GeoEngine.getInstance().canSeeTarget(npc, target) && Util.checkIfInRange(npc.getTemplate().getAggroRange(), npc, target, true))
- + if (!target.isDead() && GeoEngine.getInstance().canSeeTarget(npc, target))
- {
- if (target.getActiveWeaponInstance() != null && !npc.isInCombat() && npc.getTarget() == null)
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PlainsOfDion.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PlainsOfDion.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PlainsOfDion.java (working copy)
- @@ -70,9 +70,9 @@
- {
- npc.broadcastNpcSay(MONSTERS_MSG[Rnd.get(5)].replace("$s1", player.getName()));
- - for (L2MonsterInstance obj : npc.getKnownList().getKnownTypeInRadius(L2MonsterInstance.class, 300))
- + for (L2MonsterInstance obj : npc.getKnownTypeInRadius(L2MonsterInstance.class, 300))
- {
- - if (ArraysUtil.contains(MONSTERS, obj.getNpcId()) && !obj.isAttackingNow() && !obj.isDead() && GeoEngine.getInstance().canSeeTarget(npc, obj))
- + if (!obj.isAttackingNow() && !obj.isDead() && ArraysUtil.contains(MONSTERS, obj.getNpcId()) && GeoEngine.getInstance().canSeeTarget(npc, obj))
- {
- attack(obj, player);
- obj.broadcastNpcSay(MONSTERS_ASSIST_MSG[Rnd.get(3)]);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PrimevalIsle.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PrimevalIsle.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PrimevalIsle.java (working copy)
- @@ -84,7 +84,7 @@
- if (event.equalsIgnoreCase("skill"))
- {
- int playableCounter = 0;
- - for (L2Playable playable : npc.getKnownList().getKnownTypeInRadius(L2Playable.class, npc.getTemplate().getAggroRange()))
- + for (L2Playable playable : npc.getKnownTypeInRadius(L2Playable.class, npc.getTemplate().getAggroRange()))
- {
- if (!playable.isDead())
- playableCounter++;
- @@ -136,7 +136,7 @@
- final L2Playable originalAttacker = (isPet ? attacker.getPet() : attacker);
- // Make all mobs found in a radius 2k aggressive towards attacker.
- - for (L2Attackable called : attacker.getKnownList().getKnownTypeInRadius(L2Attackable.class, 2000))
- + for (L2Attackable called : attacker.getKnownTypeInRadius(L2Attackable.class, 2000))
- {
- // Caller hasn't AI or is dead.
- if (!called.hasAI() || called.isDead())
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/StakatoNest.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/StakatoNest.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/StakatoNest.java (working copy)
- @@ -69,7 +69,7 @@
- {
- if (npc.getCurrentHp() / npc.getMaxHp() < 0.3 && Rnd.get(100) < 5)
- {
- - for (L2MonsterInstance follower : npc.getKnownList().getKnownTypeInRadius(L2MonsterInstance.class, 400))
- + for (L2MonsterInstance follower : npc.getKnownTypeInRadius(L2MonsterInstance.class, 400))
- {
- if (follower.getNpcId() == STAKATO_FOLLOWER && !follower.isDead())
- {
- @@ -89,7 +89,7 @@
- switch (npc.getNpcId())
- {
- case MALE_SPIKED_STAKATO_1:
- - for (L2MonsterInstance angryFemale : npc.getKnownList().getKnownTypeInRadius(L2MonsterInstance.class, 400))
- + for (L2MonsterInstance angryFemale : npc.getKnownTypeInRadius(L2MonsterInstance.class, 400))
- {
- if (angryFemale.getNpcId() == FEMALE_SPIKED_STAKATO && !angryFemale.isDead())
- {
- @@ -103,7 +103,7 @@
- break;
- case FEMALE_SPIKED_STAKATO:
- - for (L2MonsterInstance morphingMale : npc.getKnownList().getKnownTypeInRadius(L2MonsterInstance.class, 400))
- + for (L2MonsterInstance morphingMale : npc.getKnownTypeInRadius(L2MonsterInstance.class, 400))
- {
- if (morphingMale.getNpcId() == MALE_SPIKED_STAKATO_1 && !morphingMale.isDead())
- {
- @@ -116,7 +116,7 @@
- break;
- case SPIKED_STAKATO_NURSE_1:
- - for (L2MonsterInstance baby : npc.getKnownList().getKnownTypeInRadius(L2MonsterInstance.class, 400))
- + for (L2MonsterInstance baby : npc.getKnownTypeInRadius(L2MonsterInstance.class, 400))
- {
- if (baby.getNpcId() == SPIKED_STAKATO_BABY && !baby.isDead())
- {
- @@ -130,7 +130,7 @@
- break;
- case SPIKED_STAKATO_BABY:
- - for (L2MonsterInstance morphingNurse : npc.getKnownList().getKnownTypeInRadius(L2MonsterInstance.class, 400))
- + for (L2MonsterInstance morphingNurse : npc.getKnownTypeInRadius(L2MonsterInstance.class, 400))
- {
- if (morphingNurse.getNpcId() == SPIKED_STAKATO_NURSE_1 && !morphingNurse.isDead())
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Antharas.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Antharas.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Antharas.java (working copy)
- @@ -328,7 +328,7 @@
- return;
- // Pickup a target if no or dead victim. 10% luck he decides to reconsiders his target.
- - if (_actualVictim == null || _actualVictim.isDead() || !(npc.getKnownList().knowsObject(_actualVictim)) || Rnd.get(10) == 0)
- + if (_actualVictim == null || _actualVictim.isDead() || !(npc.getKnownType(L2PcInstance.class).contains(_actualVictim)) || Rnd.get(10) == 0)
- _actualVictim = getRandomPlayer(npc);
- // If result is still null, Antharas will roam. Don't go deeper in skill AI.
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Baium.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Baium.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Baium.java (working copy)
- @@ -392,7 +392,7 @@
- int npcId = npc.getNpcId();
- List<L2Character> result = new ArrayList<>();
- - for (L2Character obj : npc.getKnownList().getKnownType(L2Character.class))
- + for (L2Character obj : npc.getKnownType(L2Character.class))
- {
- if (obj instanceof L2PcInstance)
- {
- @@ -435,7 +435,7 @@
- return;
- // Pickup a target if no or dead victim. If Baium was hitting an angel, 50% luck he reconsiders his target. 10% luck he decides to reconsiders his target.
- - if (_actualVictim == null || _actualVictim.isDead() || !(npc.getKnownList().knowsObject(_actualVictim)) || (_actualVictim instanceof L2MonsterInstance && Rnd.get(10) < 5) || Rnd.get(10) == 0)
- + if (_actualVictim == null || _actualVictim.isDead() || !(npc.getKnownType(L2PcInstance.class).contains(_actualVictim)) || (_actualVictim instanceof L2MonsterInstance && Rnd.get(10) < 5) || Rnd.get(10) == 0)
- _actualVictim = getRandomTarget(npc);
- // If result is null, return directly.
- @@ -474,7 +474,7 @@
- final int chance = Rnd.get(100); // Remember, it's 0 to 99, not 1 to 100.
- // If Baium feels surrounded or see 2+ angels, he unleashes his wrath upon heads :).
- - if (getPlayersCountInRadius(600, npc, false) >= 20 || npc.getKnownList().getKnownTypeInRadius(L2MonsterInstance.class, 600).size() >= 2)
- + if (getPlayersCountInRadius(600, npc, false) >= 20 || npc.getKnownTypeInRadius(L2MonsterInstance.class, 600).size() >= 2)
- {
- if (chance < 25)
- skill = 4130;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/DrChaos.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/DrChaos.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/DrChaos.java (working copy)
- @@ -175,7 +175,7 @@
- {
- if (GrandBossManager.getInstance().getBossStatus(CHAOS_GOLEM) == NORMAL)
- {
- - for (L2PcInstance obj : npc.getKnownList().getKnownTypeInRadius(L2PcInstance.class, 500))
- + for (L2PcInstance obj : npc.getKnownTypeInRadius(L2PcInstance.class, 500))
- {
- if (obj.isDead())
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Gordon.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Gordon.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Gordon.java (working copy)
- @@ -119,7 +119,7 @@
- return null;
- // Check if player have Cursed Weapon and is in radius.
- - for (L2PcInstance pc : npc.getKnownList().getKnownTypeInRadius(L2PcInstance.class, 5000))
- + for (L2PcInstance pc : npc.getKnownTypeInRadius(L2PcInstance.class, 5000))
- {
- if (pc.isCursedWeaponEquipped())
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Valakas.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Valakas.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Valakas.java (working copy)
- @@ -26,7 +26,6 @@
- import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.SpawnLocation;
- import net.sf.l2j.gameserver.model.actor.L2Npc;
- -import net.sf.l2j.gameserver.model.actor.L2Playable;
- import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
- @@ -88,7 +87,7 @@
- public static final int VALAKAS = 29028;
- private long _timeTracker = 0; // Time tracker for last attack on Valakas.
- - private L2Playable _actualVictim; // Actual target of Valakas.
- + private L2PcInstance _actualVictim; // Actual target of Valakas.
- public Valakas()
- {
- @@ -392,7 +391,7 @@
- return;
- // Pickup a target if no or dead victim. 10% luck he decides to reconsiders his target.
- - if (_actualVictim == null || _actualVictim.isDead() || !(npc.getKnownList().knowsObject(_actualVictim)) || Rnd.get(10) == 0)
- + if (_actualVictim == null || _actualVictim.isDead() || !(npc.getKnownType(L2PcInstance.class).contains(_actualVictim)) || Rnd.get(10) == 0)
- _actualVictim = getRandomPlayer(npc);
- // If result is still null, Valakas will roam. Don't go deeper in skill AI.
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/L2AttackableAIScript.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/L2AttackableAIScript.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/L2AttackableAIScript.java (working copy)
- @@ -215,7 +215,7 @@
- {
- List<L2PcInstance> result = new ArrayList<>();
- - for (L2PcInstance player : npc.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : npc.getKnownType(L2PcInstance.class))
- {
- if (player.isDead())
- continue;
- @@ -240,7 +240,7 @@
- public static int getPlayersCountInRadius(int range, L2Character npc, boolean invisible)
- {
- int count = 0;
- - for (L2PcInstance player : npc.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : npc.getKnownTypeInRadius(L2PcInstance.class, range))
- {
- if (player.isDead())
- continue;
- @@ -248,8 +248,7 @@
- if (!invisible && player.getAppearance().getInvisible())
- continue;
- - if (Util.checkIfInRange(range, npc, player, true))
- - count++;
- + count++;
- }
- return count;
- }
- @@ -268,7 +267,7 @@
- int backCount = 0;
- int sideCount = 0;
- - for (L2PcInstance player : npc.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : npc.getKnownType(L2PcInstance.class))
- {
- if (player.isDead())
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/village_master/SecondClassChange.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/village_master/SecondClassChange.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/village_master/SecondClassChange.java (working copy)
- @@ -90,8 +90,8 @@
- });
- Classes.put("SE", new int[]
- {
- + 43,
- 42,
- - 43,
- 2,
- 34,
- 35,
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/scripting/tasks/Recommendation.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/tasks/Recommendation.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/tasks/Recommendation.java (working copy)
- @@ -14,7 +14,7 @@
- */
- package net.sf.l2j.gameserver.scripting.tasks;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.serverpackets.UserInfo;
- import net.sf.l2j.gameserver.scripting.ScheduledQuest;
- @@ -32,7 +32,7 @@
- @Override
- public final void onStart()
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- player.restartRecom();
- player.sendPacket(new UserInfo(player));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/Shutdown.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/Shutdown.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/Shutdown.java (working copy)
- @@ -25,6 +25,7 @@
- import net.sf.l2j.gameserver.datatables.BufferTable;
- import net.sf.l2j.gameserver.datatables.ServerMemo;
- import net.sf.l2j.gameserver.instancemanager.CastleManorManager;
- +import net.sf.l2j.gameserver.instancemanager.CoupleManager;
- import net.sf.l2j.gameserver.instancemanager.FishingChampionshipManager;
- import net.sf.l2j.gameserver.instancemanager.FourSepulchersManager;
- import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
- @@ -32,7 +33,7 @@
- import net.sf.l2j.gameserver.instancemanager.SevenSigns;
- import net.sf.l2j.gameserver.instancemanager.SevenSignsFestival;
- import net.sf.l2j.gameserver.instancemanager.ZoneManager;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.entity.Hero;
- import net.sf.l2j.gameserver.model.olympiad.Olympiad;
- @@ -186,6 +187,13 @@
- BufferTable.getInstance().saveSchemes();
- _log.info("BufferTable data has been saved.");
- + // Couples save.
- + if (Config.ALLOW_WEDDING)
- + {
- + CoupleManager.getInstance().save();
- + _log.info("CoupleManager data has been saved.");
- + }
- +
- // Save server memos.
- ServerMemo.getInstance().storeMe();
- _log.info("ServerMemo data has been saved.");
- @@ -417,7 +425,7 @@
- */
- private static void disconnectAllCharacters()
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- try
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java (working copy)
- @@ -70,11 +70,11 @@
- List<L2Character> targetList = new ArrayList<>();
- // Getting the possible targets
- - for (L2Object obj : getEffected().getKnownList().getKnownObjects())
- + for (L2Attackable obj : getEffected().getKnownType(L2Attackable.class))
- {
- // Only attackable NPCs are put in the list.
- - if (obj instanceof L2Attackable && !(obj instanceof L2ChestInstance) && obj != getEffected())
- - targetList.add((L2Character) obj);
- + if (!(obj instanceof L2ChestInstance))
- + targetList.add(obj);
- }
- // if there is no target, exit function
- @@ -82,8 +82,7 @@
- return true;
- // Choosing randomly a new target
- - int nextTargetIdx = Rnd.get(targetList.size());
- - L2Object target = targetList.get(nextTargetIdx);
- + L2Object target = Rnd.get(targetList);
- // Attacking the target
- getEffected().setTarget(target);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java (working copy)
- @@ -72,7 +72,7 @@
- List<L2Character> targetList = new ArrayList<>();
- // Getting the possible targets
- - for (L2Object obj : getEffected().getKnownList().getKnownObjects())
- + for (L2Object obj : getEffected().getKnownType(L2Object.class))
- {
- // Attackable NPCs and playable characters (players, summons) are put in the list.
- if ((obj instanceof L2Attackable || obj instanceof L2Playable) && (obj != getEffected()))
- @@ -86,8 +86,7 @@
- return true;
- // Choosing randomly a new target
- - int nextTargetIdx = Rnd.get(targetList.size());
- - L2Object target = targetList.get(nextTargetIdx);
- + L2Object target = Rnd.get(targetList);
- // Attacking the target
- getEffected().setTarget(target);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectFear.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectFear.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectFear.java (working copy)
- @@ -101,6 +101,12 @@
- }
- @Override
- + public boolean onSameEffect(L2Effect effect)
- + {
- + return false;
- + }
- +
- + @Override
- public int getEffectFlags()
- {
- return L2EffectFlag.FEAR.getMask();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectHealOverTime.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectHealOverTime.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectHealOverTime.java (working copy)
- @@ -16,6 +16,8 @@
- import net.sf.l2j.gameserver.model.L2Effect;
- import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.network.serverpackets.ExRegenMax;
- import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
- import net.sf.l2j.gameserver.skills.Env;
- import net.sf.l2j.gameserver.templates.skills.L2EffectType;
- @@ -34,25 +36,37 @@
- }
- @Override
- + public boolean onStart()
- + {
- + // If effected is a player, send a hp regen effect packet.
- + if (getEffected() instanceof L2PcInstance && getTotalCount() > 0 && getPeriod() > 0)
- + getEffected().sendPacket(new ExRegenMax(getTotalCount() * getPeriod(), getPeriod(), calc()));
- +
- + return true;
- + }
- +
- + @Override
- public boolean onActionTime()
- {
- - if (getEffected().isDead())
- + // Doesn't affect doors and dead characters.
- + if (getEffected().isDead() || getEffected() instanceof L2DoorInstance)
- return false;
- - if (getEffected() instanceof L2DoorInstance)
- - return false;
- + // Retrieve maximum hp.
- + final double maxHp = getEffected().getMaxHp();
- - double hp = getEffected().getCurrentHp();
- - double maxhp = getEffected().getMaxHp();
- - hp += calc();
- - if (hp > maxhp)
- - {
- - hp = maxhp;
- - }
- - getEffected().setCurrentHp(hp);
- - StatusUpdate suhp = new StatusUpdate(getEffected());
- - suhp.addAttribute(StatusUpdate.CUR_HP, (int) hp);
- - getEffected().sendPacket(suhp);
- + // Calculate new hp amount. If higher than max, pick max.
- + double newHp = getEffected().getCurrentHp() + calc();
- + if (newHp > maxHp)
- + newHp = maxHp;
- +
- + // Set hp amount.
- + getEffected().setCurrentHp(newHp);
- +
- + // Send status update.
- + final StatusUpdate su = new StatusUpdate(getEffected());
- + su.addAttribute(StatusUpdate.CUR_HP, (int) newHp);
- + getEffected().sendPacket(su);
- return true;
- }
- -}
- +}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectRoot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectRoot.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectRoot.java (working copy)
- @@ -55,6 +55,12 @@
- }
- @Override
- + public boolean onSameEffect(L2Effect effect)
- + {
- + return false;
- + }
- +
- + @Override
- public int getEffectFlags()
- {
- return L2EffectFlag.ROOTED.getMask();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java (working copy)
- @@ -78,7 +78,7 @@
- getEffector().reduceCurrentMp(mpConsume);
- List<L2Character> targets = new ArrayList<>();
- - for (L2Character cha : _actor.getKnownList().getKnownTypeInRadius(L2Character.class, getSkill().getSkillRadius()))
- + for (L2Character cha : _actor.getKnownTypeInRadius(L2Character.class, getSkill().getSkillRadius()))
- {
- if (_skill.isOffensive() && !L2Skill.checkForAreaOffensiveSkills(getEffector(), cha, _skill, _srcInArena))
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java (working copy)
- @@ -58,7 +58,7 @@
- final int mpConsume = getSkill().getMpConsume();
- final L2PcInstance caster = (L2PcInstance) getEffector();
- - for (L2Playable cha : _actor.getKnownList().getKnownTypeInRadius(L2Playable.class, getSkill().getSkillRadius()))
- + for (L2Playable cha : _actor.getKnownTypeInRadius(L2Playable.class, getSkill().getSkillRadius()))
- {
- if (!caster.canAttackCharacter(cha))
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java (working copy)
- @@ -108,7 +108,7 @@
- List<L2Character> targets = new ArrayList<>();
- - for (L2Character cha : _actor.getKnownList().getKnownTypeInRadius(L2Character.class, getSkill().getSkillRadius()))
- + for (L2Character cha : _actor.getKnownTypeInRadius(L2Character.class, getSkill().getSkillRadius()))
- {
- if (cha == caster)
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java (working copy)
- @@ -54,7 +54,7 @@
- L2PcInstance caster = (L2PcInstance) getEffector();
- - for (L2Character target : _actor.getKnownList().getKnownTypeInRadius(L2Character.class, getSkill().getSkillRadius()))
- + for (L2Character target : _actor.getKnownTypeInRadius(L2Character.class, getSkill().getSkillRadius()))
- {
- if (target == caster)
- continue;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSleep.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSleep.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSleep.java (working copy)
- @@ -55,6 +55,12 @@
- }
- @Override
- + public boolean onSameEffect(L2Effect effect)
- + {
- + return false;
- + }
- +
- + @Override
- public int getEffectFlags()
- {
- return L2EffectFlag.SLEEP.getMask();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectStun.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectStun.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectStun.java (working copy)
- @@ -55,6 +55,12 @@
- }
- @Override
- + public boolean onSameEffect(L2Effect effect)
- + {
- + return false;
- + }
- +
- + @Override
- public int getEffectFlags()
- {
- return L2EffectFlag.STUNNED.getMask();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSiegeFlag.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSiegeFlag.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSiegeFlag.java (working copy)
- @@ -104,7 +104,7 @@
- sm = SystemMessage.getSystemMessage(SystemMessageId.NOT_ANOTHER_HEADQUARTERS);
- else if (!player.isInsideZone(ZoneId.HQ))
- sm = SystemMessage.getSystemMessage(SystemMessageId.NOT_SET_UP_BASE_HERE);
- - else if (!player.getKnownList().getKnownTypeInRadius(L2SiegeFlagInstance.class, 400).isEmpty())
- + else if (!player.getKnownTypeInRadius(L2SiegeFlagInstance.class, 400).isEmpty())
- sm = SystemMessage.getSystemMessage(SystemMessageId.HEADQUARTERS_TOO_CLOSE);
- else
- return true;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/ItemsOnGroundTaskManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/ItemsOnGroundTaskManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/ItemsOnGroundTaskManager.java (working copy)
- @@ -28,7 +28,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- import net.sf.l2j.gameserver.model.actor.L2Playable;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- @@ -74,7 +74,7 @@
- // Create new item.
- final ItemInstance item = new ItemInstance(result.getInt(1), result.getInt(2));
- - L2World.getInstance().addObject(item);
- + World.getInstance().addObject(item);
- // Check and set count.
- final int count = result.getInt(3);
- @@ -87,11 +87,7 @@
- item.setEnchantLevel(enchant);
- // Spawn item in the world.
- - item.getPosition().set(result.getInt(5), result.getInt(6), result.getInt(7));
- - item.setRegion(L2World.getInstance().getRegion(item.getPosition()));
- - item.getRegion().addVisibleObject(item);
- - item.setIsVisible(true);
- - L2World.getInstance().addVisibleObject(item, item.getRegion());
- + item.spawnMe(result.getInt(5), result.getInt(6), result.getInt(7));
- // Get interval, add item to the list.
- long interval = result.getLong(8);
- @@ -194,9 +190,7 @@
- // Destroy item and remove from task.
- final ItemInstance item = entry.getKey();
- - L2World.getInstance().removeVisibleObject(item, item.getRegion());
- - L2World.getInstance().removeObject(item);
- - _items.remove(item);
- + item.decayMe();
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/WaterTaskManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/WaterTaskManager.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/WaterTaskManager.java (working copy)
- @@ -21,11 +21,13 @@
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- +import net.sf.l2j.gameserver.skills.Stats;
- /**
- * Updates {@link L2PcInstance} drown timer and reduces {@link L2PcInstance} HP, when drowning.
- - * @author Tryskell, Hasha
- */
- public final class WaterTaskManager implements Runnable
- {
- @@ -45,11 +47,17 @@
- /**
- * Adds {@link L2PcInstance} to the WaterTask.
- * @param player : {@link L2PcInstance} to be added and checked.
- - * @param time : Time in ms, after which the drowning effect is applied.
- */
- - public final void add(L2PcInstance player, long time)
- + public final void add(L2PcInstance player)
- {
- - _players.put(player, System.currentTimeMillis() + time);
- + if (!player.isDead() && !_players.containsKey(player))
- + {
- + final int time = (int) player.calcStat(Stats.BREATH, 60000 * player.getRace().getBreathMultiplier(), player, null);
- +
- + _players.put(player, System.currentTimeMillis() + time);
- +
- + player.sendPacket(new SetupGauge(GaugeColor.CYAN, time));
- + }
- }
- /**
- @@ -58,7 +66,8 @@
- */
- public final void remove(L2PcInstance player)
- {
- - _players.remove(player);
- + if (_players.remove(player) != null)
- + player.sendPacket(new SetupGauge(GaugeColor.CYAN, 0));
- }
- @Override
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/templates/skills/L2SkillType.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/templates/skills/L2SkillType.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/templates/skills/L2SkillType.java (working copy)
- @@ -75,7 +75,6 @@
- HEAL_STATIC,
- MANARECHARGE,
- HEAL_PERCENT,
- - CPHEAL_PERCENT,
- MANAHEAL_PERCENT,
- GIVE_SP,
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java (working copy)
- @@ -15,10 +15,10 @@
- package net.sf.l2j.gameserver.util;
- import net.sf.l2j.gameserver.instancemanager.ZoneManager;
- -import net.sf.l2j.gameserver.model.L2World;
- -import net.sf.l2j.gameserver.model.L2WorldRegion;
- +import net.sf.l2j.gameserver.model.L2Object;
- +import net.sf.l2j.gameserver.model.World;
- +import net.sf.l2j.gameserver.model.WorldRegion;
- import net.sf.l2j.gameserver.model.actor.L2Character;
- -import net.sf.l2j.gameserver.model.actor.L2Playable;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.zone.L2ZoneType;
- import net.sf.l2j.gameserver.network.clientpackets.Say2;
- @@ -41,7 +41,7 @@
- */
- public static void toPlayersTargettingMyself(L2Character character, L2GameServerPacket mov)
- {
- - for (L2PcInstance player : character.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : character.getKnownType(L2PcInstance.class))
- {
- if (player.getTarget() != character)
- continue;
- @@ -64,7 +64,7 @@
- */
- public static void toKnownPlayers(L2Character character, L2GameServerPacket mov)
- {
- - for (L2PcInstance player : character.getKnownList().getKnownType(L2PcInstance.class))
- + for (L2PcInstance player : character.getKnownType(L2PcInstance.class))
- player.sendPacket(mov);
- }
- @@ -86,11 +86,8 @@
- if (radius < 0)
- radius = 1500;
- - for (L2PcInstance player : character.getKnownList().getKnownType(L2PcInstance.class))
- - {
- - if (character.isInsideRadius(player, radius, false, false))
- - player.sendPacket(mov);
- - }
- + for (L2PcInstance player : character.getKnownTypeInRadius(L2PcInstance.class, radius))
- + player.sendPacket(mov);
- }
- /**
- @@ -119,28 +116,10 @@
- if (character instanceof L2PcInstance)
- character.sendPacket(mov);
- - for (L2PcInstance player : character.getKnownList().getKnownType(L2PcInstance.class))
- - {
- - if (character.isInsideRadius(player, radius, false, false))
- - player.sendPacket(mov);
- - }
- + for (L2PcInstance player : character.getKnownTypeInRadius(L2PcInstance.class, radius))
- + player.sendPacket(mov);
- }
- - public static void toSelfAndKnownPlayersInRadiusSq(L2Character character, L2GameServerPacket mov, int radiusSq)
- - {
- - if (radiusSq < 0)
- - radiusSq = 360000;
- -
- - if (character instanceof L2PcInstance)
- - character.sendPacket(mov);
- -
- - for (L2PcInstance player : character.getKnownList().getKnownType(L2PcInstance.class))
- - {
- - if (character.getDistanceSq(player) <= radiusSq)
- - player.sendPacket(mov);
- - }
- - }
- -
- /**
- * Send a packet to all L2PcInstance present in the world.<BR>
- * <BR>
- @@ -153,7 +132,7 @@
- */
- public static void toAllOnlinePlayers(L2GameServerPacket mov)
- {
- - for (L2PcInstance player : L2World.getInstance().getPlayers())
- + for (L2PcInstance player : World.getInstance().getPlayers())
- {
- if (player.isOnline())
- player.sendPacket(mov);
- @@ -165,14 +144,15 @@
- * @param region : The region to send packets.
- * @param packets : The packets to send.
- */
- - public static void toAllPlayersInRegion(L2WorldRegion region, L2GameServerPacket... packets)
- + public static void toAllPlayersInRegion(WorldRegion region, L2GameServerPacket... packets)
- {
- - for (L2Playable playable : region.getVisiblePlayable().values())
- + for (L2Object object : region.getObjects())
- {
- - if (playable instanceof L2PcInstance)
- + if (object instanceof L2PcInstance)
- {
- + final L2PcInstance player = (L2PcInstance) object;
- for (L2GameServerPacket packet : packets)
- - playable.sendPacket(packet);
- + player.sendPacket(packet);
- }
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/geodataconverter/GeoDataConverter.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/geodataconverter/GeoDataConverter.java (revision 2)
- +++ aCis_gameserver/java/net/sf/l2j/geodataconverter/GeoDataConverter.java (working copy)
- @@ -31,7 +31,7 @@
- import net.sf.l2j.gameserver.geoengine.geodata.BlockMultilayer;
- import net.sf.l2j.gameserver.geoengine.geodata.GeoFormat;
- import net.sf.l2j.gameserver.geoengine.geodata.GeoStructure;
- -import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.World;
- /**
- * @author Hasha
- @@ -77,9 +77,9 @@
- // load geo files according to geoengine config setup
- final ExProperties props = Config.initProperties(Config.GEOENGINE_FILE);
- int converted = 0;
- - for (int rx = L2World.TILE_X_MIN; rx <= L2World.TILE_X_MAX; rx++)
- + for (int rx = World.TILE_X_MIN; rx <= World.TILE_X_MAX; rx++)
- {
- - for (int ry = L2World.TILE_Y_MIN; ry <= L2World.TILE_Y_MAX; ry++)
- + for (int ry = World.TILE_Y_MIN; ry <= World.TILE_Y_MAX; ry++)
- {
- if (props.containsKey(String.valueOf(rx) + "_" + String.valueOf(ry)))
- {
Add Comment
Please, Sign In to add comment