Code improvements.

This commit is contained in:
MobiusDev
2016-04-24 16:30:15 +00:00
parent 8bd51aba1c
commit 2dd14bef9b
860 changed files with 8865 additions and 17041 deletions

View File

@@ -396,20 +396,16 @@ public final class Q00421_LittleWingsBigAdventure extends Quest
npc.doCast(DRYAD_ROOT.getSkill());
}
}
else if (getRandom(100) < 2)
else if ((getRandom(100) < 2) && hasQuestItems(attacker, FAIRY_LEAF))
{
if (hasQuestItems(attacker, FAIRY_LEAF))
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.GIVE_ME_A_FAIRY_LEAF));
takeItems(attacker, FAIRY_LEAF, 1);
qs.setMemoState(qs.getMemoState() + data.memoStateValue);
qs.unset("hits");
playSound(attacker, QuestSound.ITEMSOUND_QUEST_MIDDLE);
if (qs.getMemoState() == 15)
{
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.GIVE_ME_A_FAIRY_LEAF));
takeItems(attacker, FAIRY_LEAF, 1);
qs.setMemoState(qs.getMemoState() + data.memoStateValue);
qs.unset("hits");
playSound(attacker, QuestSound.ITEMSOUND_QUEST_MIDDLE);
if (qs.getMemoState() == 15)
{
qs.setCond(3);
}
qs.setCond(3);
}
}
}