Addition of Corroded Fields timed hunting zone.
Thanks to manax182.
This commit is contained in:
parent
e5fb85bbf2
commit
2185cd4bdd
@ -14356,6 +14356,7 @@ public class PlayerInstance extends Playable
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
teleToLocation(MapRegionManager.getInstance().getTeleToLocation(this, TeleportWhereType.TOWN));
|
||||
setInstance(null);
|
||||
}
|
||||
}
|
||||
}, 60000, 60000);
|
||||
|
@ -148,7 +148,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
}
|
||||
else // Transcendent zones.
|
||||
{
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + instanceId, null, player);
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -14427,6 +14427,7 @@ public class PlayerInstance extends Playable
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
teleToLocation(MapRegionManager.getInstance().getTeleToLocation(this, TeleportWhereType.TOWN));
|
||||
setInstance(null);
|
||||
}
|
||||
}
|
||||
}, 60000, 60000);
|
||||
|
@ -148,7 +148,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
}
|
||||
else // Transcendent zones.
|
||||
{
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + instanceId, null, player);
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -61,16 +61,19 @@
|
||||
<minLevel>105</minLevel>
|
||||
<maxLevel>130</maxLevel>
|
||||
</zone>
|
||||
<!--<zone id="13" name="Corroded Fields">
|
||||
<zone id="13" name="Corroded Fields">
|
||||
<enterLocation>90327,198818,-3280</enterLocation>
|
||||
<initialTime>3600</initialTime> 1 hour
|
||||
<maxAddedTime>3600</maxAddedTime> 1 hour
|
||||
<initialTime>3600</initialTime> <!-- 1 hour -->
|
||||
<resetDelay>36000</resetDelay> <!-- 10 hours -->
|
||||
<maxAddedTime>3600</maxAddedTime> <!-- 1 hour -->
|
||||
<remainRefillTime>43200</remainRefillTime>
|
||||
<refillTimeMax>3600</refillTimeMax>
|
||||
<entryFee>150000</entryFee>
|
||||
<minLevel>100</minLevel>
|
||||
<maxLevel>130</maxLevel>
|
||||
</zone>-->
|
||||
<instanceId>1013</instanceId>
|
||||
<soloInstance>false</soloInstance>
|
||||
</zone>
|
||||
<zone id="14" name="Otherworldly Atelia Refinery">
|
||||
<enterLocation>-49013,15351,-8808</enterLocation>
|
||||
<initialTime>3600</initialTime> <!-- 1 hour -->
|
||||
|
81
L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/instances/CorrodedFields.xml
vendored
Normal file
81
L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/instances/CorrodedFields.xml
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<instance id="1013" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
<location x="90327" y="198818" z="-3280" />
|
||||
</enter>
|
||||
<exit type="TOWN" />
|
||||
</locations>
|
||||
<conditions>
|
||||
<condition type="Level">
|
||||
<param name="min" value="100" />
|
||||
<param name="max" value="130" />
|
||||
</condition>
|
||||
</conditions>
|
||||
<reenter apply="ON_ENTER">
|
||||
<reset day="MONDAY" hour="6" minute="30" />
|
||||
<reset day="TUESDAY" hour="6" minute="30" />
|
||||
<reset day="WEDNESDAY" hour="6" minute="30" />
|
||||
<reset day="THURSDAY" hour="6" minute="30" />
|
||||
<reset day="FRIDAY" hour="6" minute="30" />
|
||||
<reset day="SATURDAY" hour="6" minute="30" />
|
||||
<reset day="SUNDAY" hour="6" minute="30" />
|
||||
</reenter>
|
||||
<spawnlist>
|
||||
<group name="general" spawnByDefault="true">
|
||||
<territories>
|
||||
<territory name="monsters1" shape="Cuboid" minZ="-4000" maxZ="-2000">
|
||||
<node x="99935" y="201900"/>
|
||||
<node x="77258" y="229373"/>
|
||||
</territory>
|
||||
<territory name="monsters2" shape="Cuboid" minZ="-4000" maxZ="-2000">
|
||||
<node x="94956" y="195470"/>
|
||||
<node x="72214" y="177904"/>
|
||||
</territory>
|
||||
<territory name="monsters3" shape="Cuboid" minZ="-4000" maxZ="-2000">
|
||||
<node x="95164" y="177376"/>
|
||||
<node x="83501" y="164797"/>
|
||||
</territory>
|
||||
</territories>
|
||||
<npc id="24596" count="350" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon's Elite Archer -->
|
||||
<npc id="24597" count="350" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon's Elite Mage -->
|
||||
<npc id="24598" count="350" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon's Elite Raider -->
|
||||
<npc id="24599" count="350" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon's Elite Swordsman -->
|
||||
<npc id="24600" count="350" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon's Elite Wyrm -->
|
||||
|
||||
<npc id="24601" count="250" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Shaman -->
|
||||
<npc id="24602" count="250" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Mage -->
|
||||
<npc id="24603" count="250" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Pikeman -->
|
||||
<npc id="24604" count="250" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Swordsman -->
|
||||
<npc id="24605" count="250" respawnTime="30sec" respawnRandom="0sec" /> <!-- Weakened Krotania -->
|
||||
|
||||
<npc id="24601" count="150" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Shaman -->
|
||||
<npc id="24602" count="150" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Mage -->
|
||||
<npc id="24603" count="150" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Pikeman -->
|
||||
<npc id="24604" count="150" respawnTime="30sec" respawnRandom="0sec" /> <!-- Water Dragon Swordsman -->
|
||||
<npc id="24605" count="150" respawnTime="30sec" respawnRandom="0sec" /> <!-- Weakened Krotania -->
|
||||
</group>
|
||||
<group name="teleporters" spawnByDefault="true">
|
||||
<npc id="34568" x="90225" y="198739" z="-3281" heading="43018" /> <!-- Patrol Teleporter -->
|
||||
<npc id="34568" x="80147" y="196405" z="-2799" heading="24294" /> <!-- Patrol Teleporter -->
|
||||
<npc id="34568" x="95949" y="171044" z="-3650" heading="43018" /> <!-- Patrol Teleporter -->
|
||||
<npc id="34568" x="77665" y="183421" z="-3571" heading="43018" /> <!-- Patrol Teleporter -->
|
||||
<npc id="34568" x="95999" y="210098" z="-3446" heading="43018" /> <!-- Patrol Teleporter -->
|
||||
<npc id="34568" x="81468" y="226503" z="-3595" heading="43018" /> <!-- Patrol Teleporter -->
|
||||
</group>
|
||||
<group name="patrols" spawnByDefault="true">
|
||||
<npc id="34569" x="90222" y="198970" z="-3296" heading="43018" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="90437" y="198634" z="-3294" heading="24294" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="79964" y="196512" z="-2792" heading="43018" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="80252" y="196518" z="-2825" heading="43018" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="96105" y="170829" z="-3649" heading="23924" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="95865" y="171295" z="-3650" heading="55434" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="77741" y="183154" z="-3551" heading="5208" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="77820" y="183556" z="-3590" heading="50785" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="96123" y="210164" z="-3446" heading="43018" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="95897" y="210062" z="-3461" heading="43018" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="81514" y="226267" z="-3595" heading="30084" /> <!-- Guard Patrol -->
|
||||
<npc id="34569" x="81101" y="226399" z="-3593" heading="63371" /> <!-- Guard Patrol -->
|
||||
</group>
|
||||
</spawnlist>
|
||||
</instance>
|
12
L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/TranscendentZone/34568.html
vendored
Normal file
12
L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/instances/TranscendentZone/34568.html
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<html><body>Patrol Teleporter:<br>
|
||||
The sudden attack of the Fafurion army has had my head spinning. The first group can be found in the Field of Silence to the noth trying to subjugate
|
||||
the Krofin. The second one, composed of elite warriors, is setting up camp in the Field of Whispers to the south.<br>
|
||||
Our scouts think that the soldiers in the Fields of Whispers are more dangerous, so be extra careful.<br>
|
||||
Where would you like to teleport?<br>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport OTHER 0">Eastern Border</Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport OTHER 1">Western Border</Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport OTHER 2">East of the Field of Silence (Lv.108)</Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport OTHER 3">Western part of the Field of Silence (Lv.108)</Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport OTHER 4">Eastern part of the Field of Whispers (Lv.114)</Button>
|
||||
<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_teleport OTHER 5">Western part of the Field of Whispers (Lv.114)</Button>
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Patrol Guard:<br>
|
||||
Fafurion's Soldiers have occupied the fields. We found out rhat they have divided into two units.<br>
|
||||
The soldiers to the north in the Field of Silence are there to capture Krofins, and the elite soldiers are to the south in the Field of Whispers.
|
||||
</body></html>
|
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* 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 instances.TranscendentZone;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class TranscendentZone extends AbstractInstance
|
||||
{
|
||||
// NPCs
|
||||
private static final int PATROL_TELEPORTER = 34568;
|
||||
private static final int PATROL_GUARD = 34569;
|
||||
// Misc
|
||||
private static final int TEMPLATE = 1013; // Corroded Fields
|
||||
|
||||
public TranscendentZone()
|
||||
{
|
||||
super(TEMPLATE);
|
||||
addStartNpc(PATROL_TELEPORTER, PATROL_GUARD);
|
||||
addTalkId(PATROL_TELEPORTER, PATROL_GUARD);
|
||||
addFirstTalkId(PATROL_TELEPORTER, PATROL_GUARD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (event.startsWith("ENTER"))
|
||||
{
|
||||
final int zoneId = Integer.parseInt(event.split(" ")[1]);
|
||||
final TimedHuntingZoneHolder huntingZone = TimedHuntingZoneData.getInstance().getHuntingZone(zoneId);
|
||||
if (huntingZone == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (huntingZone.isSoloInstance())
|
||||
{
|
||||
enterInstance(player, npc, huntingZone.getInstanceId());
|
||||
}
|
||||
else
|
||||
{
|
||||
Instance world = null;
|
||||
for (Instance instance : InstanceManager.getInstance().getInstances())
|
||||
{
|
||||
if (instance.getTemplateId() == huntingZone.getInstanceId())
|
||||
{
|
||||
world = instance;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (world == null)
|
||||
{
|
||||
world = InstanceManager.getInstance().createInstance(huntingZone.getInstanceId(), player);
|
||||
}
|
||||
|
||||
player.teleToLocation(huntingZone.getEnterLocation(), world);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new TranscendentZone();
|
||||
}
|
||||
}
|
13
L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/teleporters/others/PatrolTeleporter.xml
vendored
Normal file
13
L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/teleporters/others/PatrolTeleporter.xml
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/teleporterData.xsd">
|
||||
<npc id="34568"> <!-- Patrol Teleporter -->
|
||||
<teleport type="OTHER">
|
||||
<location x="90327" y="198818" z="-3280" /> <!-- Eastern Border -->
|
||||
<location x="80089" y="196453" z="-2792" /> <!-- Western Border -->
|
||||
<location x="96046" y="171015" z="-3640" /> <!-- East of the Field of Silence (Lv.108) -->
|
||||
<location x="77767" y="183441" z="-3576" /> <!-- Western part of the Field of Silence (Lv.108) -->
|
||||
<location x="95981" y="210144" z="-3456" /> <!-- Eastern part of the Field of Whispers (Lv.114) -->
|
||||
<location x="81394" y="226502" z="-3584" /> <!-- Western part of the Field of Whispers (Lv.114) -->
|
||||
</teleport>
|
||||
</npc>
|
||||
</list>
|
@ -1011,4 +1011,22 @@
|
||||
<node X="124826" Y="-41249" />
|
||||
<node X="124920" Y="-41220" />
|
||||
</zone>
|
||||
<zone name="corroded_fields_1" type="PeaceZone" shape="Cylinder" rad="300" minZ="-2000" maxZ="-4000"> <!-- Corroded Fields -->
|
||||
<node X="90239" Y="198748" />
|
||||
</zone>
|
||||
<zone name="corroded_fields_2" type="PeaceZone" shape="Cylinder" rad="300" minZ="-2000" maxZ="-4000"> <!-- Corroded Fields -->
|
||||
<node X="80142" Y="196412" />
|
||||
</zone>
|
||||
<zone name="corroded_fields_3" type="PeaceZone" shape="Cylinder" rad="300" minZ="-2000" maxZ="-4000"> <!-- Corroded Fields -->
|
||||
<node X="95936" Y="171045" />
|
||||
</zone>
|
||||
<zone name="corroded_fields_4" type="PeaceZone" shape="Cylinder" rad="300" minZ="-2000" maxZ="-4000"> <!-- Corroded Fields -->
|
||||
<node X="77682" Y="183422" />
|
||||
</zone>
|
||||
<zone name="corroded_fields_5" type="PeaceZone" shape="Cylinder" rad="300" minZ="-2000" maxZ="-4000"> <!-- Corroded Fields -->
|
||||
<node X="95989" Y="210092" />
|
||||
</zone>
|
||||
<zone name="corroded_fields_6" type="PeaceZone" shape="Cylinder" rad="300" minZ="-2000" maxZ="-4000"> <!-- Corroded Fields -->
|
||||
<node X="81399" Y="226477" />
|
||||
</zone>
|
||||
</list>
|
@ -14465,6 +14465,7 @@ public class PlayerInstance extends Playable
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
teleToLocation(MapRegionManager.getInstance().getTeleToLocation(this, TeleportWhereType.TOWN));
|
||||
setInstance(null);
|
||||
}
|
||||
}
|
||||
}, 60000, 60000);
|
||||
|
@ -148,7 +148,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
}
|
||||
else // Transcendent zones.
|
||||
{
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + instanceId, null, player);
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -14336,6 +14336,7 @@ public class PlayerInstance extends Playable
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
teleToLocation(MapRegionManager.getInstance().getTeleToLocation(this, TeleportWhereType.TOWN));
|
||||
setInstance(null);
|
||||
}
|
||||
}
|
||||
}, 60000, 60000);
|
||||
|
@ -148,7 +148,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
}
|
||||
else // Transcendent zones.
|
||||
{
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + instanceId, null, player);
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -20,11 +20,14 @@ import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import org.l2jmobius.gameserver.network.NpcStringId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
|
||||
@ -33,7 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimedHuntingZ
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* Written by Berezkin Nikolay, on 21.04.2021
|
||||
* @author Berezkin Nikolay, Mobius
|
||||
*/
|
||||
public class TranscendentZone extends AbstractInstance
|
||||
{
|
||||
@ -69,7 +72,36 @@ public class TranscendentZone extends AbstractInstance
|
||||
{
|
||||
if (event.startsWith("ENTER"))
|
||||
{
|
||||
enterInstance(player, npc, Integer.parseInt(event.split(" ")[1]));
|
||||
final int zoneId = Integer.parseInt(event.split(" ")[1]);
|
||||
final TimedHuntingZoneHolder huntingZone = TimedHuntingZoneData.getInstance().getHuntingZone(zoneId);
|
||||
if (huntingZone == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (huntingZone.isSoloInstance())
|
||||
{
|
||||
enterInstance(player, npc, huntingZone.getInstanceId());
|
||||
}
|
||||
else
|
||||
{
|
||||
Instance world = null;
|
||||
for (Instance instance : InstanceManager.getInstance().getInstances())
|
||||
{
|
||||
if (instance.getTemplateId() == huntingZone.getInstanceId())
|
||||
{
|
||||
world = instance;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (world == null)
|
||||
{
|
||||
world = InstanceManager.getInstance().createInstance(huntingZone.getInstanceId(), player);
|
||||
}
|
||||
|
||||
player.teleToLocation(huntingZone.getEnterLocation(), world);
|
||||
}
|
||||
}
|
||||
else if (event.startsWith("FINISH"))
|
||||
{
|
||||
|
@ -14597,6 +14597,7 @@ public class PlayerInstance extends Playable
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
teleToLocation(MapRegionManager.getInstance().getTeleToLocation(this, TeleportWhereType.TOWN));
|
||||
setInstance(null);
|
||||
}
|
||||
}
|
||||
}, 60000, 60000);
|
||||
|
@ -148,7 +148,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
}
|
||||
else // Transcendent zones.
|
||||
{
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + instanceId, null, player);
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -20,11 +20,14 @@ import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import org.l2jmobius.gameserver.network.NpcStringId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
|
||||
@ -33,7 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimedHuntingZ
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* Written by Berezkin Nikolay, on 21.04.2021
|
||||
* @author Berezkin Nikolay, Mobius
|
||||
*/
|
||||
public class TranscendentZone extends AbstractInstance
|
||||
{
|
||||
@ -69,7 +72,36 @@ public class TranscendentZone extends AbstractInstance
|
||||
{
|
||||
if (event.startsWith("ENTER"))
|
||||
{
|
||||
enterInstance(player, npc, Integer.parseInt(event.split(" ")[1]));
|
||||
final int zoneId = Integer.parseInt(event.split(" ")[1]);
|
||||
final TimedHuntingZoneHolder huntingZone = TimedHuntingZoneData.getInstance().getHuntingZone(zoneId);
|
||||
if (huntingZone == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (huntingZone.isSoloInstance())
|
||||
{
|
||||
enterInstance(player, npc, huntingZone.getInstanceId());
|
||||
}
|
||||
else
|
||||
{
|
||||
Instance world = null;
|
||||
for (Instance instance : InstanceManager.getInstance().getInstances())
|
||||
{
|
||||
if (instance.getTemplateId() == huntingZone.getInstanceId())
|
||||
{
|
||||
world = instance;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (world == null)
|
||||
{
|
||||
world = InstanceManager.getInstance().createInstance(huntingZone.getInstanceId(), player);
|
||||
}
|
||||
|
||||
player.teleToLocation(huntingZone.getEnterLocation(), world);
|
||||
}
|
||||
}
|
||||
else if (event.startsWith("FINISH"))
|
||||
{
|
||||
|
@ -14675,6 +14675,7 @@ public class PlayerInstance extends Playable
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
teleToLocation(MapRegionManager.getInstance().getTeleToLocation(this, TeleportWhereType.TOWN));
|
||||
setInstance(null);
|
||||
}
|
||||
}
|
||||
}, 60000, 60000);
|
||||
|
@ -148,7 +148,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
}
|
||||
else // Transcendent zones.
|
||||
{
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + instanceId, null, player);
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -20,11 +20,14 @@ import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import org.l2jmobius.gameserver.network.NpcStringId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
|
||||
@ -33,7 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimedHuntingZ
|
||||
import instances.AbstractInstance;
|
||||
|
||||
/**
|
||||
* Written by Berezkin Nikolay, on 21.04.2021
|
||||
* @author Berezkin Nikolay, Mobius
|
||||
*/
|
||||
public class TranscendentZone extends AbstractInstance
|
||||
{
|
||||
@ -69,7 +72,36 @@ public class TranscendentZone extends AbstractInstance
|
||||
{
|
||||
if (event.startsWith("ENTER"))
|
||||
{
|
||||
enterInstance(player, npc, Integer.parseInt(event.split(" ")[1]));
|
||||
final int zoneId = Integer.parseInt(event.split(" ")[1]);
|
||||
final TimedHuntingZoneHolder huntingZone = TimedHuntingZoneData.getInstance().getHuntingZone(zoneId);
|
||||
if (huntingZone == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (huntingZone.isSoloInstance())
|
||||
{
|
||||
enterInstance(player, npc, huntingZone.getInstanceId());
|
||||
}
|
||||
else
|
||||
{
|
||||
Instance world = null;
|
||||
for (Instance instance : InstanceManager.getInstance().getInstances())
|
||||
{
|
||||
if (instance.getTemplateId() == huntingZone.getInstanceId())
|
||||
{
|
||||
world = instance;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (world == null)
|
||||
{
|
||||
world = InstanceManager.getInstance().createInstance(huntingZone.getInstanceId(), player);
|
||||
}
|
||||
|
||||
player.teleToLocation(huntingZone.getEnterLocation(), world);
|
||||
}
|
||||
}
|
||||
else if (event.startsWith("FINISH"))
|
||||
{
|
||||
|
@ -14675,6 +14675,7 @@ public class PlayerInstance extends Playable
|
||||
abortCast();
|
||||
stopMove(null);
|
||||
teleToLocation(MapRegionManager.getInstance().getTeleToLocation(this, TeleportWhereType.TOWN));
|
||||
setInstance(null);
|
||||
}
|
||||
}
|
||||
}, 60000, 60000);
|
||||
|
@ -148,7 +148,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
}
|
||||
else // Transcendent zones.
|
||||
{
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + instanceId, null, player);
|
||||
QuestManager.getInstance().getQuest("TranscendentZone").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user