Always use static modifier when adding values to static lists and maps.
This commit is contained in:
@@ -1,114 +1,114 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.areas.DragonValley;
|
package ai.areas.DragonValley;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import com.l2jmobius.gameserver.enums.ChatType;
|
import com.l2jmobius.gameserver.enums.ChatType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leopard Dragon Hachling AI.
|
* Leopard Dragon Hachling AI.
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class LeopardDragonHachling extends AbstractNpcAI
|
public final class LeopardDragonHachling extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int DRAGON_HACHLING = 23434;
|
private static final int DRAGON_HACHLING = 23434;
|
||||||
private static final int LEOPARD_DRAGON = 23435;
|
private static final int LEOPARD_DRAGON = 23435;
|
||||||
// Locations
|
// Locations
|
||||||
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeopardDragonHachling()
|
private LeopardDragonHachling()
|
||||||
{
|
{
|
||||||
addAttackId(DRAGON_HACHLING);
|
addAttackId(DRAGON_HACHLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
||||||
{
|
{
|
||||||
final int random = getRandom(1, 4);
|
final int random = getRandom(1, 4);
|
||||||
for (int counter = 1; counter < random; counter++)
|
for (int counter = 1; counter < random; counter++)
|
||||||
{
|
{
|
||||||
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
||||||
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
||||||
addAttackDesire(leopard, player);
|
addAttackDesire(leopard, player);
|
||||||
}
|
}
|
||||||
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||||
{
|
{
|
||||||
if (npc.getScriptValue() == 0)
|
if (npc.getScriptValue() == 0)
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
||||||
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
||||||
}
|
}
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nearestLocation(Npc npc)
|
private Location nearestLocation(Npc npc)
|
||||||
{
|
{
|
||||||
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
||||||
for (Location loc : TRANSFORM_LOCATIONS)
|
for (Location loc : TRANSFORM_LOCATIONS)
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
||||||
{
|
{
|
||||||
gotoLoc = loc;
|
gotoLoc = loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gotoLoc;
|
return gotoLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new LeopardDragonHachling();
|
new LeopardDragonHachling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
||||||
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
||||||
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
|
|||||||
private static final int BOMBER = 29070; // Dragon Bomber
|
private static final int BOMBER = 29070; // Dragon Bomber
|
||||||
private static final int HEART = 13001; // Heart of Warding
|
private static final int HEART = 13001; // Heart of Warding
|
||||||
private static final int CUBE = 31859; // Teleportation Cubic
|
private static final int CUBE = 31859; // Teleportation Cubic
|
||||||
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
||||||
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
|
|||||||
private static final int DOOM_WRAITH = 29008;
|
private static final int DOOM_WRAITH = 29008;
|
||||||
private static final int SUSCEPTOR = 29011;
|
private static final int SUSCEPTOR = 29011;
|
||||||
// Spawns
|
// Spawns
|
||||||
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
|
|||||||
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
CLASS_MASTERS.add(31756); // Mr. Cat
|
CLASS_MASTERS.add(31756); // Mr. Cat
|
||||||
CLASS_MASTERS.add(31757); // Queen of Hearts
|
CLASS_MASTERS.add(31757); // Queen of Hearts
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
// NPC
|
// NPC
|
||||||
private static final int MANAGER = 31688;
|
private static final int MANAGER = 31688;
|
||||||
// Misc
|
// Misc
|
||||||
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
||||||
|
|||||||
@@ -1,121 +1,122 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.World;
|
import com.l2jmobius.gameserver.model.World;
|
||||||
import com.l2jmobius.gameserver.model.actor.Creature;
|
import com.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
import com.l2jmobius.gameserver.model.effects.EffectType;
|
import com.l2jmobius.gameserver.model.effects.EffectType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class AirBind extends AbstractEffect
|
public final class AirBind extends AbstractEffect
|
||||||
{
|
{
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
||||||
{
|
static
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
{
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
||||||
}
|
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
||||||
|
}
|
||||||
public AirBind(StatsSet params)
|
|
||||||
{
|
public AirBind(StatsSet params)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isInstant()
|
@Override
|
||||||
{
|
public boolean isInstant()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public EffectType getEffectType()
|
@Override
|
||||||
{
|
public EffectType getEffectType()
|
||||||
return EffectType.KNOCK;
|
{
|
||||||
}
|
return EffectType.KNOCK;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
@Override
|
||||||
{
|
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
||||||
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
{
|
||||||
{
|
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
||||||
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
{
|
||||||
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
||||||
{
|
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
||||||
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
{
|
||||||
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
||||||
{
|
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
||||||
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
{
|
||||||
}
|
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onExit(Creature effector, Creature effected, Skill skill)
|
@Override
|
||||||
{
|
public void onExit(Creature effector, Creature effected, Skill skill)
|
||||||
if (!effected.isPlayer())
|
{
|
||||||
{
|
if (!effected.isPlayer())
|
||||||
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
{
|
||||||
}
|
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
|
|||||||
private final FlyType _type;
|
private final FlyType _type;
|
||||||
|
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
||||||
|
static
|
||||||
{
|
{
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
||||||
|
|||||||
@@ -1,86 +1,87 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.itemhandlers;
|
package handlers.itemhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.ItemGrade;
|
import com.l2jmobius.gameserver.enums.ItemGrade;
|
||||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.model.ItemInfo;
|
import com.l2jmobius.gameserver.model.ItemInfo;
|
||||||
import com.l2jmobius.gameserver.model.actor.Playable;
|
import com.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ChangeAttributeCrystal implements IItemHandler
|
public class ChangeAttributeCrystal implements IItemHandler
|
||||||
{
|
{
|
||||||
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
||||||
{
|
static
|
||||||
ITEM_GRADES.put(33502, ItemGrade.S);
|
{
|
||||||
ITEM_GRADES.put(35749, ItemGrade.R);
|
ITEM_GRADES.put(33502, ItemGrade.S);
|
||||||
}
|
ITEM_GRADES.put(35749, ItemGrade.R);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
@Override
|
||||||
{
|
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
||||||
if (!playable.isPlayer())
|
{
|
||||||
{
|
if (!playable.isPlayer())
|
||||||
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
{
|
||||||
return false;
|
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final PlayerInstance player = playable.getActingPlayer();
|
|
||||||
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
final PlayerInstance player = playable.getActingPlayer();
|
||||||
{
|
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
if (ITEM_GRADES.get(item.getId()) == null)
|
|
||||||
{
|
if (ITEM_GRADES.get(item.getId()) == null)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final List<ItemInfo> itemList = new ArrayList<>();
|
|
||||||
for (ItemInstance i : player.getInventory().getItems())
|
final List<ItemInfo> itemList = new ArrayList<>();
|
||||||
{
|
for (ItemInstance i : player.getInventory().getItems())
|
||||||
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
{
|
||||||
{
|
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
||||||
itemList.add(new ItemInfo(i));
|
{
|
||||||
}
|
itemList.add(new ItemInfo(i));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (itemList.isEmpty())
|
|
||||||
{
|
if (itemList.isEmpty())
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
|
||||||
return true;
|
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
|
|||||||
// Misc
|
// Misc
|
||||||
private static final int MIN_LVL = 45;
|
private static final int MIN_LVL = 45;
|
||||||
// Reward
|
// Reward
|
||||||
private static final Map<String, Integer> EARS = new HashMap<>();
|
private static final Map<String, Integer> EARS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EARS.put("cat", 6843); // Cat Ears
|
EARS.put("cat", 6843); // Cat Ears
|
||||||
EARS.put("raccoon", 7680); // Raccoon ears
|
EARS.put("raccoon", 7680); // Raccoon ears
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
|
|||||||
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
||||||
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
||||||
|
|||||||
@@ -106,7 +106,8 @@ public final class Q00420_LittleWing extends Quest
|
|||||||
private static final int HATCHLING_FOOD = 4038;
|
private static final int HATCHLING_FOOD = 4038;
|
||||||
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
||||||
// Drake Drops
|
// Drake Drops
|
||||||
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
||||||
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
||||||
|
|||||||
@@ -1,194 +1,195 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package quests.Q10790_AMercenaryHelper;
|
package quests.Q10790_AMercenaryHelper;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.holders.ItemHolder;
|
import com.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||||
import com.l2jmobius.gameserver.model.quest.State;
|
import com.l2jmobius.gameserver.model.quest.State;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||||
import com.l2jmobius.gameserver.util.Util;
|
import com.l2jmobius.gameserver.util.Util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Mercenary Helper (10790)
|
* A Mercenary Helper (10790)
|
||||||
* @author Stayway
|
* @author Stayway
|
||||||
*/
|
*/
|
||||||
public class Q10790_AMercenaryHelper extends Quest
|
public class Q10790_AMercenaryHelper extends Quest
|
||||||
{
|
{
|
||||||
// NPC
|
// NPC
|
||||||
private static final int DOKARA = 33847;
|
private static final int DOKARA = 33847;
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final int SPLINTER_STAKATO = 21508;
|
private static final int SPLINTER_STAKATO = 21508;
|
||||||
private static final int SPLINTER_STAKATO_WORKER = 21509;
|
private static final int SPLINTER_STAKATO_WORKER = 21509;
|
||||||
private static final int SPLINTER_STAKATO_SOLDIER = 21510;
|
private static final int SPLINTER_STAKATO_SOLDIER = 21510;
|
||||||
private static final int SPLINTER_STAKATO_DRONE = 21511;
|
private static final int SPLINTER_STAKATO_DRONE = 21511;
|
||||||
private static final int NEEDLE_STAKATO = 21513;
|
private static final int NEEDLE_STAKATO = 21513;
|
||||||
private static final int NEEDLE_STAKATO_WORKER = 21514;
|
private static final int NEEDLE_STAKATO_WORKER = 21514;
|
||||||
private static final int NEEDLE_STAKATO_SOLDIER = 21515;
|
private static final int NEEDLE_STAKATO_SOLDIER = 21515;
|
||||||
private static final int NEEDLE_STAKATO_DRONE = 21516;
|
private static final int NEEDLE_STAKATO_DRONE = 21516;
|
||||||
private static final Map<Integer, Integer> MOBS_REQUIRED = new HashMap<>();
|
private static final Map<Integer, Integer> MOBS_REQUIRED = new HashMap<>();
|
||||||
{
|
static
|
||||||
MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
|
{
|
||||||
}
|
MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
|
||||||
// Item
|
}
|
||||||
private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
|
// Item
|
||||||
private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
|
private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
|
||||||
// Rewards
|
private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
|
||||||
private static final int EXP_REWARD = 942690;
|
// Rewards
|
||||||
private static final int SP_REWARD = 226;
|
private static final int EXP_REWARD = 942690;
|
||||||
// Other
|
private static final int SP_REWARD = 226;
|
||||||
private static final int MIN_LEVEL = 65;
|
// Other
|
||||||
private static final int MAX_LEVEL = 70;
|
private static final int MIN_LEVEL = 65;
|
||||||
|
private static final int MAX_LEVEL = 70;
|
||||||
public Q10790_AMercenaryHelper()
|
|
||||||
{
|
public Q10790_AMercenaryHelper()
|
||||||
super(10790);
|
{
|
||||||
addStartNpc(DOKARA);
|
super(10790);
|
||||||
addTalkId(DOKARA);
|
addStartNpc(DOKARA);
|
||||||
addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
|
addTalkId(DOKARA);
|
||||||
addCondMinLevel(MIN_LEVEL, "no_level.htm");
|
addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
|
||||||
addCondRace(Race.ERTHEIA, "no Ertheia.html");
|
addCondMinLevel(MIN_LEVEL, "no_level.htm");
|
||||||
addCondClassId(ClassId.MARAUDER, "no_class.html");
|
addCondRace(Race.ERTHEIA, "no Ertheia.html");
|
||||||
}
|
addCondClassId(ClassId.MARAUDER, "no_class.html");
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
@Override
|
||||||
{
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
final QuestState qs = getQuestState(player, false);
|
{
|
||||||
if (qs == null)
|
final QuestState qs = getQuestState(player, false);
|
||||||
{
|
if (qs == null)
|
||||||
return null;
|
{
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
String htmltext = null;
|
|
||||||
switch (event)
|
String htmltext = null;
|
||||||
{
|
switch (event)
|
||||||
case "33847-02.htm":
|
{
|
||||||
case "33847-03.htm":
|
case "33847-02.htm":
|
||||||
{
|
case "33847-03.htm":
|
||||||
htmltext = event;
|
{
|
||||||
break;
|
htmltext = event;
|
||||||
}
|
break;
|
||||||
case "33847-04.htm": // start the quest
|
}
|
||||||
{
|
case "33847-04.htm": // start the quest
|
||||||
qs.startQuest();
|
{
|
||||||
qs.set(Integer.toString(SPLINTER_STAKATO), 0);
|
qs.startQuest();
|
||||||
htmltext = event;
|
qs.set(Integer.toString(SPLINTER_STAKATO), 0);
|
||||||
break;
|
htmltext = event;
|
||||||
}
|
break;
|
||||||
case "33847-07.html":
|
}
|
||||||
{
|
case "33847-07.html":
|
||||||
if (qs.isCond(2))
|
{
|
||||||
{
|
if (qs.isCond(2))
|
||||||
giveItems(player, GUILD_COIN);
|
{
|
||||||
giveItems(player, ENCHANT_ARMOR_A);
|
giveItems(player, GUILD_COIN);
|
||||||
addExpAndSp(player, EXP_REWARD, SP_REWARD);
|
giveItems(player, ENCHANT_ARMOR_A);
|
||||||
qs.exitQuest(false, true);
|
addExpAndSp(player, EXP_REWARD, SP_REWARD);
|
||||||
htmltext = event;
|
qs.exitQuest(false, true);
|
||||||
}
|
htmltext = event;
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
return htmltext;
|
}
|
||||||
}
|
return htmltext;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onTalk(Npc npc, PlayerInstance player)
|
@Override
|
||||||
{
|
public String onTalk(Npc npc, PlayerInstance player)
|
||||||
final QuestState qs = getQuestState(player, true);
|
{
|
||||||
String htmltext = null;
|
final QuestState qs = getQuestState(player, true);
|
||||||
switch (qs.getState())
|
String htmltext = null;
|
||||||
{
|
switch (qs.getState())
|
||||||
case State.CREATED:
|
{
|
||||||
{
|
case State.CREATED:
|
||||||
if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
|
{
|
||||||
{
|
if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
|
||||||
htmltext = "no_level.html";
|
{
|
||||||
}
|
htmltext = "no_level.html";
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "33847-01.htm";
|
{
|
||||||
}
|
htmltext = "33847-01.htm";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case State.STARTED:
|
}
|
||||||
{
|
case State.STARTED:
|
||||||
if (qs.isCond(1))
|
{
|
||||||
{
|
if (qs.isCond(1))
|
||||||
htmltext = "33847-05.html"; // Need find proper html
|
{
|
||||||
}
|
htmltext = "33847-05.html"; // Need find proper html
|
||||||
else if (qs.isCond(2))
|
}
|
||||||
{
|
else if (qs.isCond(2))
|
||||||
htmltext = "33847-06.html";
|
{
|
||||||
}
|
htmltext = "33847-06.html";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case State.COMPLETED:
|
}
|
||||||
{
|
case State.COMPLETED:
|
||||||
htmltext = getAlreadyCompletedMsg(player);
|
{
|
||||||
break;
|
htmltext = getAlreadyCompletedMsg(player);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
return htmltext;
|
}
|
||||||
}
|
return htmltext;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
|
@Override
|
||||||
{
|
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
|
||||||
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
|
{
|
||||||
if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
|
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
|
||||||
{
|
if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
|
||||||
int kills = 0;
|
{
|
||||||
switch (npc.getId())
|
int kills = 0;
|
||||||
{
|
switch (npc.getId())
|
||||||
case SPLINTER_STAKATO:
|
{
|
||||||
case SPLINTER_STAKATO_WORKER:
|
case SPLINTER_STAKATO:
|
||||||
case SPLINTER_STAKATO_SOLDIER:
|
case SPLINTER_STAKATO_WORKER:
|
||||||
case SPLINTER_STAKATO_DRONE:
|
case SPLINTER_STAKATO_SOLDIER:
|
||||||
case NEEDLE_STAKATO:
|
case SPLINTER_STAKATO_DRONE:
|
||||||
case NEEDLE_STAKATO_WORKER:
|
case NEEDLE_STAKATO:
|
||||||
case NEEDLE_STAKATO_SOLDIER:
|
case NEEDLE_STAKATO_WORKER:
|
||||||
case NEEDLE_STAKATO_DRONE:
|
case NEEDLE_STAKATO_SOLDIER:
|
||||||
{
|
case NEEDLE_STAKATO_DRONE:
|
||||||
kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
|
{
|
||||||
kills++;
|
kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
|
||||||
qs.set(Integer.toString(SPLINTER_STAKATO), kills);
|
kills++;
|
||||||
break;
|
qs.set(Integer.toString(SPLINTER_STAKATO), kills);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
|
|
||||||
log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
|
||||||
log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
||||||
killer.sendPacket(log);
|
log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
||||||
|
killer.sendPacket(log);
|
||||||
if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
|
|
||||||
{
|
if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
|
||||||
qs.setCond(2);
|
{
|
||||||
}
|
qs.setCond(2);
|
||||||
}
|
}
|
||||||
return super.onKill(npc, killer, isSummon);
|
}
|
||||||
}
|
return super.onKill(npc, killer, isSummon);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,37 +1,38 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.model.skills;
|
package com.l2jmobius.gameserver.model.skills;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class MountEnabledSkillList
|
public class MountEnabledSkillList
|
||||||
{
|
{
|
||||||
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
||||||
{
|
static
|
||||||
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
{
|
||||||
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
||||||
}
|
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
||||||
|
}
|
||||||
public static boolean contains(int skillId)
|
|
||||||
{
|
public static boolean contains(int skillId)
|
||||||
return ENABLED_SKILLS.contains(skillId);
|
{
|
||||||
}
|
return ENABLED_SKILLS.contains(skillId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,69 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
import com.l2jmobius.commons.network.PacketWriter;
|
||||||
import com.l2jmobius.gameserver.enums.AttributeType;
|
import com.l2jmobius.gameserver.enums.AttributeType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
||||||
{
|
{
|
||||||
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
||||||
{
|
static
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
{
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
||||||
}
|
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
||||||
|
}
|
||||||
private final int _crystalItemId;
|
|
||||||
private int _attributes;
|
private final int _crystalItemId;
|
||||||
private int _itemObjId;
|
private int _attributes;
|
||||||
|
private int _itemObjId;
|
||||||
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
|
||||||
{
|
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
||||||
_crystalItemId = crystalItemId;
|
{
|
||||||
_attributes = 0;
|
_crystalItemId = crystalItemId;
|
||||||
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
_attributes = 0;
|
||||||
{
|
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
||||||
if (e != item.getAttackAttributeType())
|
{
|
||||||
{
|
if (e != item.getAttackAttributeType())
|
||||||
_attributes |= ATTRIBUTE_MASKS.get(e);
|
{
|
||||||
}
|
_attributes |= ATTRIBUTE_MASKS.get(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean write(PacketWriter packet)
|
@Override
|
||||||
{
|
public boolean write(PacketWriter packet)
|
||||||
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
{
|
||||||
packet.writeD(_crystalItemId);
|
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
||||||
packet.writeD(_attributes);
|
packet.writeD(_crystalItemId);
|
||||||
packet.writeD(_itemObjId);
|
packet.writeD(_attributes);
|
||||||
return true;
|
packet.writeD(_itemObjId);
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,6 @@ public abstract class Operators
|
|||||||
private static final int INDEX_UNARYPLUS = 7;
|
private static final int INDEX_UNARYPLUS = 7;
|
||||||
|
|
||||||
private static final Operator[] builtinOperators = new Operator[8];
|
private static final Operator[] builtinOperators = new Operator[8];
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.areas.DragonValley;
|
package ai.areas.DragonValley;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import com.l2jmobius.gameserver.enums.ChatType;
|
import com.l2jmobius.gameserver.enums.ChatType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leopard Dragon Hachling AI.
|
* Leopard Dragon Hachling AI.
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class LeopardDragonHachling extends AbstractNpcAI
|
public final class LeopardDragonHachling extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int DRAGON_HACHLING = 23434;
|
private static final int DRAGON_HACHLING = 23434;
|
||||||
private static final int LEOPARD_DRAGON = 23435;
|
private static final int LEOPARD_DRAGON = 23435;
|
||||||
// Locations
|
// Locations
|
||||||
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeopardDragonHachling()
|
private LeopardDragonHachling()
|
||||||
{
|
{
|
||||||
addAttackId(DRAGON_HACHLING);
|
addAttackId(DRAGON_HACHLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
||||||
{
|
{
|
||||||
final int random = getRandom(1, 4);
|
final int random = getRandom(1, 4);
|
||||||
for (int counter = 1; counter < random; counter++)
|
for (int counter = 1; counter < random; counter++)
|
||||||
{
|
{
|
||||||
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
||||||
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
||||||
addAttackDesire(leopard, player);
|
addAttackDesire(leopard, player);
|
||||||
}
|
}
|
||||||
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||||
{
|
{
|
||||||
if (npc.getScriptValue() == 0)
|
if (npc.getScriptValue() == 0)
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
||||||
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
||||||
}
|
}
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nearestLocation(Npc npc)
|
private Location nearestLocation(Npc npc)
|
||||||
{
|
{
|
||||||
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
||||||
for (Location loc : TRANSFORM_LOCATIONS)
|
for (Location loc : TRANSFORM_LOCATIONS)
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
||||||
{
|
{
|
||||||
gotoLoc = loc;
|
gotoLoc = loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gotoLoc;
|
return gotoLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new LeopardDragonHachling();
|
new LeopardDragonHachling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
||||||
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
||||||
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
|
|||||||
private static final int BOMBER = 29070; // Dragon Bomber
|
private static final int BOMBER = 29070; // Dragon Bomber
|
||||||
private static final int HEART = 13001; // Heart of Warding
|
private static final int HEART = 13001; // Heart of Warding
|
||||||
private static final int CUBE = 31859; // Teleportation Cubic
|
private static final int CUBE = 31859; // Teleportation Cubic
|
||||||
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
||||||
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
|
|||||||
private static final int DOOM_WRAITH = 29008;
|
private static final int DOOM_WRAITH = 29008;
|
||||||
private static final int SUSCEPTOR = 29011;
|
private static final int SUSCEPTOR = 29011;
|
||||||
// Spawns
|
// Spawns
|
||||||
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
|
|||||||
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
CLASS_MASTERS.add(31756); // Mr. Cat
|
CLASS_MASTERS.add(31756); // Mr. Cat
|
||||||
CLASS_MASTERS.add(31757); // Queen of Hearts
|
CLASS_MASTERS.add(31757); // Queen of Hearts
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
// NPC
|
// NPC
|
||||||
private static final int MANAGER = 31688;
|
private static final int MANAGER = 31688;
|
||||||
// Misc
|
// Misc
|
||||||
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
||||||
|
|||||||
@@ -1,121 +1,122 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.World;
|
import com.l2jmobius.gameserver.model.World;
|
||||||
import com.l2jmobius.gameserver.model.actor.Creature;
|
import com.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
import com.l2jmobius.gameserver.model.effects.EffectType;
|
import com.l2jmobius.gameserver.model.effects.EffectType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class AirBind extends AbstractEffect
|
public final class AirBind extends AbstractEffect
|
||||||
{
|
{
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
||||||
{
|
static
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
{
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
||||||
}
|
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
||||||
|
}
|
||||||
public AirBind(StatsSet params)
|
|
||||||
{
|
public AirBind(StatsSet params)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isInstant()
|
@Override
|
||||||
{
|
public boolean isInstant()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public EffectType getEffectType()
|
@Override
|
||||||
{
|
public EffectType getEffectType()
|
||||||
return EffectType.KNOCK;
|
{
|
||||||
}
|
return EffectType.KNOCK;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
@Override
|
||||||
{
|
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
||||||
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
{
|
||||||
{
|
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
||||||
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
{
|
||||||
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
||||||
{
|
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
||||||
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
{
|
||||||
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
||||||
{
|
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
||||||
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
{
|
||||||
}
|
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onExit(Creature effector, Creature effected, Skill skill)
|
@Override
|
||||||
{
|
public void onExit(Creature effector, Creature effected, Skill skill)
|
||||||
if (!effected.isPlayer())
|
{
|
||||||
{
|
if (!effected.isPlayer())
|
||||||
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
{
|
||||||
}
|
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
|
|||||||
private final FlyType _type;
|
private final FlyType _type;
|
||||||
|
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
||||||
|
static
|
||||||
{
|
{
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
||||||
|
|||||||
@@ -1,87 +1,88 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.itemhandlers;
|
package handlers.itemhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.ItemGrade;
|
import com.l2jmobius.gameserver.enums.ItemGrade;
|
||||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.model.ItemInfo;
|
import com.l2jmobius.gameserver.model.ItemInfo;
|
||||||
import com.l2jmobius.gameserver.model.actor.Playable;
|
import com.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ChangeAttributeCrystal implements IItemHandler
|
public class ChangeAttributeCrystal implements IItemHandler
|
||||||
{
|
{
|
||||||
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
||||||
{
|
static
|
||||||
ITEM_GRADES.put(33502, ItemGrade.S);
|
{
|
||||||
ITEM_GRADES.put(35749, ItemGrade.R);
|
ITEM_GRADES.put(33502, ItemGrade.S);
|
||||||
ITEM_GRADES.put(45817, ItemGrade.R);
|
ITEM_GRADES.put(35749, ItemGrade.R);
|
||||||
}
|
ITEM_GRADES.put(45817, ItemGrade.R);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
@Override
|
||||||
{
|
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
||||||
if (!playable.isPlayer())
|
{
|
||||||
{
|
if (!playable.isPlayer())
|
||||||
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
{
|
||||||
return false;
|
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final PlayerInstance player = playable.getActingPlayer();
|
|
||||||
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
final PlayerInstance player = playable.getActingPlayer();
|
||||||
{
|
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
if (ITEM_GRADES.get(item.getId()) == null)
|
|
||||||
{
|
if (ITEM_GRADES.get(item.getId()) == null)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final List<ItemInfo> itemList = new ArrayList<>();
|
|
||||||
for (ItemInstance i : player.getInventory().getItems())
|
final List<ItemInfo> itemList = new ArrayList<>();
|
||||||
{
|
for (ItemInstance i : player.getInventory().getItems())
|
||||||
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
{
|
||||||
{
|
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
||||||
itemList.add(new ItemInfo(i));
|
{
|
||||||
}
|
itemList.add(new ItemInfo(i));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (itemList.isEmpty())
|
|
||||||
{
|
if (itemList.isEmpty())
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
|
||||||
return true;
|
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
|
|||||||
// Misc
|
// Misc
|
||||||
private static final int MIN_LVL = 45;
|
private static final int MIN_LVL = 45;
|
||||||
// Reward
|
// Reward
|
||||||
private static final Map<String, Integer> EARS = new HashMap<>();
|
private static final Map<String, Integer> EARS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EARS.put("cat", 6843); // Cat Ears
|
EARS.put("cat", 6843); // Cat Ears
|
||||||
EARS.put("raccoon", 7680); // Raccoon ears
|
EARS.put("raccoon", 7680); // Raccoon ears
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
|
|||||||
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
||||||
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ public final class Q00420_LittleWing extends Quest
|
|||||||
private static final int HATCHLING_FOOD = 4038;
|
private static final int HATCHLING_FOOD = 4038;
|
||||||
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
||||||
// Drake Drops
|
// Drake Drops
|
||||||
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
||||||
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
||||||
|
|||||||
@@ -1,194 +1,195 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package quests.Q10790_AMercenaryHelper;
|
package quests.Q10790_AMercenaryHelper;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.holders.ItemHolder;
|
import com.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||||
import com.l2jmobius.gameserver.model.quest.State;
|
import com.l2jmobius.gameserver.model.quest.State;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||||
import com.l2jmobius.gameserver.util.Util;
|
import com.l2jmobius.gameserver.util.Util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Mercenary Helper (10790)
|
* A Mercenary Helper (10790)
|
||||||
* @author Stayway
|
* @author Stayway
|
||||||
*/
|
*/
|
||||||
public class Q10790_AMercenaryHelper extends Quest
|
public class Q10790_AMercenaryHelper extends Quest
|
||||||
{
|
{
|
||||||
// NPC
|
// NPC
|
||||||
private static final int DOKARA = 33847;
|
private static final int DOKARA = 33847;
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final int SPLINTER_STAKATO = 21508;
|
private static final int SPLINTER_STAKATO = 21508;
|
||||||
private static final int SPLINTER_STAKATO_WORKER = 21509;
|
private static final int SPLINTER_STAKATO_WORKER = 21509;
|
||||||
private static final int SPLINTER_STAKATO_SOLDIER = 21510;
|
private static final int SPLINTER_STAKATO_SOLDIER = 21510;
|
||||||
private static final int SPLINTER_STAKATO_DRONE = 21511;
|
private static final int SPLINTER_STAKATO_DRONE = 21511;
|
||||||
private static final int NEEDLE_STAKATO = 21513;
|
private static final int NEEDLE_STAKATO = 21513;
|
||||||
private static final int NEEDLE_STAKATO_WORKER = 21514;
|
private static final int NEEDLE_STAKATO_WORKER = 21514;
|
||||||
private static final int NEEDLE_STAKATO_SOLDIER = 21515;
|
private static final int NEEDLE_STAKATO_SOLDIER = 21515;
|
||||||
private static final int NEEDLE_STAKATO_DRONE = 21516;
|
private static final int NEEDLE_STAKATO_DRONE = 21516;
|
||||||
private static final Map<Integer, Integer> MOBS_REQUIRED = new HashMap<>();
|
private static final Map<Integer, Integer> MOBS_REQUIRED = new HashMap<>();
|
||||||
{
|
static
|
||||||
MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
|
{
|
||||||
}
|
MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
|
||||||
// Item
|
}
|
||||||
private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
|
// Item
|
||||||
private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
|
private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
|
||||||
// Rewards
|
private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
|
||||||
private static final int EXP_REWARD = 942690;
|
// Rewards
|
||||||
private static final int SP_REWARD = 226;
|
private static final int EXP_REWARD = 942690;
|
||||||
// Other
|
private static final int SP_REWARD = 226;
|
||||||
private static final int MIN_LEVEL = 65;
|
// Other
|
||||||
private static final int MAX_LEVEL = 70;
|
private static final int MIN_LEVEL = 65;
|
||||||
|
private static final int MAX_LEVEL = 70;
|
||||||
public Q10790_AMercenaryHelper()
|
|
||||||
{
|
public Q10790_AMercenaryHelper()
|
||||||
super(10790);
|
{
|
||||||
addStartNpc(DOKARA);
|
super(10790);
|
||||||
addTalkId(DOKARA);
|
addStartNpc(DOKARA);
|
||||||
addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
|
addTalkId(DOKARA);
|
||||||
addCondMinLevel(MIN_LEVEL, "no_level.htm");
|
addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
|
||||||
addCondRace(Race.ERTHEIA, "no Ertheia.html");
|
addCondMinLevel(MIN_LEVEL, "no_level.htm");
|
||||||
addCondClassId(ClassId.MARAUDER, "no_class.html");
|
addCondRace(Race.ERTHEIA, "no Ertheia.html");
|
||||||
}
|
addCondClassId(ClassId.MARAUDER, "no_class.html");
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
@Override
|
||||||
{
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
final QuestState qs = getQuestState(player, false);
|
{
|
||||||
if (qs == null)
|
final QuestState qs = getQuestState(player, false);
|
||||||
{
|
if (qs == null)
|
||||||
return null;
|
{
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
String htmltext = null;
|
|
||||||
switch (event)
|
String htmltext = null;
|
||||||
{
|
switch (event)
|
||||||
case "33847-02.htm":
|
{
|
||||||
case "33847-03.htm":
|
case "33847-02.htm":
|
||||||
{
|
case "33847-03.htm":
|
||||||
htmltext = event;
|
{
|
||||||
break;
|
htmltext = event;
|
||||||
}
|
break;
|
||||||
case "33847-04.htm": // start the quest
|
}
|
||||||
{
|
case "33847-04.htm": // start the quest
|
||||||
qs.startQuest();
|
{
|
||||||
qs.set(Integer.toString(SPLINTER_STAKATO), 0);
|
qs.startQuest();
|
||||||
htmltext = event;
|
qs.set(Integer.toString(SPLINTER_STAKATO), 0);
|
||||||
break;
|
htmltext = event;
|
||||||
}
|
break;
|
||||||
case "33847-07.html":
|
}
|
||||||
{
|
case "33847-07.html":
|
||||||
if (qs.isCond(2))
|
{
|
||||||
{
|
if (qs.isCond(2))
|
||||||
giveItems(player, GUILD_COIN);
|
{
|
||||||
giveItems(player, ENCHANT_ARMOR_A);
|
giveItems(player, GUILD_COIN);
|
||||||
addExpAndSp(player, EXP_REWARD, SP_REWARD);
|
giveItems(player, ENCHANT_ARMOR_A);
|
||||||
qs.exitQuest(false, true);
|
addExpAndSp(player, EXP_REWARD, SP_REWARD);
|
||||||
htmltext = event;
|
qs.exitQuest(false, true);
|
||||||
}
|
htmltext = event;
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
return htmltext;
|
}
|
||||||
}
|
return htmltext;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onTalk(Npc npc, PlayerInstance player)
|
@Override
|
||||||
{
|
public String onTalk(Npc npc, PlayerInstance player)
|
||||||
final QuestState qs = getQuestState(player, true);
|
{
|
||||||
String htmltext = null;
|
final QuestState qs = getQuestState(player, true);
|
||||||
switch (qs.getState())
|
String htmltext = null;
|
||||||
{
|
switch (qs.getState())
|
||||||
case State.CREATED:
|
{
|
||||||
{
|
case State.CREATED:
|
||||||
if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
|
{
|
||||||
{
|
if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
|
||||||
htmltext = "no_level.html";
|
{
|
||||||
}
|
htmltext = "no_level.html";
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "33847-01.htm";
|
{
|
||||||
}
|
htmltext = "33847-01.htm";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case State.STARTED:
|
}
|
||||||
{
|
case State.STARTED:
|
||||||
if (qs.isCond(1))
|
{
|
||||||
{
|
if (qs.isCond(1))
|
||||||
htmltext = "33847-05.html"; // Need find proper html
|
{
|
||||||
}
|
htmltext = "33847-05.html"; // Need find proper html
|
||||||
else if (qs.isCond(2))
|
}
|
||||||
{
|
else if (qs.isCond(2))
|
||||||
htmltext = "33847-06.html";
|
{
|
||||||
}
|
htmltext = "33847-06.html";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case State.COMPLETED:
|
}
|
||||||
{
|
case State.COMPLETED:
|
||||||
htmltext = getAlreadyCompletedMsg(player);
|
{
|
||||||
break;
|
htmltext = getAlreadyCompletedMsg(player);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
return htmltext;
|
}
|
||||||
}
|
return htmltext;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
|
@Override
|
||||||
{
|
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
|
||||||
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
|
{
|
||||||
if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
|
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
|
||||||
{
|
if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
|
||||||
int kills = 0;
|
{
|
||||||
switch (npc.getId())
|
int kills = 0;
|
||||||
{
|
switch (npc.getId())
|
||||||
case SPLINTER_STAKATO:
|
{
|
||||||
case SPLINTER_STAKATO_WORKER:
|
case SPLINTER_STAKATO:
|
||||||
case SPLINTER_STAKATO_SOLDIER:
|
case SPLINTER_STAKATO_WORKER:
|
||||||
case SPLINTER_STAKATO_DRONE:
|
case SPLINTER_STAKATO_SOLDIER:
|
||||||
case NEEDLE_STAKATO:
|
case SPLINTER_STAKATO_DRONE:
|
||||||
case NEEDLE_STAKATO_WORKER:
|
case NEEDLE_STAKATO:
|
||||||
case NEEDLE_STAKATO_SOLDIER:
|
case NEEDLE_STAKATO_WORKER:
|
||||||
case NEEDLE_STAKATO_DRONE:
|
case NEEDLE_STAKATO_SOLDIER:
|
||||||
{
|
case NEEDLE_STAKATO_DRONE:
|
||||||
kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
|
{
|
||||||
kills++;
|
kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
|
||||||
qs.set(Integer.toString(SPLINTER_STAKATO), kills);
|
kills++;
|
||||||
break;
|
qs.set(Integer.toString(SPLINTER_STAKATO), kills);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
|
|
||||||
log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
|
||||||
log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
||||||
killer.sendPacket(log);
|
log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
|
||||||
|
killer.sendPacket(log);
|
||||||
if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
|
|
||||||
{
|
if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
|
||||||
qs.setCond(2);
|
{
|
||||||
}
|
qs.setCond(2);
|
||||||
}
|
}
|
||||||
return super.onKill(npc, killer, isSummon);
|
}
|
||||||
}
|
return super.onKill(npc, killer, isSummon);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,37 +1,38 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.model.skills;
|
package com.l2jmobius.gameserver.model.skills;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class MountEnabledSkillList
|
public class MountEnabledSkillList
|
||||||
{
|
{
|
||||||
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
||||||
{
|
static
|
||||||
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
{
|
||||||
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
||||||
}
|
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
||||||
|
}
|
||||||
public static boolean contains(int skillId)
|
|
||||||
{
|
public static boolean contains(int skillId)
|
||||||
return ENABLED_SKILLS.contains(skillId);
|
{
|
||||||
}
|
return ENABLED_SKILLS.contains(skillId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,69 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
import com.l2jmobius.commons.network.PacketWriter;
|
||||||
import com.l2jmobius.gameserver.enums.AttributeType;
|
import com.l2jmobius.gameserver.enums.AttributeType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
||||||
{
|
{
|
||||||
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
||||||
{
|
static
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
{
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
||||||
}
|
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
||||||
|
}
|
||||||
private final int _crystalItemId;
|
|
||||||
private int _attributes;
|
private final int _crystalItemId;
|
||||||
private int _itemObjId;
|
private int _attributes;
|
||||||
|
private int _itemObjId;
|
||||||
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
|
||||||
{
|
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
||||||
_crystalItemId = crystalItemId;
|
{
|
||||||
_attributes = 0;
|
_crystalItemId = crystalItemId;
|
||||||
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
_attributes = 0;
|
||||||
{
|
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
||||||
if (e != item.getAttackAttributeType())
|
{
|
||||||
{
|
if (e != item.getAttackAttributeType())
|
||||||
_attributes |= ATTRIBUTE_MASKS.get(e);
|
{
|
||||||
}
|
_attributes |= ATTRIBUTE_MASKS.get(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean write(PacketWriter packet)
|
@Override
|
||||||
{
|
public boolean write(PacketWriter packet)
|
||||||
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
{
|
||||||
packet.writeD(_crystalItemId);
|
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
||||||
packet.writeD(_attributes);
|
packet.writeD(_crystalItemId);
|
||||||
packet.writeD(_itemObjId);
|
packet.writeD(_attributes);
|
||||||
return true;
|
packet.writeD(_itemObjId);
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,6 @@ public abstract class Operators
|
|||||||
private static final int INDEX_UNARYPLUS = 7;
|
private static final int INDEX_UNARYPLUS = 7;
|
||||||
|
|
||||||
private static final Operator[] builtinOperators = new Operator[8];
|
private static final Operator[] builtinOperators = new Operator[8];
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.areas.DragonValley;
|
package ai.areas.DragonValley;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import com.l2jmobius.gameserver.enums.ChatType;
|
import com.l2jmobius.gameserver.enums.ChatType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leopard Dragon Hachling AI.
|
* Leopard Dragon Hachling AI.
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class LeopardDragonHachling extends AbstractNpcAI
|
public final class LeopardDragonHachling extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int DRAGON_HACHLING = 23434;
|
private static final int DRAGON_HACHLING = 23434;
|
||||||
private static final int LEOPARD_DRAGON = 23435;
|
private static final int LEOPARD_DRAGON = 23435;
|
||||||
// Locations
|
// Locations
|
||||||
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeopardDragonHachling()
|
private LeopardDragonHachling()
|
||||||
{
|
{
|
||||||
addAttackId(DRAGON_HACHLING);
|
addAttackId(DRAGON_HACHLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
||||||
{
|
{
|
||||||
final int random = getRandom(1, 4);
|
final int random = getRandom(1, 4);
|
||||||
for (int counter = 1; counter < random; counter++)
|
for (int counter = 1; counter < random; counter++)
|
||||||
{
|
{
|
||||||
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
||||||
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
||||||
addAttackDesire(leopard, player);
|
addAttackDesire(leopard, player);
|
||||||
}
|
}
|
||||||
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||||
{
|
{
|
||||||
if (npc.getScriptValue() == 0)
|
if (npc.getScriptValue() == 0)
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
||||||
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
||||||
}
|
}
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nearestLocation(Npc npc)
|
private Location nearestLocation(Npc npc)
|
||||||
{
|
{
|
||||||
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
||||||
for (Location loc : TRANSFORM_LOCATIONS)
|
for (Location loc : TRANSFORM_LOCATIONS)
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
||||||
{
|
{
|
||||||
gotoLoc = loc;
|
gotoLoc = loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gotoLoc;
|
return gotoLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new LeopardDragonHachling();
|
new LeopardDragonHachling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
||||||
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
||||||
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
|
|||||||
private static final int BOMBER = 29070; // Dragon Bomber
|
private static final int BOMBER = 29070; // Dragon Bomber
|
||||||
private static final int HEART = 13001; // Heart of Warding
|
private static final int HEART = 13001; // Heart of Warding
|
||||||
private static final int CUBE = 31859; // Teleportation Cubic
|
private static final int CUBE = 31859; // Teleportation Cubic
|
||||||
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
||||||
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
|
|||||||
private static final int DOOM_WRAITH = 29008;
|
private static final int DOOM_WRAITH = 29008;
|
||||||
private static final int SUSCEPTOR = 29011;
|
private static final int SUSCEPTOR = 29011;
|
||||||
// Spawns
|
// Spawns
|
||||||
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
||||||
|
|||||||
@@ -1,491 +1,495 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.others.AdventureGuildsman;
|
package ai.others.AdventureGuildsman;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.commons.util.CommonUtil;
|
import com.l2jmobius.commons.util.CommonUtil;
|
||||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.model.skills.SkillCaster;
|
import com.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExShowQuestInfo;
|
import com.l2jmobius.gameserver.network.serverpackets.ExShowQuestInfo;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adventure Guildsman AI.
|
* Adventure Guildsman AI.
|
||||||
* @author ChaosPaladin
|
* @author ChaosPaladin
|
||||||
*/
|
*/
|
||||||
public class AdventureGuildsman extends AbstractNpcAI
|
public class AdventureGuildsman extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPC
|
// NPC
|
||||||
private static final int ADVENTURE_GUILDSMAN = 33946;
|
private static final int ADVENTURE_GUILDSMAN = 33946;
|
||||||
// Items
|
// Items
|
||||||
private static final int PCCAFE_LOTTERY_TICKET_30DAYS = 15358;
|
private static final int PCCAFE_LOTTERY_TICKET_30DAYS = 15358;
|
||||||
private static final int PCCAFE_1ST_LOTTERY_TICKET_30DAYS = 15359;
|
private static final int PCCAFE_1ST_LOTTERY_TICKET_30DAYS = 15359;
|
||||||
private static final int PCCAFE_2ND_LOTTERY_TICKET_30DAYS = 15360;
|
private static final int PCCAFE_2ND_LOTTERY_TICKET_30DAYS = 15360;
|
||||||
private static final int PCCAFE_3RD_LOTTERY_TICKET_30DAYS = 15361;
|
private static final int PCCAFE_3RD_LOTTERY_TICKET_30DAYS = 15361;
|
||||||
private static final int PCCAFE_4TH_LOTTERY_TICKET_30DAYS = 15362;
|
private static final int PCCAFE_4TH_LOTTERY_TICKET_30DAYS = 15362;
|
||||||
private static final int PCCAFE_5TH_LOTTERY_TICKET_30DAYS = 15363;
|
private static final int PCCAFE_5TH_LOTTERY_TICKET_30DAYS = 15363;
|
||||||
private static final int VOUCHER_LEV_85 = 17739;
|
private static final int VOUCHER_LEV_85 = 17739;
|
||||||
private static final int VOUCHER_LEV_90 = 17740;
|
private static final int VOUCHER_LEV_90 = 17740;
|
||||||
private static final int VOUCHER_LEV_95 = 17741;
|
private static final int VOUCHER_LEV_95 = 17741;
|
||||||
private static final int VOUCHER_LEV_97 = 17742;
|
private static final int VOUCHER_LEV_97 = 17742;
|
||||||
private static final int SEAL_LEV_85 = 17743;
|
private static final int SEAL_LEV_85 = 17743;
|
||||||
private static final int SEAL_LEV_90 = 17744;
|
private static final int SEAL_LEV_90 = 17744;
|
||||||
private static final int SEAL_LEV_95 = 17745;
|
private static final int SEAL_LEV_95 = 17745;
|
||||||
private static final int SEAL_LEV_97 = 17746;
|
private static final int SEAL_LEV_97 = 17746;
|
||||||
// Skills
|
// Skills
|
||||||
private static final SkillHolder KNIGHT = new SkillHolder(17294, 1); // Player Commendation - Knight's Harmony
|
private static final SkillHolder KNIGHT = new SkillHolder(17294, 1); // Player Commendation - Knight's Harmony
|
||||||
private static final SkillHolder WARRIOR = new SkillHolder(17295, 1); // Player Commendation - Warrior's Harmony
|
private static final SkillHolder WARRIOR = new SkillHolder(17295, 1); // Player Commendation - Warrior's Harmony
|
||||||
private static final SkillHolder WIZARD = new SkillHolder(17296, 1); // Player Commendation - Wizard's Harmony
|
private static final SkillHolder WIZARD = new SkillHolder(17296, 1); // Player Commendation - Wizard's Harmony
|
||||||
private static final SkillHolder[] GROUP_MELODY =
|
private static final SkillHolder[] GROUP_MELODY =
|
||||||
{
|
{
|
||||||
new SkillHolder(9273, 1), // Player Commendation - Horn Melody
|
new SkillHolder(9273, 1), // Player Commendation - Horn Melody
|
||||||
new SkillHolder(9274, 1), // Player Commendation - Drum Melody
|
new SkillHolder(9274, 1), // Player Commendation - Drum Melody
|
||||||
new SkillHolder(9275, 1), // Player Commendation - Lute Melody
|
new SkillHolder(9275, 1), // Player Commendation - Lute Melody
|
||||||
new SkillHolder(9276, 1), // Player Commendation - Pipe Organ Melody
|
new SkillHolder(9276, 1), // Player Commendation - Pipe Organ Melody
|
||||||
new SkillHolder(9277, 1), // Player Commendation - Guitar Melody
|
new SkillHolder(9277, 1), // Player Commendation - Guitar Melody
|
||||||
new SkillHolder(9278, 1), // Player Commendation - Harp Melody
|
new SkillHolder(9278, 1), // Player Commendation - Harp Melody
|
||||||
};
|
};
|
||||||
private static final SkillHolder[] GROUP_SONATA =
|
private static final SkillHolder[] GROUP_SONATA =
|
||||||
{
|
{
|
||||||
new SkillHolder(17291, 1), // Player Commendation - Prevailing Sonata
|
new SkillHolder(17291, 1), // Player Commendation - Prevailing Sonata
|
||||||
new SkillHolder(17292, 1), // Player Commendation - Daring Sonata
|
new SkillHolder(17292, 1), // Player Commendation - Daring Sonata
|
||||||
new SkillHolder(17293, 1), // Player Commendation - Refreshing Sonata
|
new SkillHolder(17293, 1), // Player Commendation - Refreshing Sonata
|
||||||
};
|
};
|
||||||
// Misc
|
// Misc
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
||||||
{
|
static
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
{
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 737);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 738);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 737);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 739);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 738);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 740);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 739);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 741);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 740);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 742);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 741);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 742);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
||||||
}
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
||||||
|
}
|
||||||
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
||||||
{
|
static
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
{
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 745);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 746);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 745);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 747);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 746);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 748);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 747);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 749);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 748);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 750);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 749);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 750);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
||||||
}
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
||||||
|
}
|
||||||
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
||||||
{
|
static
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
{
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 753);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 754);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 753);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 755);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 754);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 756);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 755);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 757);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 756);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 758);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 757);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 758);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
||||||
}
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
||||||
|
}
|
||||||
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
||||||
{
|
static
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
{
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 761);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 762);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 761);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 763);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 762);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 764);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 763);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 765);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 764);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 766);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 765);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 760);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 766);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 765);
|
R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 760);
|
||||||
}
|
R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 765);
|
||||||
//@formatter:on
|
}
|
||||||
private static final String USED_PC_LOTTERY_TICKET = "USED_PC_LOTTERY_TICKET";
|
//@formatter:on
|
||||||
|
private static final String USED_PC_LOTTERY_TICKET = "USED_PC_LOTTERY_TICKET";
|
||||||
private AdventureGuildsman()
|
|
||||||
{
|
private AdventureGuildsman()
|
||||||
addStartNpc(ADVENTURE_GUILDSMAN);
|
{
|
||||||
addTalkId(ADVENTURE_GUILDSMAN);
|
addStartNpc(ADVENTURE_GUILDSMAN);
|
||||||
addFirstTalkId(ADVENTURE_GUILDSMAN);
|
addTalkId(ADVENTURE_GUILDSMAN);
|
||||||
}
|
addFirstTalkId(ADVENTURE_GUILDSMAN);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
@Override
|
||||||
{
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
String htmltext = null;
|
{
|
||||||
|
String htmltext = null;
|
||||||
switch (event)
|
|
||||||
{
|
switch (event)
|
||||||
case "pccafe_list":
|
{
|
||||||
{
|
case "pccafe_list":
|
||||||
htmltext = "pccafe_list001.htm";
|
{
|
||||||
break;
|
htmltext = "pccafe_list001.htm";
|
||||||
}
|
break;
|
||||||
case "quest_list":
|
}
|
||||||
{
|
case "quest_list":
|
||||||
player.sendPacket(ExShowQuestInfo.STATIC_PACKET);
|
{
|
||||||
break;
|
player.sendPacket(ExShowQuestInfo.STATIC_PACKET);
|
||||||
}
|
break;
|
||||||
case "buff_list":
|
}
|
||||||
{
|
case "buff_list":
|
||||||
htmltext = "pccafe_buff_1001.htm";
|
{
|
||||||
break;
|
htmltext = "pccafe_buff_1001.htm";
|
||||||
}
|
break;
|
||||||
case "item_list":
|
}
|
||||||
{
|
case "item_list":
|
||||||
htmltext = "pccafe_item001.htm";
|
{
|
||||||
break;
|
htmltext = "pccafe_item001.htm";
|
||||||
}
|
break;
|
||||||
case "pccafe_help_inzone001.htm":
|
}
|
||||||
case "pccafe_help_lottery001.htm":
|
case "pccafe_help_inzone001.htm":
|
||||||
case "pccafe_help_lottery002.htm":
|
case "pccafe_help_lottery001.htm":
|
||||||
case "adventurer_agent_town_voucher_change.htm":
|
case "pccafe_help_lottery002.htm":
|
||||||
case "life_crystal_merge001.htm":
|
case "adventurer_agent_town_voucher_change.htm":
|
||||||
case "life_crystal_merge002.htm":
|
case "life_crystal_merge001.htm":
|
||||||
case "voucher_trader1001.htm":
|
case "life_crystal_merge002.htm":
|
||||||
case "voucher_trader2001.htm":
|
case "voucher_trader1001.htm":
|
||||||
case "voucher_trader3001.htm":
|
case "voucher_trader2001.htm":
|
||||||
case "voucher_trader4001.htm":
|
case "voucher_trader3001.htm":
|
||||||
case "voucher_trader1004.htm":
|
case "voucher_trader4001.htm":
|
||||||
case "voucher_trader2004.htm":
|
case "voucher_trader1004.htm":
|
||||||
case "voucher_trader3004.htm":
|
case "voucher_trader2004.htm":
|
||||||
case "voucher_trader4004.htm":
|
case "voucher_trader3004.htm":
|
||||||
case "voucher_trader1005.htm":
|
case "voucher_trader4004.htm":
|
||||||
case "voucher_trader2005.htm":
|
case "voucher_trader1005.htm":
|
||||||
case "voucher_trader3005.htm":
|
case "voucher_trader2005.htm":
|
||||||
case "voucher_trader4005.htm":
|
case "voucher_trader3005.htm":
|
||||||
case "voucher_trader1006.htm":
|
case "voucher_trader4005.htm":
|
||||||
case "voucher_trader2006.htm":
|
case "voucher_trader1006.htm":
|
||||||
case "voucher_trader3006.htm":
|
case "voucher_trader2006.htm":
|
||||||
case "voucher_trader4006.htm":
|
case "voucher_trader3006.htm":
|
||||||
{
|
case "voucher_trader4006.htm":
|
||||||
htmltext = event;
|
{
|
||||||
break;
|
htmltext = event;
|
||||||
}
|
break;
|
||||||
case "index":
|
}
|
||||||
{
|
case "index":
|
||||||
htmltext = player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
|
{
|
||||||
break;
|
htmltext = player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
|
||||||
}
|
break;
|
||||||
case "buff_setlist":
|
}
|
||||||
{
|
case "buff_setlist":
|
||||||
htmltext = "pccafe_newbuff_001.htm";
|
{
|
||||||
break;
|
htmltext = "pccafe_newbuff_001.htm";
|
||||||
}
|
break;
|
||||||
case "buff_group":
|
}
|
||||||
{
|
case "buff_group":
|
||||||
htmltext = player.getPcCafePoints() >= 120 ? applyBuffsGroup(npc, player, GROUP_MELODY.length) : "pccafe_buff_1001.htm";
|
{
|
||||||
break;
|
htmltext = player.getPcCafePoints() >= 120 ? applyBuffsGroup(npc, player, GROUP_MELODY.length) : "pccafe_buff_1001.htm";
|
||||||
}
|
break;
|
||||||
case "knight":
|
}
|
||||||
{
|
case "knight":
|
||||||
htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, KNIGHT.getSkill()) : "pccafe_buff_1001.htm";
|
{
|
||||||
break;
|
htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, KNIGHT.getSkill()) : "pccafe_buff_1001.htm";
|
||||||
}
|
break;
|
||||||
case "warrior":
|
}
|
||||||
{
|
case "warrior":
|
||||||
htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WARRIOR.getSkill()) : "pccafe_buff_1001.htm";
|
{
|
||||||
break;
|
htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WARRIOR.getSkill()) : "pccafe_buff_1001.htm";
|
||||||
}
|
break;
|
||||||
case "wizard":
|
}
|
||||||
{
|
case "wizard":
|
||||||
htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WIZARD.getSkill()) : "pccafe_buff_1001.htm";
|
{
|
||||||
break;
|
htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WIZARD.getSkill()) : "pccafe_buff_1001.htm";
|
||||||
}
|
break;
|
||||||
case "give_lottery_ticket":
|
}
|
||||||
{
|
case "give_lottery_ticket":
|
||||||
if (!player.getVariables().getBoolean(USED_PC_LOTTERY_TICKET, false))
|
{
|
||||||
{
|
if (!player.getVariables().getBoolean(USED_PC_LOTTERY_TICKET, false))
|
||||||
player.getVariables().set(USED_PC_LOTTERY_TICKET, true);
|
{
|
||||||
giveItems(player, PCCAFE_LOTTERY_TICKET_30DAYS, 1);
|
player.getVariables().set(USED_PC_LOTTERY_TICKET, true);
|
||||||
}
|
giveItems(player, PCCAFE_LOTTERY_TICKET_30DAYS, 1);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "pccafe_help_lottery_notoneday.htm";
|
{
|
||||||
}
|
htmltext = "pccafe_help_lottery_notoneday.htm";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case "trade_10":
|
}
|
||||||
{
|
case "trade_10":
|
||||||
htmltext = tradeItem(player, PCCAFE_5TH_LOTTERY_TICKET_30DAYS, 10);
|
{
|
||||||
break;
|
htmltext = tradeItem(player, PCCAFE_5TH_LOTTERY_TICKET_30DAYS, 10);
|
||||||
}
|
break;
|
||||||
case "trade_100":
|
}
|
||||||
{
|
case "trade_100":
|
||||||
htmltext = tradeItem(player, PCCAFE_4TH_LOTTERY_TICKET_30DAYS, 100);
|
{
|
||||||
break;
|
htmltext = tradeItem(player, PCCAFE_4TH_LOTTERY_TICKET_30DAYS, 100);
|
||||||
}
|
break;
|
||||||
case "trade_200":
|
}
|
||||||
{
|
case "trade_200":
|
||||||
htmltext = tradeItem(player, PCCAFE_3RD_LOTTERY_TICKET_30DAYS, 200);
|
{
|
||||||
break;
|
htmltext = tradeItem(player, PCCAFE_3RD_LOTTERY_TICKET_30DAYS, 200);
|
||||||
}
|
break;
|
||||||
case "trade_1000":
|
}
|
||||||
{
|
case "trade_1000":
|
||||||
htmltext = tradeItem(player, PCCAFE_2ND_LOTTERY_TICKET_30DAYS, 1000);
|
{
|
||||||
break;
|
htmltext = tradeItem(player, PCCAFE_2ND_LOTTERY_TICKET_30DAYS, 1000);
|
||||||
}
|
break;
|
||||||
case "trade_10000":
|
}
|
||||||
{
|
case "trade_10000":
|
||||||
htmltext = tradeItem(player, PCCAFE_1ST_LOTTERY_TICKET_30DAYS, 10000);
|
{
|
||||||
break;
|
htmltext = tradeItem(player, PCCAFE_1ST_LOTTERY_TICKET_30DAYS, 10000);
|
||||||
}
|
break;
|
||||||
case "trade_seal85":
|
}
|
||||||
{
|
case "trade_seal85":
|
||||||
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
{
|
||||||
{
|
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
||||||
if (hasQuestItems(player, VOUCHER_LEV_85))
|
{
|
||||||
{
|
if (hasQuestItems(player, VOUCHER_LEV_85))
|
||||||
takeItems(player, VOUCHER_LEV_85, 1);
|
{
|
||||||
giveItems(player, SEAL_LEV_85, 20);
|
takeItems(player, VOUCHER_LEV_85, 1);
|
||||||
addExpAndSp(player, 60000000, 0);
|
giveItems(player, SEAL_LEV_85, 20);
|
||||||
}
|
addExpAndSp(player, 60000000, 0);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader1003b.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader1003b.htm";
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader1007.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader1007.htm";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case "trade_seal90":
|
}
|
||||||
{
|
case "trade_seal90":
|
||||||
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
{
|
||||||
{
|
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
||||||
if (hasQuestItems(player, VOUCHER_LEV_90))
|
{
|
||||||
{
|
if (hasQuestItems(player, VOUCHER_LEV_90))
|
||||||
takeItems(player, VOUCHER_LEV_90, 1);
|
{
|
||||||
giveItems(player, SEAL_LEV_90, 20);
|
takeItems(player, VOUCHER_LEV_90, 1);
|
||||||
addExpAndSp(player, 66000000, 0);
|
giveItems(player, SEAL_LEV_90, 20);
|
||||||
}
|
addExpAndSp(player, 66000000, 0);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader2003b.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader2003b.htm";
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader1007.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader1007.htm";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case "trade_seal95":
|
}
|
||||||
{
|
case "trade_seal95":
|
||||||
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
{
|
||||||
{
|
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
||||||
if (hasQuestItems(player, VOUCHER_LEV_95))
|
{
|
||||||
{
|
if (hasQuestItems(player, VOUCHER_LEV_95))
|
||||||
takeItems(player, VOUCHER_LEV_95, 1);
|
{
|
||||||
giveItems(player, SEAL_LEV_95, 20);
|
takeItems(player, VOUCHER_LEV_95, 1);
|
||||||
addExpAndSp(player, 68000000, 0);
|
giveItems(player, SEAL_LEV_95, 20);
|
||||||
}
|
addExpAndSp(player, 68000000, 0);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader3003b.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader3003b.htm";
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader1007.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader1007.htm";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case "trade_seal97":
|
}
|
||||||
{
|
case "trade_seal97":
|
||||||
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
{
|
||||||
{
|
if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
|
||||||
if (hasQuestItems(player, VOUCHER_LEV_97))
|
{
|
||||||
{
|
if (hasQuestItems(player, VOUCHER_LEV_97))
|
||||||
takeItems(player, VOUCHER_LEV_97, 1);
|
{
|
||||||
giveItems(player, SEAL_LEV_97, 20);
|
takeItems(player, VOUCHER_LEV_97, 1);
|
||||||
addExpAndSp(player, 76000000, 0);
|
giveItems(player, SEAL_LEV_97, 20);
|
||||||
}
|
addExpAndSp(player, 76000000, 0);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader3003b.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader3003b.htm";
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "voucher_trader1007.htm";
|
{
|
||||||
}
|
htmltext = "voucher_trader1007.htm";
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case "give_talismanR_by_class":
|
}
|
||||||
{
|
case "give_talismanR_by_class":
|
||||||
int multisellId = -1;
|
{
|
||||||
|
int multisellId = -1;
|
||||||
for (CategoryType type : R_CLASS_TALISMAN.keySet())
|
|
||||||
{
|
for (CategoryType type : R_CLASS_TALISMAN.keySet())
|
||||||
if (player.isInCategory(type))
|
{
|
||||||
{
|
if (player.isInCategory(type))
|
||||||
multisellId = R_CLASS_TALISMAN.get(type);
|
{
|
||||||
break;
|
multisellId = R_CLASS_TALISMAN.get(type);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (multisellId > 0)
|
|
||||||
{
|
if (multisellId > 0)
|
||||||
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
{
|
||||||
}
|
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case "give_talismanR90_by_class":
|
}
|
||||||
{
|
case "give_talismanR90_by_class":
|
||||||
int multisellId = -1;
|
{
|
||||||
|
int multisellId = -1;
|
||||||
for (CategoryType type : R90_CLASS_TALISMAN.keySet())
|
|
||||||
{
|
for (CategoryType type : R90_CLASS_TALISMAN.keySet())
|
||||||
if (player.isInCategory(type))
|
{
|
||||||
{
|
if (player.isInCategory(type))
|
||||||
multisellId = R90_CLASS_TALISMAN.get(type);
|
{
|
||||||
break;
|
multisellId = R90_CLASS_TALISMAN.get(type);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (multisellId > 0)
|
|
||||||
{
|
if (multisellId > 0)
|
||||||
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
{
|
||||||
}
|
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
case "give_talismanR95_by_class":
|
}
|
||||||
{
|
case "give_talismanR95_by_class":
|
||||||
int multisellId = -1;
|
{
|
||||||
for (CategoryType type : R95_CLASS_TALISMAN.keySet())
|
int multisellId = -1;
|
||||||
{
|
for (CategoryType type : R95_CLASS_TALISMAN.keySet())
|
||||||
if (player.isInCategory(type))
|
{
|
||||||
{
|
if (player.isInCategory(type))
|
||||||
multisellId = R95_CLASS_TALISMAN.get(type);
|
{
|
||||||
break;
|
multisellId = R95_CLASS_TALISMAN.get(type);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (multisellId > 0)
|
|
||||||
{
|
if (multisellId > 0)
|
||||||
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
{
|
||||||
}
|
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
case "give_talismanR99_by_class":
|
|
||||||
{
|
case "give_talismanR99_by_class":
|
||||||
int multisellId = -1;
|
{
|
||||||
|
int multisellId = -1;
|
||||||
for (CategoryType type : R99_CLASS_TALISMAN.keySet())
|
|
||||||
{
|
for (CategoryType type : R99_CLASS_TALISMAN.keySet())
|
||||||
if (player.isInCategory(type))
|
{
|
||||||
{
|
if (player.isInCategory(type))
|
||||||
multisellId = R99_CLASS_TALISMAN.get(type);
|
{
|
||||||
break;
|
multisellId = R99_CLASS_TALISMAN.get(type);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (multisellId > 0)
|
|
||||||
{
|
if (multisellId > 0)
|
||||||
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
{
|
||||||
}
|
MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
if (event.startsWith("melody"))
|
}
|
||||||
{
|
if (event.startsWith("melody"))
|
||||||
final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, GROUP_MELODY.length);
|
{
|
||||||
if (player.getPcCafePoints() >= 20)
|
final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, GROUP_MELODY.length);
|
||||||
{
|
if (player.getPcCafePoints() >= 20)
|
||||||
npc.setTarget(player);
|
{
|
||||||
npc.doCast(GROUP_MELODY[buffOffset].getSkill());
|
npc.setTarget(player);
|
||||||
player.setPcCafePoints(player.getPcCafePoints() - 20);
|
npc.doCast(GROUP_MELODY[buffOffset].getSkill());
|
||||||
htmltext = "pccafe_buff_1001.htm";
|
player.setPcCafePoints(player.getPcCafePoints() - 20);
|
||||||
}
|
htmltext = "pccafe_buff_1001.htm";
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
htmltext = "pccafe_notpoint001.htm";
|
{
|
||||||
}
|
htmltext = "pccafe_notpoint001.htm";
|
||||||
|
}
|
||||||
}
|
|
||||||
return htmltext;
|
}
|
||||||
}
|
return htmltext;
|
||||||
|
}
|
||||||
private String applyBuffs(Npc npc, PlayerInstance player, Skill skill)
|
|
||||||
{
|
private String applyBuffs(Npc npc, PlayerInstance player, Skill skill)
|
||||||
for (SkillHolder holder : GROUP_MELODY)
|
{
|
||||||
{
|
for (SkillHolder holder : GROUP_MELODY)
|
||||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
{
|
||||||
}
|
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||||
for (SkillHolder holder : GROUP_SONATA)
|
}
|
||||||
{
|
for (SkillHolder holder : GROUP_SONATA)
|
||||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
{
|
||||||
}
|
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||||
SkillCaster.triggerCast(npc, player, skill);
|
}
|
||||||
player.setPcCafePoints(player.getPcCafePoints() - 200);
|
SkillCaster.triggerCast(npc, player, skill);
|
||||||
return null;
|
player.setPcCafePoints(player.getPcCafePoints() - 200);
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
private String applyBuffsGroup(Npc npc, PlayerInstance player, int length)
|
|
||||||
{
|
private String applyBuffsGroup(Npc npc, PlayerInstance player, int length)
|
||||||
for (SkillHolder holder : GROUP_MELODY)
|
{
|
||||||
{
|
for (SkillHolder holder : GROUP_MELODY)
|
||||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
{
|
||||||
}
|
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||||
player.setPcCafePoints(player.getPcCafePoints() - 120);
|
}
|
||||||
return null;
|
player.setPcCafePoints(player.getPcCafePoints() - 120);
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
private String tradeItem(PlayerInstance player, int itemId, int points)
|
|
||||||
{
|
private String tradeItem(PlayerInstance player, int itemId, int points)
|
||||||
if (player.getPcCafePoints() >= 200000)
|
{
|
||||||
{
|
if (player.getPcCafePoints() >= 200000)
|
||||||
return "pccafe_help_lottery_fail2.htm";
|
{
|
||||||
}
|
return "pccafe_help_lottery_fail2.htm";
|
||||||
|
}
|
||||||
if (takeItems(player, itemId, 1))
|
|
||||||
{
|
if (takeItems(player, itemId, 1))
|
||||||
player.setPcCafePoints(player.getPcCafePoints() + points);
|
{
|
||||||
return "pccafe_help_lottery003.htm";
|
player.setPcCafePoints(player.getPcCafePoints() + points);
|
||||||
}
|
return "pccafe_help_lottery003.htm";
|
||||||
return "pccafe_help_lottery_fail.htm";
|
}
|
||||||
}
|
return "pccafe_help_lottery_fail.htm";
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
@Override
|
||||||
{
|
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||||
return player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
|
{
|
||||||
}
|
return player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
|
||||||
|
}
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
public static void main(String[] args)
|
||||||
new AdventureGuildsman();
|
{
|
||||||
}
|
new AdventureGuildsman();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
|
|||||||
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
CLASS_MASTERS.add(31756); // Mr. Cat
|
CLASS_MASTERS.add(31756); // Mr. Cat
|
||||||
CLASS_MASTERS.add(31757); // Queen of Hearts
|
CLASS_MASTERS.add(31757); // Queen of Hearts
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
// NPC
|
// NPC
|
||||||
private static final int MANAGER = 31688;
|
private static final int MANAGER = 31688;
|
||||||
// Misc
|
// Misc
|
||||||
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
||||||
|
|||||||
@@ -1,121 +1,122 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.World;
|
import com.l2jmobius.gameserver.model.World;
|
||||||
import com.l2jmobius.gameserver.model.actor.Creature;
|
import com.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
import com.l2jmobius.gameserver.model.effects.EffectType;
|
import com.l2jmobius.gameserver.model.effects.EffectType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class AirBind extends AbstractEffect
|
public final class AirBind extends AbstractEffect
|
||||||
{
|
{
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
||||||
{
|
static
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
{
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
||||||
}
|
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
||||||
|
}
|
||||||
public AirBind(StatsSet params)
|
|
||||||
{
|
public AirBind(StatsSet params)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isInstant()
|
@Override
|
||||||
{
|
public boolean isInstant()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public EffectType getEffectType()
|
@Override
|
||||||
{
|
public EffectType getEffectType()
|
||||||
return EffectType.KNOCK;
|
{
|
||||||
}
|
return EffectType.KNOCK;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
@Override
|
||||||
{
|
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
||||||
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
{
|
||||||
{
|
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
||||||
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
{
|
||||||
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
||||||
{
|
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
||||||
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
{
|
||||||
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
||||||
{
|
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
||||||
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
{
|
||||||
}
|
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onExit(Creature effector, Creature effected, Skill skill)
|
@Override
|
||||||
{
|
public void onExit(Creature effector, Creature effected, Skill skill)
|
||||||
if (!effected.isPlayer())
|
{
|
||||||
{
|
if (!effected.isPlayer())
|
||||||
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
{
|
||||||
}
|
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
|
|||||||
private final FlyType _type;
|
private final FlyType _type;
|
||||||
|
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
||||||
|
static
|
||||||
{
|
{
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
||||||
|
|||||||
@@ -1,87 +1,88 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.itemhandlers;
|
package handlers.itemhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.ItemGrade;
|
import com.l2jmobius.gameserver.enums.ItemGrade;
|
||||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.model.ItemInfo;
|
import com.l2jmobius.gameserver.model.ItemInfo;
|
||||||
import com.l2jmobius.gameserver.model.actor.Playable;
|
import com.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ChangeAttributeCrystal implements IItemHandler
|
public class ChangeAttributeCrystal implements IItemHandler
|
||||||
{
|
{
|
||||||
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
||||||
{
|
static
|
||||||
ITEM_GRADES.put(33502, ItemGrade.S);
|
{
|
||||||
ITEM_GRADES.put(35749, ItemGrade.R);
|
ITEM_GRADES.put(33502, ItemGrade.S);
|
||||||
ITEM_GRADES.put(45817, ItemGrade.R);
|
ITEM_GRADES.put(35749, ItemGrade.R);
|
||||||
}
|
ITEM_GRADES.put(45817, ItemGrade.R);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
@Override
|
||||||
{
|
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
||||||
if (!playable.isPlayer())
|
{
|
||||||
{
|
if (!playable.isPlayer())
|
||||||
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
{
|
||||||
return false;
|
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final PlayerInstance player = playable.getActingPlayer();
|
|
||||||
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
final PlayerInstance player = playable.getActingPlayer();
|
||||||
{
|
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
if (ITEM_GRADES.get(item.getId()) == null)
|
|
||||||
{
|
if (ITEM_GRADES.get(item.getId()) == null)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final List<ItemInfo> itemList = new ArrayList<>();
|
|
||||||
for (ItemInstance i : player.getInventory().getItems())
|
final List<ItemInfo> itemList = new ArrayList<>();
|
||||||
{
|
for (ItemInstance i : player.getInventory().getItems())
|
||||||
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
{
|
||||||
{
|
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
||||||
itemList.add(new ItemInfo(i));
|
{
|
||||||
}
|
itemList.add(new ItemInfo(i));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (itemList.isEmpty())
|
|
||||||
{
|
if (itemList.isEmpty())
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
|
||||||
return true;
|
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
|
|||||||
// Misc
|
// Misc
|
||||||
private static final int MIN_LVL = 45;
|
private static final int MIN_LVL = 45;
|
||||||
// Reward
|
// Reward
|
||||||
private static final Map<String, Integer> EARS = new HashMap<>();
|
private static final Map<String, Integer> EARS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EARS.put("cat", 6843); // Cat Ears
|
EARS.put("cat", 6843); // Cat Ears
|
||||||
EARS.put("raccoon", 7680); // Raccoon ears
|
EARS.put("raccoon", 7680); // Raccoon ears
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
|
|||||||
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
||||||
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ public final class Q00420_LittleWing extends Quest
|
|||||||
private static final int HATCHLING_FOOD = 4038;
|
private static final int HATCHLING_FOOD = 4038;
|
||||||
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
||||||
// Drake Drops
|
// Drake Drops
|
||||||
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
||||||
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
||||||
|
|||||||
@@ -1,37 +1,38 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.model.skills;
|
package com.l2jmobius.gameserver.model.skills;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class MountEnabledSkillList
|
public class MountEnabledSkillList
|
||||||
{
|
{
|
||||||
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
||||||
{
|
static
|
||||||
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
{
|
||||||
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
||||||
}
|
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
||||||
|
}
|
||||||
public static boolean contains(int skillId)
|
|
||||||
{
|
public static boolean contains(int skillId)
|
||||||
return ENABLED_SKILLS.contains(skillId);
|
{
|
||||||
}
|
return ENABLED_SKILLS.contains(skillId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,69 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
import com.l2jmobius.commons.network.PacketWriter;
|
||||||
import com.l2jmobius.gameserver.enums.AttributeType;
|
import com.l2jmobius.gameserver.enums.AttributeType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
||||||
{
|
{
|
||||||
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
||||||
{
|
static
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
{
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
||||||
}
|
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
||||||
|
}
|
||||||
private final int _crystalItemId;
|
|
||||||
private int _attributes;
|
private final int _crystalItemId;
|
||||||
private int _itemObjId;
|
private int _attributes;
|
||||||
|
private int _itemObjId;
|
||||||
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
|
||||||
{
|
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
||||||
_crystalItemId = crystalItemId;
|
{
|
||||||
_attributes = 0;
|
_crystalItemId = crystalItemId;
|
||||||
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
_attributes = 0;
|
||||||
{
|
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
||||||
if (e != item.getAttackAttributeType())
|
{
|
||||||
{
|
if (e != item.getAttackAttributeType())
|
||||||
_attributes |= ATTRIBUTE_MASKS.get(e);
|
{
|
||||||
}
|
_attributes |= ATTRIBUTE_MASKS.get(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean write(PacketWriter packet)
|
@Override
|
||||||
{
|
public boolean write(PacketWriter packet)
|
||||||
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
{
|
||||||
packet.writeD(_crystalItemId);
|
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
||||||
packet.writeD(_attributes);
|
packet.writeD(_crystalItemId);
|
||||||
packet.writeD(_itemObjId);
|
packet.writeD(_attributes);
|
||||||
return true;
|
packet.writeD(_itemObjId);
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,6 @@ public abstract class Operators
|
|||||||
private static final int INDEX_UNARYPLUS = 7;
|
private static final int INDEX_UNARYPLUS = 7;
|
||||||
|
|
||||||
private static final Operator[] builtinOperators = new Operator[8];
|
private static final Operator[] builtinOperators = new Operator[8];
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.areas.DragonValley;
|
package ai.areas.DragonValley;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import com.l2jmobius.gameserver.enums.ChatType;
|
import com.l2jmobius.gameserver.enums.ChatType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leopard Dragon Hachling AI.
|
* Leopard Dragon Hachling AI.
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class LeopardDragonHachling extends AbstractNpcAI
|
public final class LeopardDragonHachling extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int DRAGON_HACHLING = 23434;
|
private static final int DRAGON_HACHLING = 23434;
|
||||||
private static final int LEOPARD_DRAGON = 23435;
|
private static final int LEOPARD_DRAGON = 23435;
|
||||||
// Locations
|
// Locations
|
||||||
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeopardDragonHachling()
|
private LeopardDragonHachling()
|
||||||
{
|
{
|
||||||
addAttackId(DRAGON_HACHLING);
|
addAttackId(DRAGON_HACHLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
||||||
{
|
{
|
||||||
final int random = getRandom(1, 4);
|
final int random = getRandom(1, 4);
|
||||||
for (int counter = 1; counter < random; counter++)
|
for (int counter = 1; counter < random; counter++)
|
||||||
{
|
{
|
||||||
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
||||||
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
||||||
addAttackDesire(leopard, player);
|
addAttackDesire(leopard, player);
|
||||||
}
|
}
|
||||||
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||||
{
|
{
|
||||||
if (npc.getScriptValue() == 0)
|
if (npc.getScriptValue() == 0)
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
||||||
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
||||||
}
|
}
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nearestLocation(Npc npc)
|
private Location nearestLocation(Npc npc)
|
||||||
{
|
{
|
||||||
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
||||||
for (Location loc : TRANSFORM_LOCATIONS)
|
for (Location loc : TRANSFORM_LOCATIONS)
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
||||||
{
|
{
|
||||||
gotoLoc = loc;
|
gotoLoc = loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gotoLoc;
|
return gotoLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new LeopardDragonHachling();
|
new LeopardDragonHachling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
||||||
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
||||||
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
|
|||||||
private static final int BOMBER = 29070; // Dragon Bomber
|
private static final int BOMBER = 29070; // Dragon Bomber
|
||||||
private static final int HEART = 13001; // Heart of Warding
|
private static final int HEART = 13001; // Heart of Warding
|
||||||
private static final int CUBE = 31859; // Teleportation Cubic
|
private static final int CUBE = 31859; // Teleportation Cubic
|
||||||
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
||||||
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
|
|||||||
private static final int DOOM_WRAITH = 29008;
|
private static final int DOOM_WRAITH = 29008;
|
||||||
private static final int SUSCEPTOR = 29011;
|
private static final int SUSCEPTOR = 29011;
|
||||||
// Spawns
|
// Spawns
|
||||||
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
};
|
};
|
||||||
// Misc
|
// Misc
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
||||||
@@ -88,7 +89,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
||||||
@@ -101,7 +103,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
||||||
@@ -114,7 +117,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
|
|||||||
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
CLASS_MASTERS.add(31756); // Mr. Cat
|
CLASS_MASTERS.add(31756); // Mr. Cat
|
||||||
CLASS_MASTERS.add(31757); // Queen of Hearts
|
CLASS_MASTERS.add(31757); // Queen of Hearts
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
// NPC
|
// NPC
|
||||||
private static final int MANAGER = 31688;
|
private static final int MANAGER = 31688;
|
||||||
// Misc
|
// Misc
|
||||||
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
||||||
|
|||||||
@@ -1,121 +1,122 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.World;
|
import com.l2jmobius.gameserver.model.World;
|
||||||
import com.l2jmobius.gameserver.model.actor.Creature;
|
import com.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
import com.l2jmobius.gameserver.model.effects.EffectType;
|
import com.l2jmobius.gameserver.model.effects.EffectType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class AirBind extends AbstractEffect
|
public final class AirBind extends AbstractEffect
|
||||||
{
|
{
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
||||||
{
|
static
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
{
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
||||||
}
|
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
||||||
|
}
|
||||||
public AirBind(StatsSet params)
|
|
||||||
{
|
public AirBind(StatsSet params)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isInstant()
|
@Override
|
||||||
{
|
public boolean isInstant()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public EffectType getEffectType()
|
@Override
|
||||||
{
|
public EffectType getEffectType()
|
||||||
return EffectType.KNOCK;
|
{
|
||||||
}
|
return EffectType.KNOCK;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
@Override
|
||||||
{
|
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
||||||
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
{
|
||||||
{
|
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
||||||
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
{
|
||||||
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
||||||
{
|
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
||||||
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
{
|
||||||
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
||||||
{
|
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
||||||
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
{
|
||||||
}
|
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onExit(Creature effector, Creature effected, Skill skill)
|
@Override
|
||||||
{
|
public void onExit(Creature effector, Creature effected, Skill skill)
|
||||||
if (!effected.isPlayer())
|
{
|
||||||
{
|
if (!effected.isPlayer())
|
||||||
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
{
|
||||||
}
|
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
|
|||||||
private final FlyType _type;
|
private final FlyType _type;
|
||||||
|
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
||||||
|
static
|
||||||
{
|
{
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
||||||
|
|||||||
@@ -1,87 +1,88 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.itemhandlers;
|
package handlers.itemhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.ItemGrade;
|
import com.l2jmobius.gameserver.enums.ItemGrade;
|
||||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.model.ItemInfo;
|
import com.l2jmobius.gameserver.model.ItemInfo;
|
||||||
import com.l2jmobius.gameserver.model.actor.Playable;
|
import com.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ChangeAttributeCrystal implements IItemHandler
|
public class ChangeAttributeCrystal implements IItemHandler
|
||||||
{
|
{
|
||||||
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
||||||
{
|
static
|
||||||
ITEM_GRADES.put(33502, ItemGrade.S);
|
{
|
||||||
ITEM_GRADES.put(35749, ItemGrade.R);
|
ITEM_GRADES.put(33502, ItemGrade.S);
|
||||||
ITEM_GRADES.put(45817, ItemGrade.R);
|
ITEM_GRADES.put(35749, ItemGrade.R);
|
||||||
}
|
ITEM_GRADES.put(45817, ItemGrade.R);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
@Override
|
||||||
{
|
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
||||||
if (!playable.isPlayer())
|
{
|
||||||
{
|
if (!playable.isPlayer())
|
||||||
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
{
|
||||||
return false;
|
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final PlayerInstance player = playable.getActingPlayer();
|
|
||||||
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
final PlayerInstance player = playable.getActingPlayer();
|
||||||
{
|
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
if (ITEM_GRADES.get(item.getId()) == null)
|
|
||||||
{
|
if (ITEM_GRADES.get(item.getId()) == null)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final List<ItemInfo> itemList = new ArrayList<>();
|
|
||||||
for (ItemInstance i : player.getInventory().getItems())
|
final List<ItemInfo> itemList = new ArrayList<>();
|
||||||
{
|
for (ItemInstance i : player.getInventory().getItems())
|
||||||
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
{
|
||||||
{
|
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
||||||
itemList.add(new ItemInfo(i));
|
{
|
||||||
}
|
itemList.add(new ItemInfo(i));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (itemList.isEmpty())
|
|
||||||
{
|
if (itemList.isEmpty())
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
|
||||||
return true;
|
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
|
|||||||
// Misc
|
// Misc
|
||||||
private static final int MIN_LVL = 45;
|
private static final int MIN_LVL = 45;
|
||||||
// Reward
|
// Reward
|
||||||
private static final Map<String, Integer> EARS = new HashMap<>();
|
private static final Map<String, Integer> EARS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EARS.put("cat", 6843); // Cat Ears
|
EARS.put("cat", 6843); // Cat Ears
|
||||||
EARS.put("raccoon", 7680); // Raccoon ears
|
EARS.put("raccoon", 7680); // Raccoon ears
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
|
|||||||
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
||||||
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ public final class Q00420_LittleWing extends Quest
|
|||||||
private static final int HATCHLING_FOOD = 4038;
|
private static final int HATCHLING_FOOD = 4038;
|
||||||
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
||||||
// Drake Drops
|
// Drake Drops
|
||||||
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
||||||
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
||||||
|
|||||||
@@ -1,37 +1,38 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.model.skills;
|
package com.l2jmobius.gameserver.model.skills;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class MountEnabledSkillList
|
public class MountEnabledSkillList
|
||||||
{
|
{
|
||||||
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
||||||
{
|
static
|
||||||
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
{
|
||||||
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
||||||
}
|
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
||||||
|
}
|
||||||
public static boolean contains(int skillId)
|
|
||||||
{
|
public static boolean contains(int skillId)
|
||||||
return ENABLED_SKILLS.contains(skillId);
|
{
|
||||||
}
|
return ENABLED_SKILLS.contains(skillId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,69 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
import com.l2jmobius.commons.network.PacketWriter;
|
||||||
import com.l2jmobius.gameserver.enums.AttributeType;
|
import com.l2jmobius.gameserver.enums.AttributeType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
||||||
{
|
{
|
||||||
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
||||||
{
|
static
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
{
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
||||||
}
|
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
||||||
|
}
|
||||||
private final int _crystalItemId;
|
|
||||||
private int _attributes;
|
private final int _crystalItemId;
|
||||||
private int _itemObjId;
|
private int _attributes;
|
||||||
|
private int _itemObjId;
|
||||||
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
|
||||||
{
|
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
||||||
_crystalItemId = crystalItemId;
|
{
|
||||||
_attributes = 0;
|
_crystalItemId = crystalItemId;
|
||||||
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
_attributes = 0;
|
||||||
{
|
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
||||||
if (e != item.getAttackAttributeType())
|
{
|
||||||
{
|
if (e != item.getAttackAttributeType())
|
||||||
_attributes |= ATTRIBUTE_MASKS.get(e);
|
{
|
||||||
}
|
_attributes |= ATTRIBUTE_MASKS.get(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean write(PacketWriter packet)
|
@Override
|
||||||
{
|
public boolean write(PacketWriter packet)
|
||||||
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
{
|
||||||
packet.writeD(_crystalItemId);
|
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
||||||
packet.writeD(_attributes);
|
packet.writeD(_crystalItemId);
|
||||||
packet.writeD(_itemObjId);
|
packet.writeD(_attributes);
|
||||||
return true;
|
packet.writeD(_itemObjId);
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,6 @@ public abstract class Operators
|
|||||||
private static final int INDEX_UNARYPLUS = 7;
|
private static final int INDEX_UNARYPLUS = 7;
|
||||||
|
|
||||||
private static final Operator[] builtinOperators = new Operator[8];
|
private static final Operator[] builtinOperators = new Operator[8];
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.areas.DragonValley;
|
package ai.areas.DragonValley;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import com.l2jmobius.gameserver.enums.ChatType;
|
import com.l2jmobius.gameserver.enums.ChatType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leopard Dragon Hachling AI.
|
* Leopard Dragon Hachling AI.
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class LeopardDragonHachling extends AbstractNpcAI
|
public final class LeopardDragonHachling extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int DRAGON_HACHLING = 23434;
|
private static final int DRAGON_HACHLING = 23434;
|
||||||
private static final int LEOPARD_DRAGON = 23435;
|
private static final int LEOPARD_DRAGON = 23435;
|
||||||
// Locations
|
// Locations
|
||||||
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeopardDragonHachling()
|
private LeopardDragonHachling()
|
||||||
{
|
{
|
||||||
addAttackId(DRAGON_HACHLING);
|
addAttackId(DRAGON_HACHLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
||||||
{
|
{
|
||||||
final int random = getRandom(1, 4);
|
final int random = getRandom(1, 4);
|
||||||
for (int counter = 1; counter < random; counter++)
|
for (int counter = 1; counter < random; counter++)
|
||||||
{
|
{
|
||||||
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
||||||
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
||||||
addAttackDesire(leopard, player);
|
addAttackDesire(leopard, player);
|
||||||
}
|
}
|
||||||
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||||
{
|
{
|
||||||
if (npc.getScriptValue() == 0)
|
if (npc.getScriptValue() == 0)
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
||||||
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
||||||
}
|
}
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nearestLocation(Npc npc)
|
private Location nearestLocation(Npc npc)
|
||||||
{
|
{
|
||||||
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
||||||
for (Location loc : TRANSFORM_LOCATIONS)
|
for (Location loc : TRANSFORM_LOCATIONS)
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
||||||
{
|
{
|
||||||
gotoLoc = loc;
|
gotoLoc = loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gotoLoc;
|
return gotoLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new LeopardDragonHachling();
|
new LeopardDragonHachling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
||||||
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
||||||
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
|
|||||||
private static final int BOMBER = 29070; // Dragon Bomber
|
private static final int BOMBER = 29070; // Dragon Bomber
|
||||||
private static final int HEART = 13001; // Heart of Warding
|
private static final int HEART = 13001; // Heart of Warding
|
||||||
private static final int CUBE = 31859; // Teleportation Cubic
|
private static final int CUBE = 31859; // Teleportation Cubic
|
||||||
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
||||||
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
|
|||||||
private static final int DOOM_WRAITH = 29008;
|
private static final int DOOM_WRAITH = 29008;
|
||||||
private static final int SUSCEPTOR = 29011;
|
private static final int SUSCEPTOR = 29011;
|
||||||
// Spawns
|
// Spawns
|
||||||
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
};
|
};
|
||||||
// Misc
|
// Misc
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
||||||
@@ -86,7 +87,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
||||||
@@ -99,7 +101,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
||||||
@@ -112,7 +115,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
|
|||||||
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
CLASS_MASTERS.add(31756); // Mr. Cat
|
CLASS_MASTERS.add(31756); // Mr. Cat
|
||||||
CLASS_MASTERS.add(31757); // Queen of Hearts
|
CLASS_MASTERS.add(31757); // Queen of Hearts
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
// NPC
|
// NPC
|
||||||
private static final int MANAGER = 31688;
|
private static final int MANAGER = 31688;
|
||||||
// Misc
|
// Misc
|
||||||
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
||||||
|
|||||||
@@ -1,121 +1,122 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.World;
|
import com.l2jmobius.gameserver.model.World;
|
||||||
import com.l2jmobius.gameserver.model.actor.Creature;
|
import com.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
import com.l2jmobius.gameserver.model.effects.EffectType;
|
import com.l2jmobius.gameserver.model.effects.EffectType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class AirBind extends AbstractEffect
|
public final class AirBind extends AbstractEffect
|
||||||
{
|
{
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
||||||
{
|
static
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
{
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
||||||
}
|
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
||||||
|
}
|
||||||
public AirBind(StatsSet params)
|
|
||||||
{
|
public AirBind(StatsSet params)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isInstant()
|
@Override
|
||||||
{
|
public boolean isInstant()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public EffectType getEffectType()
|
@Override
|
||||||
{
|
public EffectType getEffectType()
|
||||||
return EffectType.KNOCK;
|
{
|
||||||
}
|
return EffectType.KNOCK;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
@Override
|
||||||
{
|
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
||||||
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
{
|
||||||
{
|
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
||||||
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
{
|
||||||
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
||||||
{
|
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
||||||
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
{
|
||||||
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
||||||
{
|
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
||||||
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
{
|
||||||
}
|
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onExit(Creature effector, Creature effected, Skill skill)
|
@Override
|
||||||
{
|
public void onExit(Creature effector, Creature effected, Skill skill)
|
||||||
if (!effected.isPlayer())
|
{
|
||||||
{
|
if (!effected.isPlayer())
|
||||||
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
{
|
||||||
}
|
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
|
|||||||
private final FlyType _type;
|
private final FlyType _type;
|
||||||
|
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
||||||
|
static
|
||||||
{
|
{
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
||||||
|
|||||||
@@ -1,87 +1,88 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.itemhandlers;
|
package handlers.itemhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.ItemGrade;
|
import com.l2jmobius.gameserver.enums.ItemGrade;
|
||||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.model.ItemInfo;
|
import com.l2jmobius.gameserver.model.ItemInfo;
|
||||||
import com.l2jmobius.gameserver.model.actor.Playable;
|
import com.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ChangeAttributeCrystal implements IItemHandler
|
public class ChangeAttributeCrystal implements IItemHandler
|
||||||
{
|
{
|
||||||
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
||||||
{
|
static
|
||||||
ITEM_GRADES.put(33502, ItemGrade.S);
|
{
|
||||||
ITEM_GRADES.put(35749, ItemGrade.R);
|
ITEM_GRADES.put(33502, ItemGrade.S);
|
||||||
ITEM_GRADES.put(45817, ItemGrade.R);
|
ITEM_GRADES.put(35749, ItemGrade.R);
|
||||||
}
|
ITEM_GRADES.put(45817, ItemGrade.R);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
@Override
|
||||||
{
|
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
||||||
if (!playable.isPlayer())
|
{
|
||||||
{
|
if (!playable.isPlayer())
|
||||||
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
{
|
||||||
return false;
|
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final PlayerInstance player = playable.getActingPlayer();
|
|
||||||
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
final PlayerInstance player = playable.getActingPlayer();
|
||||||
{
|
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
if (ITEM_GRADES.get(item.getId()) == null)
|
|
||||||
{
|
if (ITEM_GRADES.get(item.getId()) == null)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final List<ItemInfo> itemList = new ArrayList<>();
|
|
||||||
for (ItemInstance i : player.getInventory().getItems())
|
final List<ItemInfo> itemList = new ArrayList<>();
|
||||||
{
|
for (ItemInstance i : player.getInventory().getItems())
|
||||||
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
{
|
||||||
{
|
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
||||||
itemList.add(new ItemInfo(i));
|
{
|
||||||
}
|
itemList.add(new ItemInfo(i));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (itemList.isEmpty())
|
|
||||||
{
|
if (itemList.isEmpty())
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
|
||||||
return true;
|
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
|
|||||||
// Misc
|
// Misc
|
||||||
private static final int MIN_LVL = 45;
|
private static final int MIN_LVL = 45;
|
||||||
// Reward
|
// Reward
|
||||||
private static final Map<String, Integer> EARS = new HashMap<>();
|
private static final Map<String, Integer> EARS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EARS.put("cat", 6843); // Cat Ears
|
EARS.put("cat", 6843); // Cat Ears
|
||||||
EARS.put("raccoon", 7680); // Raccoon ears
|
EARS.put("raccoon", 7680); // Raccoon ears
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
|
|||||||
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
||||||
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ public final class Q00420_LittleWing extends Quest
|
|||||||
private static final int HATCHLING_FOOD = 4038;
|
private static final int HATCHLING_FOOD = 4038;
|
||||||
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
||||||
// Drake Drops
|
// Drake Drops
|
||||||
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
||||||
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
||||||
|
|||||||
@@ -1,37 +1,38 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.model.skills;
|
package com.l2jmobius.gameserver.model.skills;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class MountEnabledSkillList
|
public class MountEnabledSkillList
|
||||||
{
|
{
|
||||||
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
||||||
{
|
static
|
||||||
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
{
|
||||||
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
||||||
}
|
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
||||||
|
}
|
||||||
public static boolean contains(int skillId)
|
|
||||||
{
|
public static boolean contains(int skillId)
|
||||||
return ENABLED_SKILLS.contains(skillId);
|
{
|
||||||
}
|
return ENABLED_SKILLS.contains(skillId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,69 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
import com.l2jmobius.commons.network.PacketWriter;
|
||||||
import com.l2jmobius.gameserver.enums.AttributeType;
|
import com.l2jmobius.gameserver.enums.AttributeType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
||||||
{
|
{
|
||||||
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
||||||
{
|
static
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
{
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
||||||
}
|
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
||||||
|
}
|
||||||
private final int _crystalItemId;
|
|
||||||
private int _attributes;
|
private final int _crystalItemId;
|
||||||
private int _itemObjId;
|
private int _attributes;
|
||||||
|
private int _itemObjId;
|
||||||
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
|
||||||
{
|
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
||||||
_crystalItemId = crystalItemId;
|
{
|
||||||
_attributes = 0;
|
_crystalItemId = crystalItemId;
|
||||||
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
_attributes = 0;
|
||||||
{
|
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
||||||
if (e != item.getAttackAttributeType())
|
{
|
||||||
{
|
if (e != item.getAttackAttributeType())
|
||||||
_attributes |= ATTRIBUTE_MASKS.get(e);
|
{
|
||||||
}
|
_attributes |= ATTRIBUTE_MASKS.get(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean write(PacketWriter packet)
|
@Override
|
||||||
{
|
public boolean write(PacketWriter packet)
|
||||||
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
{
|
||||||
packet.writeD(_crystalItemId);
|
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
||||||
packet.writeD(_attributes);
|
packet.writeD(_crystalItemId);
|
||||||
packet.writeD(_itemObjId);
|
packet.writeD(_attributes);
|
||||||
return true;
|
packet.writeD(_itemObjId);
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,6 @@ public abstract class Operators
|
|||||||
private static final int INDEX_UNARYPLUS = 7;
|
private static final int INDEX_UNARYPLUS = 7;
|
||||||
|
|
||||||
private static final Operator[] builtinOperators = new Operator[8];
|
private static final Operator[] builtinOperators = new Operator[8];
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.areas.DragonValley;
|
package ai.areas.DragonValley;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import com.l2jmobius.gameserver.enums.ChatType;
|
import com.l2jmobius.gameserver.enums.ChatType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leopard Dragon Hachling AI.
|
* Leopard Dragon Hachling AI.
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class LeopardDragonHachling extends AbstractNpcAI
|
public final class LeopardDragonHachling extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int DRAGON_HACHLING = 23434;
|
private static final int DRAGON_HACHLING = 23434;
|
||||||
private static final int LEOPARD_DRAGON = 23435;
|
private static final int LEOPARD_DRAGON = 23435;
|
||||||
// Locations
|
// Locations
|
||||||
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeopardDragonHachling()
|
private LeopardDragonHachling()
|
||||||
{
|
{
|
||||||
addAttackId(DRAGON_HACHLING);
|
addAttackId(DRAGON_HACHLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
||||||
{
|
{
|
||||||
final int random = getRandom(1, 4);
|
final int random = getRandom(1, 4);
|
||||||
for (int counter = 1; counter < random; counter++)
|
for (int counter = 1; counter < random; counter++)
|
||||||
{
|
{
|
||||||
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
||||||
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
||||||
addAttackDesire(leopard, player);
|
addAttackDesire(leopard, player);
|
||||||
}
|
}
|
||||||
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||||
{
|
{
|
||||||
if (npc.getScriptValue() == 0)
|
if (npc.getScriptValue() == 0)
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
||||||
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
||||||
}
|
}
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nearestLocation(Npc npc)
|
private Location nearestLocation(Npc npc)
|
||||||
{
|
{
|
||||||
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
||||||
for (Location loc : TRANSFORM_LOCATIONS)
|
for (Location loc : TRANSFORM_LOCATIONS)
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
||||||
{
|
{
|
||||||
gotoLoc = loc;
|
gotoLoc = loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gotoLoc;
|
return gotoLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new LeopardDragonHachling();
|
new LeopardDragonHachling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
||||||
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
||||||
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
|
|||||||
private static final int BOMBER = 29070; // Dragon Bomber
|
private static final int BOMBER = 29070; // Dragon Bomber
|
||||||
private static final int HEART = 13001; // Heart of Warding
|
private static final int HEART = 13001; // Heart of Warding
|
||||||
private static final int CUBE = 31859; // Teleportation Cubic
|
private static final int CUBE = 31859; // Teleportation Cubic
|
||||||
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
||||||
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
|
|||||||
private static final int DOOM_WRAITH = 29008;
|
private static final int DOOM_WRAITH = 29008;
|
||||||
private static final int SUSCEPTOR = 29011;
|
private static final int SUSCEPTOR = 29011;
|
||||||
// Spawns
|
// Spawns
|
||||||
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
};
|
};
|
||||||
// Misc
|
// Misc
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
|
||||||
@@ -86,7 +87,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
|
||||||
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R90_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
|
||||||
@@ -99,7 +101,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
|
||||||
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R95_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
|
||||||
@@ -112,7 +115,8 @@ public class AdventureGuildsman extends AbstractNpcAI
|
|||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
|
||||||
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
|
||||||
}
|
}
|
||||||
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
private static final Map<CategoryType, Integer> R99_CLASS_TALISMAN = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
|
||||||
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
|
|||||||
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
private static final List<Integer> CLASS_MASTERS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
CLASS_MASTERS.add(31756); // Mr. Cat
|
CLASS_MASTERS.add(31756); // Mr. Cat
|
||||||
CLASS_MASTERS.add(31757); // Queen of Hearts
|
CLASS_MASTERS.add(31757); // Queen of Hearts
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
// NPC
|
// NPC
|
||||||
private static final int MANAGER = 31688;
|
private static final int MANAGER = 31688;
|
||||||
// Misc
|
// Misc
|
||||||
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
private static final Map<CategoryType, Integer> EQUIPMENT_MULTISELL = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
|
||||||
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
|
||||||
|
|||||||
@@ -1,121 +1,122 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.World;
|
import com.l2jmobius.gameserver.model.World;
|
||||||
import com.l2jmobius.gameserver.model.actor.Creature;
|
import com.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
import com.l2jmobius.gameserver.model.effects.EffectType;
|
import com.l2jmobius.gameserver.model.effects.EffectType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class AirBind extends AbstractEffect
|
public final class AirBind extends AbstractEffect
|
||||||
{
|
{
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainedAirSkills = new HashMap<>(36);
|
||||||
{
|
static
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
{
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
|
||||||
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
_chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
|
||||||
}
|
_chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
|
||||||
|
}
|
||||||
public AirBind(StatsSet params)
|
|
||||||
{
|
public AirBind(StatsSet params)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isInstant()
|
@Override
|
||||||
{
|
public boolean isInstant()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public EffectType getEffectType()
|
@Override
|
||||||
{
|
public EffectType getEffectType()
|
||||||
return EffectType.KNOCK;
|
{
|
||||||
}
|
return EffectType.KNOCK;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
@Override
|
||||||
{
|
public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
|
||||||
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
{
|
||||||
{
|
for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
|
||||||
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
{
|
||||||
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
|
||||||
{
|
&& nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
|
||||||
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
{
|
||||||
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
|
||||||
{
|
if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
|
||||||
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
{
|
||||||
}
|
nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public void onExit(Creature effector, Creature effected, Skill skill)
|
@Override
|
||||||
{
|
public void onExit(Creature effector, Creature effected, Skill skill)
|
||||||
if (!effected.isPlayer())
|
{
|
||||||
{
|
if (!effected.isPlayer())
|
||||||
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
{
|
||||||
}
|
effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
|
|||||||
private final FlyType _type;
|
private final FlyType _type;
|
||||||
|
|
||||||
// skill data
|
// skill data
|
||||||
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
private static final Map<ClassId, Integer> _chainKnockSkills = new HashMap<>(36);
|
||||||
|
static
|
||||||
{
|
{
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
|
||||||
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
|
||||||
|
|||||||
@@ -1,87 +1,88 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package handlers.itemhandlers;
|
package handlers.itemhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.ItemGrade;
|
import com.l2jmobius.gameserver.enums.ItemGrade;
|
||||||
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.model.ItemInfo;
|
import com.l2jmobius.gameserver.model.ItemInfo;
|
||||||
import com.l2jmobius.gameserver.model.actor.Playable;
|
import com.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ChangeAttributeCrystal implements IItemHandler
|
public class ChangeAttributeCrystal implements IItemHandler
|
||||||
{
|
{
|
||||||
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
private static final Map<Integer, ItemGrade> ITEM_GRADES = new HashMap<>();
|
||||||
{
|
static
|
||||||
ITEM_GRADES.put(33502, ItemGrade.S);
|
{
|
||||||
ITEM_GRADES.put(35749, ItemGrade.R);
|
ITEM_GRADES.put(33502, ItemGrade.S);
|
||||||
ITEM_GRADES.put(45817, ItemGrade.R);
|
ITEM_GRADES.put(35749, ItemGrade.R);
|
||||||
}
|
ITEM_GRADES.put(45817, ItemGrade.R);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
@Override
|
||||||
{
|
public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
|
||||||
if (!playable.isPlayer())
|
{
|
||||||
{
|
if (!playable.isPlayer())
|
||||||
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
{
|
||||||
return false;
|
playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final PlayerInstance player = playable.getActingPlayer();
|
|
||||||
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
final PlayerInstance player = playable.getActingPlayer();
|
||||||
{
|
if (player.getPrivateStoreType() != PrivateStoreType.NONE)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
if (ITEM_GRADES.get(item.getId()) == null)
|
|
||||||
{
|
if (ITEM_GRADES.get(item.getId()) == null)
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
final List<ItemInfo> itemList = new ArrayList<>();
|
|
||||||
for (ItemInstance i : player.getInventory().getItems())
|
final List<ItemInfo> itemList = new ArrayList<>();
|
||||||
{
|
for (ItemInstance i : player.getInventory().getItems())
|
||||||
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
{
|
||||||
{
|
if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
|
||||||
itemList.add(new ItemInfo(i));
|
{
|
||||||
}
|
itemList.add(new ItemInfo(i));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (itemList.isEmpty())
|
|
||||||
{
|
if (itemList.isEmpty())
|
||||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
{
|
||||||
return false;
|
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
|
||||||
return true;
|
player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
|
|||||||
// Misc
|
// Misc
|
||||||
private static final int MIN_LVL = 45;
|
private static final int MIN_LVL = 45;
|
||||||
// Reward
|
// Reward
|
||||||
private static final Map<String, Integer> EARS = new HashMap<>();
|
private static final Map<String, Integer> EARS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EARS.put("cat", 6843); // Cat Ears
|
EARS.put("cat", 6843); // Cat Ears
|
||||||
EARS.put("raccoon", 7680); // Raccoon ears
|
EARS.put("raccoon", 7680); // Raccoon ears
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
|
|||||||
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
|
||||||
// Monsters
|
// Monsters
|
||||||
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
private static final Map<Integer, Double> MONSTER_CHANCES = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
|
||||||
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ public final class Q00420_LittleWing extends Quest
|
|||||||
private static final int HATCHLING_FOOD = 4038;
|
private static final int HATCHLING_FOOD = 4038;
|
||||||
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
private static final List<Integer> EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
|
||||||
// Drake Drops
|
// Drake Drops
|
||||||
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
private static final Map<Integer, Integer> EGG_DROPS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
|
||||||
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
|
||||||
|
|||||||
@@ -1,37 +1,38 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.model.skills;
|
package com.l2jmobius.gameserver.model.skills;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class MountEnabledSkillList
|
public class MountEnabledSkillList
|
||||||
{
|
{
|
||||||
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
|
||||||
{
|
static
|
||||||
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
{
|
||||||
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
ENABLED_SKILLS.add(4289); // Wyvern Breath
|
||||||
}
|
ENABLED_SKILLS.add(325); // Strider Siege Assault
|
||||||
|
}
|
||||||
public static boolean contains(int skillId)
|
|
||||||
{
|
public static boolean contains(int skillId)
|
||||||
return ENABLED_SKILLS.contains(skillId);
|
{
|
||||||
}
|
return ENABLED_SKILLS.contains(skillId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,69 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
package com.l2jmobius.gameserver.network.serverpackets.attributechange;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
import com.l2jmobius.commons.network.PacketWriter;
|
||||||
import com.l2jmobius.gameserver.enums.AttributeType;
|
import com.l2jmobius.gameserver.enums.AttributeType;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
public class ExChangeAttributeInfo implements IClientOutgoingPacket
|
||||||
{
|
{
|
||||||
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
private static final Map<AttributeType, Byte> ATTRIBUTE_MASKS = new HashMap<>();
|
||||||
{
|
static
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
{
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
|
||||||
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
|
||||||
}
|
ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
|
||||||
|
}
|
||||||
private final int _crystalItemId;
|
|
||||||
private int _attributes;
|
private final int _crystalItemId;
|
||||||
private int _itemObjId;
|
private int _attributes;
|
||||||
|
private int _itemObjId;
|
||||||
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
|
||||||
{
|
public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
|
||||||
_crystalItemId = crystalItemId;
|
{
|
||||||
_attributes = 0;
|
_crystalItemId = crystalItemId;
|
||||||
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
_attributes = 0;
|
||||||
{
|
for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
|
||||||
if (e != item.getAttackAttributeType())
|
{
|
||||||
{
|
if (e != item.getAttackAttributeType())
|
||||||
_attributes |= ATTRIBUTE_MASKS.get(e);
|
{
|
||||||
}
|
_attributes |= ATTRIBUTE_MASKS.get(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean write(PacketWriter packet)
|
@Override
|
||||||
{
|
public boolean write(PacketWriter packet)
|
||||||
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
{
|
||||||
packet.writeD(_crystalItemId);
|
OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
|
||||||
packet.writeD(_attributes);
|
packet.writeD(_crystalItemId);
|
||||||
packet.writeD(_itemObjId);
|
packet.writeD(_attributes);
|
||||||
return true;
|
packet.writeD(_itemObjId);
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,6 @@ public abstract class Operators
|
|||||||
private static final int INDEX_UNARYPLUS = 7;
|
private static final int INDEX_UNARYPLUS = 7;
|
||||||
|
|
||||||
private static final Operator[] builtinOperators = new Operator[8];
|
private static final Operator[] builtinOperators = new Operator[8];
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the L2J Mobius project.
|
* This file is part of the L2J Mobius project.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package ai.areas.DragonValley;
|
package ai.areas.DragonValley;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import com.l2jmobius.gameserver.enums.ChatType;
|
import com.l2jmobius.gameserver.enums.ChatType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||||
|
|
||||||
import ai.AbstractNpcAI;
|
import ai.AbstractNpcAI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Leopard Dragon Hachling AI.
|
* Leopard Dragon Hachling AI.
|
||||||
* @author Mobius
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class LeopardDragonHachling extends AbstractNpcAI
|
public final class LeopardDragonHachling extends AbstractNpcAI
|
||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int DRAGON_HACHLING = 23434;
|
private static final int DRAGON_HACHLING = 23434;
|
||||||
private static final int LEOPARD_DRAGON = 23435;
|
private static final int LEOPARD_DRAGON = 23435;
|
||||||
// Locations
|
// Locations
|
||||||
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
private static final List<Location> TRANSFORM_LOCATIONS = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
|
||||||
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LeopardDragonHachling()
|
private LeopardDragonHachling()
|
||||||
{
|
{
|
||||||
addAttackId(DRAGON_HACHLING);
|
addAttackId(DRAGON_HACHLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
|
||||||
{
|
{
|
||||||
final int random = getRandom(1, 4);
|
final int random = getRandom(1, 4);
|
||||||
for (int counter = 1; counter < random; counter++)
|
for (int counter = 1; counter < random; counter++)
|
||||||
{
|
{
|
||||||
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
|
||||||
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
|
||||||
addAttackDesire(leopard, player);
|
addAttackDesire(leopard, player);
|
||||||
}
|
}
|
||||||
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
|
||||||
{
|
{
|
||||||
if (npc.getScriptValue() == 0)
|
if (npc.getScriptValue() == 0)
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
|
||||||
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
|
||||||
}
|
}
|
||||||
npc.abortAttack();
|
npc.abortAttack();
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nearestLocation(Npc npc)
|
private Location nearestLocation(Npc npc)
|
||||||
{
|
{
|
||||||
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
|
||||||
for (Location loc : TRANSFORM_LOCATIONS)
|
for (Location loc : TRANSFORM_LOCATIONS)
|
||||||
{
|
{
|
||||||
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
|
||||||
{
|
{
|
||||||
gotoLoc = loc;
|
gotoLoc = loc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gotoLoc;
|
return gotoLoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new LeopardDragonHachling();
|
new LeopardDragonHachling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
private static final Map<CategoryType, Integer> classCloak = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
|
||||||
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
|
||||||
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
|
|||||||
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
private static final List<PlayerClass> dualClassList = new ArrayList<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
|
||||||
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
|
|||||||
private static final int BOMBER = 29070; // Dragon Bomber
|
private static final int BOMBER = 29070; // Dragon Bomber
|
||||||
private static final int HEART = 13001; // Heart of Warding
|
private static final int HEART = 13001; // Heart of Warding
|
||||||
private static final int CUBE = 31859; // Teleportation Cubic
|
private static final int CUBE = 31859; // Teleportation Cubic
|
||||||
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
private static final Map<Integer, Location> INVISIBLE_NPC = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
|
||||||
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
|
|||||||
private static final int DOOM_WRAITH = 29008;
|
private static final int DOOM_WRAITH = 29008;
|
||||||
private static final int SUSCEPTOR = 29011;
|
private static final int SUSCEPTOR = 29011;
|
||||||
// Spawns
|
// Spawns
|
||||||
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
private static final Map<Integer, Location> MINNION_SPAWNS = new HashMap<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
|
||||||
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user