Fixed chest key issues.
This commit is contained in:
@@ -53,7 +53,6 @@ public class ChestKey implements IItemHandler
|
||||
|
||||
final PlayerInstance player = (PlayerInstance) playable;
|
||||
final int itemId = item.getItemId();
|
||||
final Skill skill = SkillTable.getInstance().getSkill(2229, itemId - 6664); // box key skill
|
||||
final WorldObject target = player.getTarget();
|
||||
if (!(target instanceof ChestInstance))
|
||||
{
|
||||
@@ -65,11 +64,12 @@ public class ChestKey implements IItemHandler
|
||||
final ChestInstance chest = (ChestInstance) target;
|
||||
if (chest.isDead() || chest.isInteracted())
|
||||
{
|
||||
player.sendMessage("The chest Is empty.");
|
||||
player.sendMessage("The chest is empty.");
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
final Skill skill = SkillTable.getInstance().getSkill(2229, itemId - 6664); // box key skill
|
||||
player.useMagic(skill, false, false);
|
||||
}
|
||||
}
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package org.l2jmobius.gameserver.handler.skillhandlers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
@@ -30,8 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class DeluxeKey implements ISkillHandler
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(DeluxeKey.class.getName());
|
||||
|
||||
private static final SkillType[] SKILL_IDS =
|
||||
{
|
||||
SkillType.DELUXE_KEY_UNLOCK
|
||||
@@ -45,14 +42,11 @@ public class DeluxeKey implements ISkillHandler
|
||||
return;
|
||||
}
|
||||
|
||||
final List<Creature> targetList = skill.getTargetList(creature);
|
||||
if (targetList == null)
|
||||
if (skill.getTargetList(creature) == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.info("Delux key casting succeded.");
|
||||
|
||||
// This is just a dummy skill handler for the golden food and crystal food skills, since the AI responce onSkillUse handles the rest.
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user