Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: aCis_datapack/data/html/mods/Wedding_error_friendlist.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_error_friendlist.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_error_friendlist.htm (nonexistent)
- @@ -1,4 +0,0 @@
- -<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_wrongtarget.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_error_wrongtarget.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_error_wrongtarget.htm (nonexistent)
- @@ -1,4 +0,0 @@
- -<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 (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_notfound.htm (nonexistent)
- @@ -1,3 +0,0 @@
- -<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 (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_start.htm (nonexistent)
- @@ -1,16 +0,0 @@
- -<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_error_alreadymarried.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_error_alreadymarried.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_error_alreadymarried.htm (nonexistent)
- @@ -1,4 +0,0 @@
- -<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_start2.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_start2.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_start2.htm (nonexistent)
- @@ -1,6 +0,0 @@
- -<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_error_adena.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_error_adena.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_error_adena.htm (nonexistent)
- @@ -1,4 +0,0 @@
- -<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_noformal.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_error_noformal.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_error_noformal.htm (nonexistent)
- @@ -1,4 +0,0 @@
- -<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_disabled.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_disabled.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_disabled.htm (nonexistent)
- @@ -1,5 +0,0 @@
- -<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_waitforpartner.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_waitforpartner.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_waitforpartner.htm (nonexistent)
- @@ -1,4 +0,0 @@
- -<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/html/mods/Wedding_error_sex.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/Wedding_error_sex.htm (révision 568)
- +++ aCis_datapack/data/html/mods/Wedding_error_sex.htm (nonexistent)
- @@ -1,4 +0,0 @@
- -<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_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/FriendlyMobKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/FriendlyMobKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/FriendlyMobKnownList.java (nonexistent)
- @@ -1,79 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.ai.CtrlEvent;
- -import net.sf.l2j.gameserver.ai.CtrlIntention;
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.L2Character;
- -import net.sf.l2j.gameserver.model.actor.instance.L2FriendlyMobInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -
- -public class FriendlyMobKnownList extends AttackableKnownList
- -{
- - public FriendlyMobKnownList(L2FriendlyMobInstance activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public boolean addKnownObject(L2Object object)
- - {
- - if (!super.addKnownObject(object))
- - return false;
- -
- - // object is player
- - if (object instanceof L2PcInstance)
- - {
- - // get friendly monster
- - final L2FriendlyMobInstance monster = (L2FriendlyMobInstance) _activeObject;
- -
- - // AI is idle, set AI
- - if (monster.getAI().getIntention() == CtrlIntention.IDLE)
- - monster.getAI().setIntention(CtrlIntention.ACTIVE, null);
- - }
- -
- - return true;
- - }
- -
- - @Override
- - public boolean removeKnownObject(L2Object object)
- - {
- - if (!super.removeKnownObject(object))
- - return false;
- -
- - if (!(object instanceof L2Character))
- - return true;
- -
- - // get friendly monster
- - final L2FriendlyMobInstance monster = (L2FriendlyMobInstance) _activeObject;
- -
- - if (monster.hasAI())
- - {
- - monster.getAI().notifyEvent(CtrlEvent.EVT_FORGET_OBJECT, object);
- - if (monster.getTarget() == (L2Character) object)
- - monster.setTarget(null);
- - }
- -
- - if (monster.isVisible() && getKnownType(L2PcInstance.class).isEmpty())
- - {
- - monster.getAggroList().clear();
- - if (monster.hasAI())
- - monster.getAI().setIntention(CtrlIntention.IDLE, null);
- - }
- -
- - return true;
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/AttackableKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/AttackableKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/AttackableKnownList.java (nonexistent)
- @@ -1,71 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.ai.CtrlIntention;
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.L2Attackable;
- -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;
- -
- -public class AttackableKnownList extends NpcKnownList
- -{
- - public AttackableKnownList(L2Attackable activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public boolean removeKnownObject(L2Object object)
- - {
- - if (!super.removeKnownObject(object))
- - return false;
- -
- - // get attackable
- - final L2Attackable attackable = (L2Attackable) _activeObject;
- -
- - // remove object from agro list
- - if (object instanceof L2Character)
- - attackable.getAggroList().remove(object);
- -
- - // check AI for players and set AI to idle
- - if (attackable.hasAI() && getKnownType(L2PcInstance.class).isEmpty())
- - attackable.getAI().setIntention(CtrlIntention.IDLE, null);
- -
- - return true;
- - }
- -
- - @Override
- - public int getDistanceToWatchObject(L2Object object)
- - {
- - if (!(object instanceof L2Character))
- - return 0;
- -
- - if (object instanceof L2Playable)
- - return object.getKnownList().getDistanceToWatchObject(_activeObject);
- -
- - // get attackable
- - final L2Attackable attackable = (L2Attackable) _activeObject;
- -
- - return Math.max(300, Math.max(attackable.getTemplate().getAggroRange(), attackable.getTemplate().getClanRange()));
- - }
- -
- - @Override
- - public int getDistanceToForgetObject(L2Object object)
- - {
- - return (int) (getDistanceToWatchObject(object) * 1.5);
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/CharKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/CharKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/CharKnownList.java (nonexistent)
- @@ -1,61 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.L2Character;
- -
- -public class CharKnownList extends ObjectKnownList
- -{
- - public CharKnownList(L2Character activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public boolean removeKnownObject(L2Object object)
- - {
- - if (!super.removeKnownObject(object))
- - return false;
- -
- - // get character
- - final L2Character character = (L2Character) _activeObject;
- -
- - // If object is targeted by the L2Character, cancel Attack or Cast
- - if (object == character.getTarget())
- - character.setTarget(null);
- -
- - return true;
- - }
- -
- - /**
- - * Remove all objects from known list, cancel target and inform AI.
- - */
- - @Override
- - public final void removeAllKnownObjects()
- - {
- - super.removeAllKnownObjects();
- -
- - // get character
- - final L2Character character = (L2Character) _activeObject;
- -
- - // set target to null
- - character.setTarget(null);
- -
- - // cancel AI task
- - if (character.hasAI())
- - character.setAI(null);
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/SummonKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/SummonKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/SummonKnownList.java (nonexistent)
- @@ -1,45 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.L2Summon;
- -
- -public class SummonKnownList extends CharKnownList
- -{
- - public SummonKnownList(L2Summon activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public int getDistanceToWatchObject(L2Object object)
- - {
- - return 1500;
- - }
- -
- - @Override
- - public int getDistanceToForgetObject(L2Object object)
- - {
- - // get summon
- - final L2Summon summon = (L2Summon) _activeObject;
- -
- - // object is owner or taget, use extended range
- - if (object == summon.getOwner() || object == summon.getTarget())
- - return 6000;
- -
- - return 3000;
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/SiegeGuardKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/SiegeGuardKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/SiegeGuardKnownList.java (nonexistent)
- @@ -1,56 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.ai.CtrlIntention;
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2SiegeGuardInstance;
- -import net.sf.l2j.gameserver.model.entity.Castle;
- -
- -public class SiegeGuardKnownList extends AttackableKnownList
- -{
- - public SiegeGuardKnownList(L2SiegeGuardInstance activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public boolean addKnownObject(L2Object object)
- - {
- - if (!super.addKnownObject(object))
- - return false;
- -
- - // get siege guard
- - final L2SiegeGuardInstance guard = (L2SiegeGuardInstance) _activeObject;
- -
- - // Check if siege is in progress
- - final Castle castle = guard.getCastle();
- - if (castle != null && castle.getZone().isActive())
- - {
- - // get player
- - final L2PcInstance player = object.getActingPlayer();
- -
- - // check player's clan is in siege attacker list
- - if (player != null && (player.getClan() == null || castle.getSiege().getAttackerClan(player.getClan()) != null))
- - {
- - // try to set AI to attack
- - if (guard.getAI().getIntention() == CtrlIntention.IDLE)
- - guard.getAI().setIntention(CtrlIntention.ACTIVE, null);
- - }
- - }
- - return true;
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/VehicleKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/VehicleKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/VehicleKnownList.java (nonexistent)
- @@ -1,45 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.L2Character;
- -import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -
- -public class VehicleKnownList extends CharKnownList
- -{
- - public VehicleKnownList(L2Character activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public int getDistanceToWatchObject(L2Object object)
- - {
- - if (!(object instanceof L2PcInstance))
- - return 0;
- -
- - return object.getKnownList().getDistanceToWatchObject(_activeObject);
- - }
- -
- - @Override
- - public int getDistanceToForgetObject(L2Object object)
- - {
- - if (!(object instanceof L2PcInstance))
- - return 0;
- -
- - return object.getKnownList().getDistanceToForgetObject(_activeObject);
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/NpcKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/NpcKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/NpcKnownList.java (nonexistent)
- @@ -1,56 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.model.L2Object;
- -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.instance.L2FestivalGuideInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
- -
- -public class NpcKnownList extends CharKnownList
- -{
- - public NpcKnownList(L2Npc activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public int getDistanceToWatchObject(L2Object object)
- - {
- - // object is not L2Character or object is L2NpcInstance, skip
- - if (object instanceof L2NpcInstance || !(object instanceof L2Character))
- - return 0;
- -
- - if (object instanceof L2Playable)
- - {
- - // known list owner if L2FestivalGuide, use extended range
- - if (_activeObject instanceof L2FestivalGuideInstance)
- - return 4000;
- -
- - // default range to keep players
- - return 1500;
- - }
- -
- - return 500;
- - }
- -
- - @Override
- - public int getDistanceToForgetObject(L2Object object)
- - {
- - return 2 * getDistanceToWatchObject(object);
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/GuardKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/GuardKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/GuardKnownList.java (nonexistent)
- @@ -1,80 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.Config;
- -import net.sf.l2j.gameserver.ai.CtrlIntention;
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.instance.L2GuardInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -
- -public class GuardKnownList extends AttackableKnownList
- -{
- - public GuardKnownList(L2GuardInstance activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public boolean addKnownObject(L2Object object)
- - {
- - if (!super.addKnownObject(object))
- - return false;
- -
- - // get guard
- - final L2GuardInstance guard = (L2GuardInstance) _activeObject;
- -
- - if (object instanceof L2PcInstance)
- - {
- - // Check if the object added is a L2PcInstance that owns Karma
- - if (((L2PcInstance) object).getKarma() > 0)
- - {
- - // Set the L2GuardInstance Intention to ACTIVE
- - if (guard.getAI().getIntention() == CtrlIntention.IDLE)
- - guard.getAI().setIntention(CtrlIntention.ACTIVE, null);
- - }
- - }
- - else if ((Config.GUARD_ATTACK_AGGRO_MOB && guard.isInActiveRegion()) && object instanceof L2MonsterInstance)
- - {
- - // Check if the object added is an aggressive L2MonsterInstance
- - if (((L2MonsterInstance) object).isAggressive())
- - {
- - // Set the L2GuardInstance Intention to ACTIVE
- - if (guard.getAI().getIntention() == CtrlIntention.IDLE)
- - guard.getAI().setIntention(CtrlIntention.ACTIVE, null);
- - }
- - }
- - return true;
- - }
- -
- - @Override
- - public boolean removeKnownObject(L2Object object)
- - {
- - if (!super.removeKnownObject(object))
- - return false;
- -
- - // get guard
- - final L2GuardInstance guard = (L2GuardInstance) _activeObject;
- -
- - // If the _aggroList of the L2GuardInstance is empty, set to IDLE
- - if (guard.getAggroList().isEmpty())
- - {
- - if (guard.hasAI())
- - guard.getAI().setIntention(CtrlIntention.IDLE, null);
- - }
- - return true;
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/PcKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/PcKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/PcKnownList.java (nonexistent)
- @@ -1,156 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.L2Object.PolyType;
- -import net.sf.l2j.gameserver.model.actor.L2Character;
- -import net.sf.l2j.gameserver.model.actor.L2Vehicle;
- -import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -import net.sf.l2j.gameserver.network.serverpackets.DeleteObject;
- -import net.sf.l2j.gameserver.network.serverpackets.SpawnItem;
- -
- -public class PcKnownList extends CharKnownList
- -{
- - public PcKnownList(L2PcInstance activeChar)
- - {
- - super(activeChar);
- - }
- -
- - /**
- - * Add a visible L2Object to L2PcInstance _knownObjects and _knownPlayer (if necessary) and send Server-Client Packets needed to inform the L2PcInstance of its state and actions in progress.<BR>
- - * <BR>
- - * <B><U> object is a ItemInstance </U> :</B><BR>
- - * <BR>
- - * <li>Send Server-Client Packet DropItem/SpawnItem to the L2PcInstance</li><BR>
- - * <BR>
- - * <B><U> object is a L2DoorInstance </U> :</B><BR>
- - * <BR>
- - * <li>Send Server-Client Packets DoorInfo and DoorStatusUpdate to the L2PcInstance</li> <li>Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the L2PcInstance</li><BR>
- - * <BR>
- - * <B><U> object is a L2Npc </U> :</B><BR>
- - * <BR>
- - * <li>Send Server-Client Packet NpcInfo to the L2PcInstance</li> <li>Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the L2PcInstance</li><BR>
- - * <BR>
- - * <B><U> object is a L2Summon </U> :</B><BR>
- - * <BR>
- - * <li>Send Server-Client Packet NpcInfo/PetItemList (if the L2PcInstance is the owner) to the L2PcInstance</li> <li>Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the L2PcInstance</li><BR>
- - * <BR>
- - * <B><U> object is a L2PcInstance </U> :</B><BR>
- - * <BR>
- - * <li>Send Server-Client Packet CharInfo to the L2PcInstance</li> <li>If the object has a private store, Send Server-Client Packet PrivateStoreMsgSell to the L2PcInstance</li> <li>Send Server->Client packet MoveToPawn/MoveToLocation and AutoAttackStart to the L2PcInstance</li><BR>
- - * <BR>
- - * @param object The L2Object to add to _knownObjects and _knownPlayer
- - */
- - @Override
- - public boolean addKnownObject(L2Object object)
- - {
- - if (!super.addKnownObject(object))
- - return false;
- -
- - sendInfoFrom(object);
- - return true;
- - }
- -
- - /**
- - * Remove a L2Object from L2PcInstance _knownObjects and _knownPlayer (if necessary) and send Server-Client Packet DeleteObject to the L2PcInstance.<BR>
- - * <BR>
- - * @param object The L2Object to remove from _knownObjects and _knownPlayer
- - */
- - @Override
- - public boolean removeKnownObject(L2Object object)
- - {
- - if (!super.removeKnownObject(object))
- - return false;
- -
- - // get player
- - final L2PcInstance player = (L2PcInstance) _activeObject;
- -
- - // send Server-Client Packet DeleteObject to the L2PcInstance
- - player.sendPacket(new DeleteObject(object, (object instanceof L2PcInstance) && ((L2PcInstance) object).isSeated()));
- - return true;
- - }
- -
- - @Override
- - public int getDistanceToWatchObject(L2Object object)
- - {
- - if (object instanceof L2Vehicle)
- - return 9000;
- -
- - final int knownlistSize = getKnownObjects().size();
- - if (knownlistSize <= 25)
- - return 3400;
- -
- - if (knownlistSize <= 35)
- - return 2900;
- -
- - if (knownlistSize <= 70)
- - return 2300;
- -
- - return 1700;
- - }
- -
- - @Override
- - public int getDistanceToForgetObject(L2Object object)
- - {
- - if (object instanceof L2Vehicle)
- - return 10000;
- -
- - final int knownlistSize = getKnownObjects().size();
- - if (knownlistSize <= 25)
- - return 4000;
- -
- - if (knownlistSize <= 35)
- - return 3500;
- -
- - if (knownlistSize <= 70)
- - return 2910;
- -
- - return 2310;
- - }
- -
- - public final void refreshInfos()
- - {
- - for (L2Object object : _knownObjects.values())
- - {
- - if (object instanceof L2PcInstance && ((L2PcInstance) object).inObserverMode())
- - continue;
- -
- - sendInfoFrom(object);
- - }
- - }
- -
- - private final void sendInfoFrom(L2Object object)
- - {
- - // get player
- - final L2PcInstance player = (L2PcInstance) _activeObject;
- -
- - if (object.getPolyType() == PolyType.ITEM)
- - player.sendPacket(new SpawnItem(object));
- - else
- - {
- - // send object info to player
- - object.sendInfo(player);
- -
- - 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(player);
- - }
- - }
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/DoorKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/DoorKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/DoorKnownList.java (nonexistent)
- @@ -1,52 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2SiegeGuardInstance;
- -
- -public class DoorKnownList extends CharKnownList
- -{
- - public DoorKnownList(L2DoorInstance activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public int getDistanceToWatchObject(L2Object object)
- - {
- - if (object instanceof L2SiegeGuardInstance)
- - return 600;
- -
- - if (object instanceof L2PcInstance)
- - return 3500;
- -
- - return 0;
- - }
- -
- - @Override
- - public int getDistanceToForgetObject(L2Object object)
- - {
- - if (object instanceof L2SiegeGuardInstance)
- - return 800;
- -
- - if (object instanceof L2PcInstance)
- - return 4000;
- -
- - return 0;
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/RaceManagerKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/RaceManagerKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/RaceManagerKnownList.java (nonexistent)
- @@ -1,61 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.instancemanager.games.MonsterRace;
- -import net.sf.l2j.gameserver.model.L2Object;
- -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.L2RaceManagerInstance;
- -import net.sf.l2j.gameserver.network.serverpackets.DeleteObject;
- -
- -public class RaceManagerKnownList extends NpcKnownList
- -{
- - public RaceManagerKnownList(L2RaceManagerInstance activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public boolean addKnownObject(L2Object object)
- - {
- - if (!super.addKnownObject(object))
- - return false;
- -
- - if (object instanceof L2PcInstance)
- - ((L2PcInstance) object).sendPacket(MonsterRace.getInstance().getRacePacket());
- -
- - return true;
- - }
- -
- - @Override
- - public boolean removeKnownObject(L2Object object)
- - {
- - if (!super.removeKnownObject(object))
- - return false;
- -
- - if (object instanceof L2PcInstance)
- - {
- - // get player
- - final L2PcInstance player = ((L2PcInstance) object);
- -
- - // for all monster race NPCs
- - for (L2Npc npc : MonsterRace.getInstance().getMonsters())
- - player.sendPacket(new DeleteObject(npc));
- - }
- -
- - return true;
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/ObjectKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/ObjectKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/ObjectKnownList.java (nonexistent)
- @@ -1,189 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import java.util.ArrayList;
- -import java.util.Collection;
- -import java.util.List;
- -import java.util.Map;
- -import java.util.concurrent.ConcurrentHashMap;
- -
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.util.Util;
- -
- -public class ObjectKnownList
- -{
- - protected final L2Object _activeObject;
- - protected final Map<Integer, L2Object> _knownObjects;
- -
- - public ObjectKnownList(L2Object activeObject)
- - {
- - _activeObject = activeObject;
- - _knownObjects = new ConcurrentHashMap<>();
- - }
- -
- - /**
- - * Add object to known list.<br>
- - * <b>Is overridden by children in most cases.</b>
- - * @param object : {@link L2Object} to be added.
- - * @return boolean : True, when object was successfully added.
- - */
- - public boolean addKnownObject(L2Object object)
- - {
- - // object must exist, cannot add self
- - if (knowsObject(object))
- - return false;
- -
- - // object must be inside distance to watch
- - if (!Util.checkIfInShortRadius(getDistanceToWatchObject(object), _activeObject, object, true))
- - return false;
- -
- - // add object to known list and check if object already existed there
- - return _knownObjects.put(object.getObjectId(), object) == null;
- - }
- -
- - /**
- - * Remove object from known list.<br>
- - * <b>Is overridden by children in most cases.</b>
- - * @param object : {@link L2Object} to be removed.
- - * @return boolean : True, when object was successfully removed.
- - */
- - public boolean removeKnownObject(L2Object object)
- - {
- - // object must exist.
- - if (object == null)
- - return false;
- -
- - // remove object from known list and check if object existed in there
- - return _knownObjects.remove(object.getObjectId()) != null;
- - }
- -
- - /**
- - * Remove object from known list, which are beyond distance to forget.
- - */
- - public final void forgetObjects()
- - {
- - // for all objects in known list
- - for (L2Object object : _knownObjects.values())
- - {
- - // object is not visible or out of distance to forget, remove from known list
- - if (!object.isVisible() || !Util.checkIfInShortRadius(getDistanceToForgetObject(object), _activeObject, object, true))
- - removeKnownObject(object);
- - }
- - }
- -
- - /**
- - * Remove all objects from known list.
- - */
- - public void removeAllKnownObjects()
- - {
- - _knownObjects.clear();
- - }
- -
- - /**
- - * Check if object is in known list.
- - * @param object : {@link L2Object} to be checked.
- - * @return boolean : True, when object is in known list.
- - */
- - public final boolean knowsObject(L2Object object)
- - {
- - // object does not exist, false
- - if (object == null)
- - return false;
- -
- - // object is known list owner or is in known list
- - return _activeObject == object || _knownObjects.containsKey(object.getObjectId());
- - }
- -
- - /**
- - * Return the known list.
- - * @return Collection<L2Object> : The known list.
- - */
- - public final Collection<L2Object> getKnownObjects()
- - {
- - return _knownObjects.values();
- - }
- -
- - /**
- - * 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)
- - {
- - // create result list
- - List<A> result = new ArrayList<>();
- -
- - // for all objects in known list
- - for (L2Object obj : _knownObjects.values())
- - {
- - // object type is correct, add to the list
- - if (type.isAssignableFrom(obj.getClass()))
- - result.add((A) obj);
- - }
- -
- - // return result
- - 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)
- - {
- - // create result list
- - List<A> result = new ArrayList<>();
- -
- - // for all objects in known list
- - for (L2Object obj : _knownObjects.values())
- - {
- - // object type is correct and object in given radius, add to the list
- - if (type.isAssignableFrom(obj.getClass()) && Util.checkIfInRange(radius, _activeObject, obj, true))
- - result.add((A) obj);
- - }
- -
- - // return result
- - return result;
- - }
- -
- - /**
- - * Returns the distance to watch object, aka distance to add object to known list.<br>
- - * <b>Is overridden by children in most cases.</b>
- - * @param object : {@link L2Object} to be checked.
- - * @return int : Distance.
- - */
- - public int getDistanceToWatchObject(L2Object object)
- - {
- - return 0;
- - }
- -
- - /**
- - * Returns the distance to forget object, aka distance to remove object from known list.<br>
- - * <b>Is overridden by children in most cases.</b>
- - * @param object : {@link L2Object} to be checked.
- - * @return int : Distance.
- - */
- - public int getDistanceToForgetObject(L2Object object)
- - {
- - return 0;
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/MonsterKnownList.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/MonsterKnownList.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/knownlist/MonsterKnownList.java (nonexistent)
- @@ -1,74 +0,0 @@
- -/*
- - * 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.actor.knownlist;
- -
- -import net.sf.l2j.gameserver.ai.CtrlEvent;
- -import net.sf.l2j.gameserver.ai.CtrlIntention;
- -import net.sf.l2j.gameserver.ai.model.L2CharacterAI;
- -import net.sf.l2j.gameserver.model.L2Object;
- -import net.sf.l2j.gameserver.model.actor.L2Character;
- -import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
- -import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- -
- -public class MonsterKnownList extends AttackableKnownList
- -{
- - public MonsterKnownList(L2MonsterInstance activeChar)
- - {
- - super(activeChar);
- - }
- -
- - @Override
- - public boolean addKnownObject(L2Object object)
- - {
- - if (!super.addKnownObject(object))
- - return false;
- -
- - // object is player
- - if (object instanceof L2PcInstance)
- - {
- - // get monster AI
- - final L2CharacterAI ai = ((L2MonsterInstance) _activeObject).getAI();
- -
- - // AI exists and is idle, set active
- - if (ai != null && ai.getIntention() == CtrlIntention.IDLE)
- - ai.setIntention(CtrlIntention.ACTIVE, null);
- - }
- -
- - return true;
- - }
- -
- - @Override
- - public boolean removeKnownObject(L2Object object)
- - {
- - if (!super.removeKnownObject(object))
- - return false;
- -
- - if (!(object instanceof L2Character))
- - return true;
- -
- - // get monster
- - final L2MonsterInstance monster = (L2MonsterInstance) _activeObject;
- -
- - // monster has AI, inform about lost object
- - if (monster.hasAI())
- - monster.getAI().notifyEvent(CtrlEvent.EVT_FORGET_OBJECT, object);
- -
- - // clear agro list
- - if (monster.isVisible() && getKnownType(L2PcInstance.class).isEmpty())
- - monster.getAggroList().clear();
- -
- - return true;
- - }
- -}
- \ No newline at end of file
- Index: aCis_datapack/data/html/mods/wedding/start.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/start.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/start.htm (révision 578)
- @@ -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_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (révision 578)
- @@ -94,7 +94,6 @@
- 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.World;
- import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.MacroList;
- import net.sf.l2j.gameserver.model.PetDataEntry;
- @@ -101,6 +100,7 @@
- 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;
- @@ -206,6 +206,7 @@
- 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;
- @@ -764,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));
- @@ -3316,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));
- @@ -3960,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();
- @@ -5262,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>
- @@ -5398,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))
- @@ -7632,7 +7620,6 @@
- getAppearance().setInvisible();
- sendPacket(new ObservationMode(x, y, z));
- - getKnownList().removeAllKnownObjects(); // reinit knownlist
- setXYZ(x, y, z);
- broadcastUserInfo();
- @@ -7668,7 +7655,6 @@
- public void leaveObserverMode()
- {
- setTarget(null);
- - getKnownList().removeAllKnownObjects(); // reinit knownlist
- setXYZ(_savedLocation.getX(), _savedLocation.getY(), _savedLocation.getZ());
- setIsParalyzed(false);
- stopParalyze(false);
- @@ -8282,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();
- @@ -8873,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();
- @@ -8929,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)
- @@ -8951,9 +8936,6 @@
- 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);
- @@ -10372,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);
- @@ -10511,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/L2DoorInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2DoorInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2DoorInstance.java (révision 578)
- @@ -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/L2Character.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java (révision 578)
- @@ -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.World;
- -import net.sf.l2j.gameserver.model.WorldRegion;
- 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;
- @@ -151,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;
- @@ -197,7 +195,6 @@
- public L2Character(int objectId, CharTemplate template)
- {
- super(objectId);
- - initKnownList();
- initCharStat();
- initCharStatus();
- @@ -247,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()
- {
- @@ -530,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);
- @@ -634,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);
- @@ -918,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;
- @@ -1859,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));
- @@ -1911,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);
- @@ -2889,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));
- @@ -3218,18 +3195,12 @@
- }
- /**
- - * 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)
- {
- @@ -3236,8 +3207,7 @@
- // 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());
- @@ -3282,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;
- }
- @@ -3303,10 +3263,7 @@
- */
- public final int getTargetId()
- {
- - if (_target != null)
- - return _target.getObjectId();
- -
- - return -1;
- + return (_target != null) ? _target.getObjectId() : -1;
- }
- /**
- @@ -3828,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);
- @@ -4953,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)
- @@ -5522,12 +5479,6 @@
- }
- @Override
- - protected void badCoords()
- - {
- - decayMe();
- - }
- -
- - @Override
- public final void setRegion(WorldRegion value)
- {
- // confirm revalidation of old region's zones
- @@ -5541,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/template/PcTemplate.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/template/PcTemplate.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/template/PcTemplate.java (révision 578)
- @@ -18,6 +18,7 @@
- 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;
- @@ -24,9 +25,6 @@
- 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_datapack/data/html/mods/wedding/error_alreadymarried.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_alreadymarried.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/error_alreadymarried.htm (révision 578)
- @@ -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/start2.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/start2.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/start2.htm (révision 578)
- @@ -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_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Vehicle.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Vehicle.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Vehicle.java (révision 578)
- @@ -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/instance/L2RaceManagerInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2RaceManagerInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2RaceManagerInstance.java (révision 578)
- @@ -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/L2Skill.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java (révision 578)
- @@ -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/skills/effects/EffectSignetAntiSummon.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetAntiSummon.java (révision 578)
- @@ -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/model/actor/instance/L2GuardInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java (révision 578)
- @@ -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;
- 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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2MonsterInstance.java (révision 578)
- @@ -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/L2PetInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PetInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PetInstance.java (révision 578)
- @@ -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.PetDataEntry;
- import net.sf.l2j.gameserver.model.World;
- -import net.sf.l2j.gameserver.model.PetDataEntry;
- 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 (World.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());
- - World.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)
- @@ -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);
- 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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2CabaleBufferInstance.java (révision 578)
- @@ -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/L2SiegeGuardInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SiegeGuardInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SiegeGuardInstance.java (révision 578)
- @@ -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;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java (révision 578)
- @@ -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_datapack/data/html/mods/wedding/error_adena.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_adena.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/error_adena.htm (révision 578)
- @@ -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_noformal.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_noformal.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/error_noformal.htm (révision 578)
- @@ -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/disabled.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/disabled.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/disabled.htm (révision 578)
- @@ -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/waitforpartner.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/waitforpartner.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/waitforpartner.htm (révision 578)
- @@ -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/html/mods/wedding/error_sex.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_sex.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/error_sex.htm (révision 578)
- @@ -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_friendlist.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_friendlist.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/error_friendlist.htm (révision 578)
- @@ -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_wrongtarget.htm
- ===================================================================
- --- aCis_datapack/data/html/mods/wedding/error_wrongtarget.htm (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/error_wrongtarget.htm (révision 578)
- @@ -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 (nonexistent)
- +++ aCis_datapack/data/html/mods/wedding/notfound.htm (révision 578)
- @@ -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/admin/knownlist.htm
- ===================================================================
- --- aCis_datapack/data/html/admin/knownlist.htm (révision 568)
- +++ aCis_datapack/data/html/admin/knownlist.htm (révision 578)
- @@ -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/xml/npcs/31000-31999.xml
- ===================================================================
- --- aCis_datapack/data/xml/npcs/31000-31999.xml (révision 568)
- +++ aCis_datapack/data/xml/npcs/31000-31999.xml (révision 578)
- @@ -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_gameserver/java/net/sf/l2j/gameserver/geoengine/GeoEngine.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/GeoEngine.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/geoengine/GeoEngine.java (révision 578)
- @@ -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.Location;
- import net.sf.l2j.gameserver.model.World;
- -import net.sf.l2j.gameserver.model.Location;
- 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;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Object.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Object.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Object.java (révision 578)
- @@ -14,8 +14,13 @@
- */
- 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;
- @@ -22,10 +27,10 @@
- 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...)
- @@ -56,8 +61,6 @@
- public L2Object(int objectId)
- {
- _objectId = objectId;
- -
- - setRegion(World.getInstance().getRegion(_position));
- }
- public void onAction(L2PcInstance player)
- @@ -84,18 +87,8 @@
- */
- public void decayMe()
- {
- - assert _region != null;
- + setRegion(null);
- - final WorldRegion region = _region;
- -
- - synchronized (this)
- - {
- - _isVisible = false;
- - setRegion(null);
- - }
- -
- - // Out of synchronized to avoid deadlocks
- - World.getInstance().removeVisibleObject(this, region);
- World.getInstance().removeObject(this);
- }
- @@ -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(World.getInstance().getRegion(_position));
- - }
- + setRegion(World.getInstance().getRegion(_position));
- - // Add the L2Object spawn in the _allobjects of L2World
- 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
- - World.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 > World.WORLD_X_MAX)
- - x = World.WORLD_X_MAX - 5000;
- - if (x < World.WORLD_X_MIN)
- - x = World.WORLD_X_MIN + 5000;
- - if (y > World.WORLD_Y_MAX)
- - y = World.WORLD_Y_MAX - 5000;
- - if (y < World.WORLD_Y_MIN)
- - y = World.WORLD_Y_MIN + 5000;
- -
- - _position.set(x, y, z);
- - setRegion(World.getInstance().getRegion(_position));
- - }
- -
- - // Add the L2Object spawn in the _allobjects of L2World
- - 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
- - World.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 WorldRegion region = World.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 > World.WORLD_X_MAX)
- - x = World.WORLD_X_MAX - 5000;
- - if (x < World.WORLD_X_MIN)
- - x = World.WORLD_X_MIN + 5000;
- - if (y > World.WORLD_Y_MAX)
- - y = World.WORLD_Y_MAX - 5000;
- - if (y < World.WORLD_Y_MIN)
- - y = World.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();
- }
- @@ -440,8 +337,145 @@
- return _region;
- }
- - public void setRegion(WorldRegion 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/World.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/World.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/World.java (révision 578)
- @@ -14,9 +14,7 @@
- */
- 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.logging.Logger;
- @@ -79,7 +77,7 @@
- }
- }
- }
- - _log.info("L2World: WorldRegion grid (" + REGIONS_X + " by " + REGIONS_Y + ") is now setted up.");
- + _log.info("World: WorldRegion grid (" + REGIONS_X + " by " + REGIONS_Y + ") is now setted up.");
- }
- public void addObject(L2Object object)
- @@ -142,184 +140,6 @@
- return _pets.get(ownerId);
- }
- - /**
- - * Add a L2Object in the world.<BR>
- - * <BR>
- - * <B><U> Concept</U> :</B><BR>
- - * <BR>
- - * L2Object (including L2PcInstance) are identified in <B>_visibleObjects</B> of his current L2WorldRegion and in <B>_knownObjects</B> of other surrounding L2Characters <BR>
- - * L2PcInstance are identified in <B>_allPlayers</B> of L2World, in <B>_allPlayers</B> of his current L2WorldRegion and in <B>_knownPlayer</B> of other surrounding L2Characters <BR>
- - * <BR>
- - * <B><U> Actions</U> :</B><BR>
- - * <BR>
- - * <li>Add the L2Object object in _allPlayers* of L2World</li> <li>Add the L2Object object in _gmList** of GmListTable</li> <li>Add object in _knownObjects and _knownPlayer* of all surrounding L2WorldRegion L2Characters</li><BR>
- - * <li>If object is a L2Character, add all surrounding L2Object in its _knownObjects and all surrounding L2PcInstance in its _knownPlayer</li><BR>
- - * <I>* only if object is a L2PcInstance</I><BR>
- - * <I>** only if object is a GM L2PcInstance</I><BR>
- - * <BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object in _visibleObjects and _allPlayers* of L2WorldRegion (need synchronisation)</B></FONT><BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects and _allPlayers* of L2World (need synchronisation)</B></FONT><BR>
- - * <BR>
- - * <B><U> Example of use </U> :</B><BR>
- - * <BR>
- - * <li>Drop an Item</li> <li>Spawn a L2Character</li> <li>Apply Death Penalty of a L2PcInstance</li><BR>
- - * <BR>
- - * @param object L2object to add in the world
- - * @param newRegion L2WorldRegion in wich the object will be add (not used)
- - */
- - public void addVisibleObject(L2Object object, WorldRegion newRegion)
- - {
- - if (object instanceof L2PcInstance)
- - {
- - L2PcInstance player = (L2PcInstance) object;
- -
- - if (!player.isTeleporting())
- - {
- - L2PcInstance tmp = _players.get(player.getObjectId());
- - if (tmp != null)
- - {
- - _log.warning("Duplicate character!? Closing both characters (" + player.getName() + ")");
- - player.logout();
- - tmp.logout();
- - return;
- - }
- - _players.putIfAbsent(player.getObjectId(), player);
- - }
- - }
- -
- - if (!newRegion.isActive())
- - return;
- -
- - final boolean objectHasKnownlist = (object.getKnownList() != null);
- -
- - // tell the player about the surroundings
- - // Go through the visible objects contained in the circular area
- - for (L2Object visible : getVisibleObjects(object, 2000))
- - {
- - // Add the object in L2ObjectHashSet(L2Object) _knownObjects of the visible L2Character according to conditions :
- - // - L2Character is visible
- - // - object is not already known
- - // - object is in the watch distance
- - // If L2Object is a L2PcInstance, add L2Object in L2ObjectHashSet(L2PcInstance) _knownPlayer of the visible L2Character
- - if (visible.getKnownList() != null)
- - visible.getKnownList().addKnownObject(object);
- -
- - // Add the visible L2Object in L2ObjectHashSet(L2Object) _knownObjects of the object according to conditions
- - // If visible L2Object is a L2PcInstance, add visible L2Object in L2ObjectHashSet(L2PcInstance) _knownPlayer of the object
- - if (objectHasKnownlist)
- - object.getKnownList().addKnownObject(visible);
- - }
- - }
- -
- - /**
- - * Remove a L2Object from the world.<BR>
- - * <BR>
- - * <B><U> Concept</U> :</B><BR>
- - * <BR>
- - * L2Object (including L2PcInstance) are identified in <B>_visibleObjects</B> of his current L2WorldRegion and in <B>_knownObjects</B> of other surrounding L2Characters <BR>
- - * L2PcInstance are identified in <B>_allPlayers</B> of L2World, in <B>_allPlayers</B> of his current L2WorldRegion and in <B>_knownPlayer</B> of other surrounding L2Characters <BR>
- - * <BR>
- - * <B><U> Actions</U> :</B><BR>
- - * <BR>
- - * <li>Remove the L2Object object from _allPlayers* of L2World</li> <li>Remove the L2Object object from _visibleObjects and _allPlayers* of L2WorldRegion</li> <li>Remove the L2Object object from _gmList** of GmListTable</li> <li>Remove object from _knownObjects and _knownPlayer* of all
- - * surrounding L2WorldRegion L2Characters</li><BR>
- - * <li>If object is a L2Character, remove all L2Object from its _knownObjects and all L2PcInstance from its _knownPlayer</li><BR>
- - * <BR>
- - * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of L2World</B></FONT><BR>
- - * <BR>
- - * <I>* only if object is a L2PcInstance</I><BR>
- - * <I>** only if object is a GM L2PcInstance</I><BR>
- - * <BR>
- - * <B><U> Example of use </U> :</B><BR>
- - * <BR>
- - * <li>Pickup an Item</li> <li>Decay a L2Character</li><BR>
- - * <BR>
- - * @param object L2object to remove from the world
- - * @param oldRegion L2WorldRegion in wich the object was before removing
- - */
- - public void removeVisibleObject(L2Object object, WorldRegion oldRegion)
- - {
- - if (object == null || oldRegion == null)
- - return;
- -
- - // Remove the object from the L2ObjectHashSet(L2Object) _visibleObjects of L2WorldRegion
- - // If object is a L2PcInstance, remove it from the L2ObjectHashSet(L2PcInstance) _allPlayers of this L2WorldRegion
- - oldRegion.removeVisibleObject(object);
- -
- - final boolean objectHasKnownlist = (object.getKnownList() != null);
- -
- - // Go through all surrounding L2WorldRegion L2Characters
- - for (WorldRegion reg : oldRegion.getSurroundingRegions())
- - {
- - for (L2Object obj : reg.getObjects())
- - {
- - if (obj.getKnownList() != null)
- - obj.getKnownList().removeKnownObject(object);
- -
- - if (objectHasKnownlist)
- - object.getKnownList().removeKnownObject(obj);
- - }
- - }
- -
- - // If object is a L2Character :
- - // Remove all L2Object from L2ObjectHashSet(L2Object) containing all L2Object detected by the L2Character
- - // Remove all L2PcInstance from L2ObjectHashSet(L2PcInstance) containing all player ingame detected by the L2Character
- - if (objectHasKnownlist)
- - object.getKnownList().removeAllKnownObjects();
- -
- - // If selected L2Object is a L2PcIntance, remove it from L2ObjectHashSet(L2PcInstance) _allPlayers of L2World
- - if (object instanceof L2PcInstance)
- - {
- - if (!((L2PcInstance) object).isTeleporting())
- - removePlayer((L2PcInstance) object);
- - }
- - }
- -
- - /**
- - * <B><U> Concept</U> :</B><BR>
- - * <BR>
- - * All visible object are identified in <B>_visibleObjects</B> of their current L2WorldRegion <BR>
- - * All surrounding L2WorldRegion are identified in <B>_surroundingRegions</B> of the selected L2WorldRegion in order to scan a large area around a L2Object
- - * @param object L2object that determine the center of the circular area
- - * @param radius Radius of the circular area
- - * @return all visible objects of the L2WorldRegions in the circular area (radius) centered on the object.
- - */
- - public static List<L2Object> getVisibleObjects(L2Object object, int radius)
- - {
- - if (object == null || !object.isVisible())
- - return new ArrayList<>();
- -
- - int x = object.getX();
- - int y = object.getY();
- - int sqRadius = radius * radius;
- -
- - // Create an FastList in order to contain all visible L2Object
- - List<L2Object> result = new ArrayList<>();
- -
- - // Go through the FastList of region
- - for (WorldRegion regi : object.getRegion().getSurroundingRegions())
- - {
- - // Go through visible objects of the selected region
- - for (L2Object _object : regi.getObjects())
- - {
- - if (_object == null || _object.equals(object))
- - continue; // skip our own character
- -
- - int x1 = _object.getX();
- - int y1 = _object.getY();
- -
- - double dx = x1 - x;
- - double dy = y1 - y;
- -
- - // If the visible object is inside the circular area add the object to the FastList result
- - if (dx * dx + dy * dy < sqRadius)
- - result.add(_object);
- - }
- - }
- -
- - return result;
- - }
- -
- public static int getRegionX(int regionX)
- {
- return (regionX - REGION_X_OFFSET) * REGION_SIZE;
- @@ -332,7 +152,7 @@
- /**
- * @param point position of the object.
- - * @return the current L2WorldRegion of the object according to its position (x,y).
- + * @return the current WorldRegion of the object according to its position (x,y).
- */
- public WorldRegion getRegion(Location point)
- {
- @@ -353,10 +173,9 @@
- }
- /**
- - * Check if the current L2WorldRegions of the object is valid according to its position (x,y).
- * @param x X position of the object
- * @param y Y position of the object
- - * @return True if the L2WorldRegion is valid
- + * @return True if the given coordinates are valid WorldRegion coordinates.
- */
- private static boolean validRegion(int x, int y)
- {
- @@ -364,7 +183,7 @@
- }
- /**
- - * Deleted all spawns in the world.
- + * Delete all spawns in the world.
- */
- public void deleteVisibleNpcSpawns()
- {
- 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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/L2WaterZone.java (révision 578)
- @@ -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));
- @@ -57,7 +57,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));
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Party.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Party.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Party.java (révision 578)
- @@ -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/skills/effects/EffectConfuseMob.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectConfuseMob.java (révision 578)
- @@ -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/EffectSignet.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignet.java (révision 578)
- @@ -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/model/olympiad/OlympiadGameNormal.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java (révision 578)
- @@ -24,8 +24,8 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.World;
- -import net.sf.l2j.gameserver.model.Location;
- 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;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/AggroInfo.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/AggroInfo.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/AggroInfo.java (révision 578)
- @@ -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/itemcontainer/PetInventory.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/PetInventory.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/itemcontainer/PetInventory.java (révision 578)
- @@ -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,22 +104,6 @@
- }
- @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();
- @@ -132,7 +110,16 @@
- 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/WorldRegion.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/WorldRegion.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/WorldRegion.java (révision 578)
- @@ -15,18 +15,16 @@
- package net.sf.l2j.gameserver.model;
- import java.util.ArrayList;
- +import java.util.Collection;
- import java.util.List;
- -import java.util.concurrent.ScheduledFuture;
- -import java.util.concurrent.locks.Lock;
- -import java.util.concurrent.locks.ReentrantLock;
- +import java.util.Map;
- +import java.util.concurrent.ConcurrentHashMap;
- +import java.util.concurrent.atomic.AtomicInteger;
- -import net.sf.l2j.commons.concurrent.ThreadPool;
- -
- 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.L2Vehicle;
- 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;
- @@ -35,7 +33,8 @@
- public final class WorldRegion
- {
- - private final List<L2Object> _objects = new ArrayList<>();
- + private final Map<Integer, L2Object> _objects = new ConcurrentHashMap<>();
- +
- private final List<WorldRegion> _surroundingRegions = new ArrayList<>();
- private final List<L2ZoneType> _zones = new ArrayList<>();
- @@ -42,11 +41,8 @@
- private final int _tileX;
- private final int _tileY;
- - private final Lock _lock = new ReentrantLock();
- -
- private boolean _active;
- - private ScheduledFuture<?> _activateTask;
- - private int _playersCount;
- + private AtomicInteger _playersCount = new AtomicInteger();
- public WorldRegion(int x, int y)
- {
- @@ -57,12 +53,12 @@
- @Override
- public String toString()
- {
- - return "WorldRegion [_tileX=" + _tileX + ", _tileY=" + _tileY + ", _active=" + _active + ", _playersCount=" + _playersCount + "]";
- + return "WorldRegion " + _tileX + "_" + _tileY + ", _active=" + _active + ", _playersCount=" + _playersCount.get() + "]";
- }
- - public List<L2Object> getObjects()
- + public Collection<L2Object> getObjects()
- {
- - return _objects;
- + return _objects.values();
- }
- public void addSurroundingRegion(WorldRegion region)
- @@ -162,33 +158,26 @@
- public int getPlayersCount()
- {
- - return _playersCount;
- + return _playersCount.get();
- }
- /**
- - * Check if all 9 neighbors (including self) are inactive or active but with no players.
- + * Check if neighbors (including self) aren't inhabited.
- * @return true if the above condition is met.
- */
- - public boolean areNeighborsEmpty()
- + public boolean isEmptyNeighborhood()
- {
- - // if this region is occupied, return false.
- - if (isActive() && _playersCount != 0)
- - return false;
- -
- - // if any one of the neighbors is occupied, return false
- for (WorldRegion neighbor : _surroundingRegions)
- {
- - if (neighbor.isActive() && neighbor.getPlayersCount() != 0)
- + if (neighbor.getPlayersCount() != 0)
- return false;
- }
- -
- - // in all other cases, return true.
- return true;
- }
- /**
- - * This function turns this region's AI and geodata on or off
- - * @param value
- + * 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)
- {
- @@ -197,10 +186,9 @@
- _active = value;
- - // turn the AI on or off to match the region's activation.
- if (!value)
- {
- - for (L2Object o : _objects)
- + for (L2Object o : _objects.values())
- {
- if (o instanceof L2Attackable)
- {
- @@ -217,7 +205,6 @@
- mob.getAggroList().clear();
- mob.getAttackByList().clear();
- - mob.getKnownList().removeAllKnownObjects();
- // stop the ai tasks
- if (mob.hasAI())
- @@ -226,13 +213,11 @@
- mob.getAI().stopAITask();
- }
- }
- - else if (o instanceof L2Vehicle)
- - ((L2Vehicle) o).getKnownList().removeAllKnownObjects();
- }
- }
- else
- {
- - for (L2Object o : _objects)
- + for (L2Object o : _objects.values())
- {
- if (o instanceof L2Attackable)
- ((L2Attackable) o).getStatus().startHpMpRegeneration();
- @@ -242,97 +227,33 @@
- }
- }
- + /**
- + * 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;
- - _lock.lock();
- - try
- - {
- - _objects.add(object);
- -
- - if (object instanceof L2PcInstance)
- - {
- - // if this is the first player to enter the region, activate self & neighbors
- - if (_playersCount++ == 0)
- - {
- - // first set self to active and do self-tasks...
- - setActive(true);
- -
- - // if the timer to deactivate neighbors is running, cancel it.
- - if (_activateTask != null)
- - _activateTask.cancel(true);
- -
- - // then, set a timer to activate the neighbors
- - _activateTask = ThreadPool.schedule(new ActivateTask(true), 1000);
- - }
- - }
- - }
- - finally
- - {
- - _lock.unlock();
- - }
- + _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;
- - _lock.lock();
- - try
- - {
- - _objects.remove(object);
- -
- - if (object instanceof L2PcInstance)
- - {
- - if (--_playersCount == 0)
- - {
- - // if the timer to activate neighbors is running, cancel it.
- - if (_activateTask != null)
- - _activateTask.cancel(true);
- -
- - // start a timer to "suggest" a deactivate to self and neighbors.
- - // suggest means: first check if a neighbor has L2PcInstances in it. If not, deactivate.
- - _activateTask = ThreadPool.schedule(new ActivateTask(false), 60000);
- - }
- - }
- - }
- - finally
- - {
- - _lock.unlock();
- - }
- - }
- -
- - public class ActivateTask implements Runnable
- - {
- - private final boolean _isActivating;
- + _objects.remove(object.getObjectId());
- - public ActivateTask(boolean isActivating)
- - {
- - _isActivating = isActivating;
- - }
- -
- - @Override
- - public void run()
- - {
- - if (_isActivating)
- - {
- - // for each neighbor, if it's not active, activate.
- - for (WorldRegion neighbor : getSurroundingRegions())
- - neighbor.setActive(true);
- - }
- - else
- - {
- - if (areNeighborsEmpty())
- - setActive(false);
- -
- - // check and deactivate
- - for (WorldRegion neighbor : getSurroundingRegions())
- - if (neighbor.areNeighborsEmpty())
- - neighbor.setActive(false);
- - }
- - }
- + if (object instanceof L2PcInstance)
- + _playersCount.decrementAndGet();
- }
- }
- \ No newline at end of file
- 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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java (révision 578)
- @@ -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.World;
- -import net.sf.l2j.gameserver.model.WorldRegion;
- 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(World.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
- - World.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,34 +969,20 @@
- }
- /**
- - * 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;
- -
- - WorldRegion 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)
- @@ -1016,12 +989,12 @@
- {
- 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)
- - World.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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/item/kind/Weapon.java (révision 578)
- @@ -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/actor/L2Attackable.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (révision 578)
- @@ -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();
- @@ -1636,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/stat/PetStat.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PetStat.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PetStat.java (révision 578)
- @@ -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/L2Summon.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Summon.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Summon.java (révision 578)
- @@ -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/L2Npc.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (révision 578)
- @@ -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;
- @@ -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,16 +1348,6 @@
- _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()
- {
- @@ -1388,9 +1354,6 @@
- // 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/instance/L2XmassTreeInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2XmassTreeInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2XmassTreeInstance.java (révision 578)
- @@ -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/instance/L2FriendlyMobInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2FriendlyMobInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2FriendlyMobInstance.java (révision 578)
- @@ -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/L2SummonInstance.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SummonInstance.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2SummonInstance.java (révision 578)
- @@ -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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2WeddingManagerInstance.java (révision 578)
- @@ -63,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.getCoupleId() > 0)
- - sendHtmlMessage(player, "data/html/mods/Wedding_start2.htm");
- + 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");
- }
- }
- }
- @@ -93,7 +93,7 @@
- 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;
- }
- @@ -110,7 +110,7 @@
- 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"))
- CoupleManager.getInstance().deleteCouple(player.getCoupleId());
- @@ -173,7 +173,7 @@
- // Check if player target himself
- if (partner.getObjectId() == requester.getObjectId())
- {
- - sendHtmlMessage(requester, "data/html/mods/Wedding_error_wrongtarget.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_wrongtarget.htm");
- return false;
- }
- @@ -180,7 +180,7 @@
- // Sex check
- if (!Config.WEDDING_SAMESEX && partner.getAppearance().getSex() == requester.getAppearance().getSex())
- {
- - sendHtmlMessage(requester, "data/html/mods/Wedding_error_sex.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_sex.htm");
- return false;
- }
- @@ -187,7 +187,7 @@
- // Check if player has the target on friendlist
- if (!requester.getFriendList().contains(partner.getObjectId()))
- {
- - sendHtmlMessage(requester, "data/html/mods/Wedding_error_friendlist.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_friendlist.htm");
- return false;
- }
- @@ -194,7 +194,7 @@
- // Target mustn't be already married
- if (partner.getCoupleId() > 0)
- {
- - sendHtmlMessage(requester, "data/html/mods/Wedding_error_alreadymarried.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_alreadymarried.htm");
- return false;
- }
- @@ -201,7 +201,7 @@
- // Check for Formal Wear
- if (Config.WEDDING_FORMALWEAR && !wearsFormalWear(requester, partner))
- {
- - sendHtmlMessage(requester, "data/html/mods/Wedding_error_noformal.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_noformal.htm");
- return false;
- }
- @@ -208,7 +208,7 @@
- // Check and reduce wedding price
- if (requester.getAdena() < Config.WEDDING_PRICE || partner.getAdena() < Config.WEDDING_PRICE)
- {
- - sendHtmlMessage(requester, "data/html/mods/Wedding_error_adena.htm");
- + sendHtmlMessage(requester, "data/html/mods/wedding/error_adena.htm");
- return false;
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetNoise.java (révision 578)
- @@ -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/EffectSignetMDam.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/effects/EffectSignetMDam.java (révision 578)
- @@ -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/l2skills/L2SkillSiegeFlag.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSiegeFlag.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/skills/l2skills/L2SkillSiegeFlag.java (révision 578)
- @@ -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/scripting/scripts/ai/individual/Valakas.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Valakas.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Valakas.java (révision 578)
- @@ -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/group/Monastery.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/Monastery.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/Monastery.java (révision 578)
- @@ -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/datatables/DoorTable.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/datatables/DoorTable.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/datatables/DoorTable.java (révision 578)
- @@ -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/handler/itemhandlers/SpiritShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java (révision 578)
- @@ -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/BeastSoulShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java (révision 578)
- @@ -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/scripting/scripts/ai/individual/Antharas.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Antharas.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Antharas.java (révision 578)
- @@ -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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Baium.java (révision 578)
- @@ -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/group/StakatoNest.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/StakatoNest.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/StakatoNest.java (révision 578)
- @@ -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/handler/itemhandlers/SoulShots.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java (révision 578)
- @@ -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/BeastSpiritShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java (révision 578)
- @@ -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/admincommandhandlers/AdminEffects.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEffects.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEffects.java (révision 578)
- @@ -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)
- - World.getInstance().removePlayer((L2PcInstance) player);
- + oldName = target.getName();
- - player.setName(name);
- + target.setName(name);
- - if (player instanceof L2PcInstance)
- - {
- - World.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 + ".");
- }
- @@ -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.");
- @@ -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/scripting/scripts/ai/L2AttackableAIScript.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/L2AttackableAIScript.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/L2AttackableAIScript.java (révision 578)
- @@ -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/ai/individual/Gordon.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Gordon.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Gordon.java (révision 578)
- @@ -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/group/PrimevalIsle.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PrimevalIsle.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PrimevalIsle.java (révision 578)
- @@ -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/util/Broadcast.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/util/Broadcast.java (révision 578)
- @@ -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>
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (révision 578)
- @@ -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,7 +41,6 @@
- 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;
- @@ -97,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)
- {
- @@ -165,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/admincommandhandlers/AdminBuffs.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBuffs.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBuffs.java (révision 578)
- @@ -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;
- 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 (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/DrChaos.java (révision 578)
- @@ -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/group/PlainsOfDion.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PlainsOfDion.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/scripting/scripts/ai/group/PlainsOfDion.java (révision 578)
- @@ -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/datatables/ItemTable.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/datatables/ItemTable.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/datatables/ItemTable.java (révision 578)
- @@ -166,7 +166,7 @@
- item.setDropProtection(actor.getObjectId(), false);
- }
- - // Add the ItemInstance object to _allObjects of L2world
- + // Add the ItemInstance object to _objects of World.
- World.getInstance().addObject(item);
- // Set Item parameters
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java (révision 578)
- @@ -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/chathandlers/ChatAll.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java (révision 578)
- @@ -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/taskmanager/KnownListUpdateTaskManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/KnownListUpdateTaskManager.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/KnownListUpdateTaskManager.java (nonexistent)
- @@ -1,118 +0,0 @@
- -/*
- - * 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.taskmanager;
- -
- -import net.sf.l2j.commons.concurrent.ThreadPool;
- -
- -import net.sf.l2j.Config;
- -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.L2Attackable;
- -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;
- -
- -/**
- - * Periodically updates known list of all existing {@link L2Character}.<br>
- - * Special scope is used for {@link WorldRegion} without {@link L2PcInstance} inside.
- - * @author Hasha
- - */
- -public final class KnownListUpdateTaskManager implements Runnable
- -{
- - // Update for NPCs is performed each FULL_UPDATE tick interval.
- - private static final int FULL_UPDATE = 10;
- -
- - private boolean _flagForgetAdd = true;
- - private int _timer = FULL_UPDATE;
- -
- - public static final KnownListUpdateTaskManager getInstance()
- - {
- - return SingletonHolder._instance;
- - }
- -
- - protected KnownListUpdateTaskManager()
- - {
- - ThreadPool.scheduleAtFixedRate(this, Config.KNOWNLIST_UPDATE_INTERVAL, Config.KNOWNLIST_UPDATE_INTERVAL);
- - }
- -
- - @Override
- - public final void run()
- - {
- - // Decrease and reset full iteration timer.
- - if (--_timer == 0)
- - _timer = FULL_UPDATE;
- -
- - // When iteration timer is 1, 2, perform forget and add for NPCs.
- - final boolean fullUpdate = _timer < 3;
- -
- - // Swap forget/add flag for this iteration.
- - _flagForgetAdd = !_flagForgetAdd;
- -
- - // Go through all world regions.
- - for (WorldRegion regions[] : World.getInstance().getWorldRegions())
- - {
- - for (WorldRegion region : regions)
- - {
- - // Skip inactive regions unless full update (knownlist can be still updated regardless AI active or detached).
- - if (!region.isActive() && !fullUpdate)
- - continue;
- -
- - // Go through all visible objects.
- - for (L2Object object : region.getObjects())
- - {
- - // don't busy about objects lower than L2Character.
- - if (!(object instanceof L2Character) || !object.isVisible())
- - continue;
- -
- - final boolean isPlayable = object instanceof L2Playable;
- - final boolean isAttackable = object instanceof L2Attackable;
- -
- - // When one of these conditions below is passed performs forget objects (which are beyond forget distance) or add objects from surrounding regions (which are closer than detect distance)
- - // 1) object is non-attackable and non-playable (NPCs) -> each FULL_UPDATE_TIMER iterations
- - // 2) object is playable (players, summons, pets) -> each iteration
- - // 3) object is attackable (monsters, raids, etc) -> each iteration
- - if (fullUpdate || isPlayable || isAttackable)
- - {
- - // One iteration performs object forget.
- - if (_flagForgetAdd)
- - object.getKnownList().forgetObjects();
- - // The other iteration performs object add.
- - else
- - {
- - for (WorldRegion surroundingRegion : region.getSurroundingRegions())
- - {
- - // Object is a monster and surrounding region does not contain playable, skip.
- - if (isAttackable && !surroundingRegion.isActive())
- - continue;
- -
- - for (L2Object o : surroundingRegion.getObjects())
- - {
- - if (o != object)
- - object.getKnownList().addKnownObject(o);
- - }
- - }
- - }
- - }
- - }
- - }
- - }
- - }
- -
- - private static class SingletonHolder
- - {
- - protected static final KnownListUpdateTaskManager _instance = new KnownListUpdateTaskManager();
- - }
- -}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminCreateItem.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminCreateItem.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminCreateItem.java (révision 578)
- @@ -15,6 +15,7 @@
- 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;
- @@ -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/AdminHeal.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminHeal.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminHeal.java (révision 578)
- @@ -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/network/clientpackets/RequestGiveItemToPet.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGiveItemToPet.java (révision 578)
- @@ -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/TradeRequest.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java (révision 578)
- @@ -48,7 +48,7 @@
- }
- final L2PcInstance target = World.getInstance().getPlayer(_objectId);
- - if (target == null || !player.getKnownList().knowsObject(target) || target.equals(player))
- + 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/ai/model/AbstractAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/AbstractAI.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/AbstractAI.java (révision 578)
- @@ -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/handler/admincommandhandlers/AdminGeoEngine.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGeoEngine.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminGeoEngine.java (révision 578)
- @@ -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.Location;
- import net.sf.l2j.gameserver.model.World;
- -import net.sf.l2j.gameserver.model.Location;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/L2GameClient.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/L2GameClient.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/L2GameClient.java (révision 578)
- @@ -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 = World.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/clientpackets/CharacterSelected.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterSelected.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterSelected.java (révision 578)
- @@ -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/ai/model/L2DoorAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2DoorAI.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2DoorAI.java (révision 578)
- @@ -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/handler/admincommandhandlers/AdminAdmin.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (révision 578)
- @@ -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/GameServer.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/GameServer.java (révision 578)
- @@ -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;
- @@ -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()
- {
- @@ -223,7 +220,6 @@
- DecayTaskManager.getInstance();
- GameTimeTaskManager.getInstance();
- ItemsOnGroundTaskManager.getInstance();
- - KnownListUpdateTaskManager.getInstance();
- MovementTaskManager.getInstance();
- PvpFlagTaskManager.getInstance();
- RandomAnimationTaskManager.getInstance();
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (révision 578)
- @@ -135,7 +135,7 @@
- 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/ai/CtrlEvent.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/CtrlEvent.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/CtrlEvent.java (révision 578)
- @@ -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/L2CharacterAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2CharacterAI.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2CharacterAI.java (révision 578)
- @@ -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/handler/admincommandhandlers/AdminKnownlist.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKnownlist.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminKnownlist.java (révision 578)
- @@ -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.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
- @@ -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/AdminRes.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminRes.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminRes.java (révision 578)
- @@ -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/network/clientpackets/RequestGetItemFromPet.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGetItemFromPet.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestGetItemFromPet.java (révision 578)
- @@ -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/RequestRecordInfo.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestRecordInfo.java (révision 578)
- @@ -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/ai/model/L2AttackableAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2AttackableAI.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2AttackableAI.java (révision 578)
- @@ -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)
- @@ -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/L2SiegeGuardAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2SiegeGuardAI.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2SiegeGuardAI.java (révision 578)
- @@ -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
- {
- @@ -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/taskmanager/ItemsOnGroundTaskManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/ItemsOnGroundTaskManager.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/ItemsOnGroundTaskManager.java (révision 578)
- @@ -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(World.getInstance().getRegion(item.getPosition()));
- - item.getRegion().addVisibleObject(item);
- - item.setIsVisible(true);
- - World.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();
- - World.getInstance().removeVisibleObject(item, item.getRegion());
- - World.getInstance().removeObject(item);
- - _items.remove(item);
- + item.decayMe();
- }
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2VehicleAI.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2VehicleAI.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/ai/model/L2VehicleAI.java (révision 578)
- @@ -123,11 +123,6 @@
- }
- @Override
- - protected void onEvtForgetObject(L2Object object)
- - {
- - }
- -
- - @Override
- protected void onEvtCancel()
- {
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/WaterTaskManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/WaterTaskManager.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/WaterTaskManager.java (révision 578)
- @@ -22,8 +22,8 @@
- 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.network.serverpackets.SetupGauge.GaugeColor;
- import net.sf.l2j.gameserver.skills.Stats;
- /**
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/ZoneManager.java (révision 578)
- @@ -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/instancemanager/BoatManager.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/BoatManager.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/BoatManager.java (révision 578)
- @@ -18,8 +18,8 @@
- import java.util.Map;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- +import net.sf.l2j.gameserver.model.VehiclePathPoint;
- import net.sf.l2j.gameserver.model.World;
- -import net.sf.l2j.gameserver.model.VehiclePathPoint;
- 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;
- }
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSignsFestival.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSignsFestival.java (révision 568)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSignsFestival.java (révision 578)
- @@ -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.Location;
- import net.sf.l2j.gameserver.model.World;
- -import net.sf.l2j.gameserver.model.Location;
- 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;
Add Comment
Please, Sign In to add comment