Skip to content
Snippets Groups Projects
Commit fc14262c authored by Rumen Nikiforov's avatar Rumen Nikiforov
Browse files

BETA: Fixing NPE in L2AttackableAIScript.

	* Also minor cleanup in Craft handler.
	* Reported by: St3eT
	* Tested by: St3eT
parent 12f63b86
No related branches found
No related tags found
No related merge requests found
......@@ -175,13 +175,10 @@ public final class L2AttackableAIScript extends QuestJython
if (npc instanceof L2MonsterInstance)
{
final L2MonsterInstance mob = (L2MonsterInstance) npc;
if (mob.getLeader() != null)
if (mob.getLeader() != null && mob.getLeader().hasMinions())
{
final int respawnTime = Config.MINIONS_RESPAWN_TIME.containsKey(npc.getNpcId()) ? Config.MINIONS_RESPAWN_TIME.get(mob.getNpcId()) * 1000 : -1;
if (mob.hasMinions())
{
mob.getLeader().getMinionList().onMinionDie(mob, respawnTime);
}
final int respawnTime = Config.MINIONS_RESPAWN_TIME.containsKey(npc.getNpcId()) ? Config.MINIONS_RESPAWN_TIME.get(mob.getNpcId()) * 1000 : -1;
mob.getLeader().getMinionList().onMinionDie(mob, respawnTime);
}
if (mob.hasMinions())
......
......@@ -47,7 +47,7 @@ public class Craft implements ISkillHandler
player.sendPacket(SystemMessageId.CANNOT_CREATED_WHILE_ENGAGED_IN_TRADING);
return;
}
RecipeController.getInstance().requestBookOpen(player, (skill.getSkillType() == L2SkillType.DWARVEN_CRAFT) ? true : false);
RecipeController.getInstance().requestBookOpen(player, (skill.getSkillType() == L2SkillType.DWARVEN_CRAFT));
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment