diff --git a/trunk/dist/game/data/html/admin/zone.htm b/trunk/dist/game/data/html/admin/zone.htm index 121aa2cf03..8fabc38c8b 100644 --- a/trunk/dist/game/data/html/admin/zone.htm +++ b/trunk/dist/game/data/html/admin/zone.htm @@ -23,10 +23,11 @@
No Landing:%NOLAND%
No Summon:%NOSUMMON%
Water:%WATER%
-
Swamp:%SWAMP%
-
Danger:%DANGER%
-
Script:%SCRIPT%
-
No store:%NOSTORE%
+
Fishing:%FISHING%
+
Swamp:%SWAMP%
+
Danger:%DANGER%
+
Script:%SCRIPT%
+
No store:%NOSTORE%

diff --git a/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminZone.java b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminZone.java index fd0d15de09..a267072304 100644 --- a/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminZone.java +++ b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminZone.java @@ -128,6 +128,7 @@ public class AdminZone implements IAdminCommandHandler adminReply.replace("%NOLAND%", (activeChar.isInsideZone(ZoneId.NO_LANDING) ? "YES" : "NO")); adminReply.replace("%NOSUMMON%", (activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) ? "YES" : "NO")); adminReply.replace("%WATER%", (activeChar.isInsideZone(ZoneId.WATER) ? "YES" : "NO")); + adminReply.replace("%FISHING%", (activeChar.isInsideZone(ZoneId.FISHING) ? "YES" : "NO")); adminReply.replace("%SWAMP%", (activeChar.isInsideZone(ZoneId.SWAMP) ? "YES" : "NO")); adminReply.replace("%DANGER%", (activeChar.isInsideZone(ZoneId.DANGER_AREA) ? "YES" : "NO")); adminReply.replace("%NOSTORE%", (activeChar.isInsideZone(ZoneId.NO_STORE) ? "YES" : "NO")); diff --git a/trunk/dist/game/data/zones/fishing.xml b/trunk/dist/game/data/zones/fishing.xml index 757a2896dd..c748b73bb6 100644 --- a/trunk/dist/game/data/zones/fishing.xml +++ b/trunk/dist/game/data/zones/fishing.xml @@ -1,329 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/model/zone/type/L2FishingZone.java b/trunk/java/com/l2jserver/gameserver/model/zone/type/L2FishingZone.java index a9345a92a2..a9db383bc1 100644 --- a/trunk/java/com/l2jserver/gameserver/model/zone/type/L2FishingZone.java +++ b/trunk/java/com/l2jserver/gameserver/model/zone/type/L2FishingZone.java @@ -26,11 +26,6 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.itemcontainer.Inventory; -import com.l2jserver.gameserver.model.items.L2Weapon; -import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.model.items.type.EtcItemType; -import com.l2jserver.gameserver.model.items.type.WeaponType; import com.l2jserver.gameserver.model.zone.L2ZoneType; import com.l2jserver.gameserver.model.zone.ZoneId; import com.l2jserver.gameserver.network.serverpackets.ExAutoFishAvailable; @@ -64,7 +59,7 @@ public class L2FishingZone extends L2ZoneType final L2PcInstance plr = (L2PcInstance) character; if (!_task.containsKey(plr.getObjectId())) { - _task.put(plr.getObjectId(), ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new FishReq(plr), 500, 2000)); + _task.put(plr.getObjectId(), ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new fishingAvailable(plr), 500, 2000)); } } } @@ -76,8 +71,12 @@ public class L2FishingZone extends L2ZoneType { character.setInsideZone(ZoneId.FISHING, false); } - stopTask(character); _task.remove(character.getObjectId()); + Future t = _task.get(character.getObjectId()); + if (t != null) + { + t.cancel(false); + } } @Override @@ -92,16 +91,6 @@ public class L2FishingZone extends L2ZoneType onEnter(character); } - protected void stopTask(L2Character character) - { - _task.remove(character.getObjectId()); - Future t = _task.get(character.getObjectId()); - if (t != null) - { - t.cancel(false); - } - } - /* * getWaterZ() this added function returns the Z value for the water surface. In effect this simply returns the upper Z value of the zone. This required some modification of L2ZoneForm, and zone form extentions. */ @@ -110,11 +99,11 @@ public class L2FishingZone extends L2ZoneType return getZone().getHighZ(); } - class FishReq implements Runnable + class fishingAvailable implements Runnable { private final L2PcInstance player; - FishReq(L2PcInstance pl) + fishingAvailable(L2PcInstance pl) { player = pl; } @@ -122,26 +111,8 @@ public class L2FishingZone extends L2ZoneType @Override public void run() { - if (Config.ALLOWFISHING && !player.isFishing() && !player.isInsideZone(ZoneId.WATER) && !player.isInBoat() && !player.isInCraftMode() && !player.isInStoreMode() && !player.isTransformed()) + if (Config.ALLOWFISHING && !player.isFishing() && player.isInsideZone(ZoneId.FISHING) && !player.isInsideZone(ZoneId.WATER) && !player.isInBoat() && !player.isInCraftMode() && !player.isInStoreMode() && !player.isTransformed()) { - // check for equiped fishing rod - final L2Weapon equipedWeapon = player.getActiveWeaponItem(); - - if (((equipedWeapon == null) || (equipedWeapon.getItemType() != WeaponType.FISHINGROD))) - { - stopTask(player); - return; - } - - // check for equiped lure - final L2ItemInstance equipedLeftHand = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND); - - if ((equipedLeftHand == null) || (equipedLeftHand.getItemType() != EtcItemType.LURE)) - { - stopTask(player); - return; - } - player.sendPacket(new ExAutoFishAvailable(player)); } }