Quest Completion Effect Fix

This is a small fix for a effect upon quest completion, tested it and it
works properly.
This commit is contained in:
Jayden Seah
2017-04-27 13:30:58 +08:00
parent f5fbb038e9
commit 28204ce831
2 changed files with 5 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ import client.MapleClient;
import net.AbstractMaplePacketHandler; import net.AbstractMaplePacketHandler;
import scripting.quest.QuestScriptManager; import scripting.quest.QuestScriptManager;
import server.quest.MapleQuest; import server.quest.MapleQuest;
import tools.MaplePacketCreator;
import tools.data.input.SeekableLittleEndianAccessor; import tools.data.input.SeekableLittleEndianAccessor;
/** /**
@@ -67,6 +68,8 @@ public final class QuestActionHandler extends AbstractMaplePacketHandler {
slea.readInt(); slea.readInt();
if(quest.canComplete(player, npc)) { if(quest.canComplete(player, npc)) {
QuestScriptManager.getInstance().end(c, questid, npc); QuestScriptManager.getInstance().end(c, questid, npc);
player.getClient().getSession().write(MaplePacketCreator.showSpecialEffect(9)); //show effect when completion
player.getMap().broadcastMessage(player, MaplePacketCreator.showForeignEffect(player.getId(), 9));//show effect around players I guess
} }
} }
} }

View File

@@ -223,9 +223,8 @@ public class MapleQuest {
a.run(c, selection); a.run(c, selection);
} }
//dont seems to work... c.getClient().getSession().write(MaplePacketCreator.showForeignEffect(9)); // Quest completion
//c.getClient().getSession().write(MaplePacketCreator.showForeignEffect(12)); // Quest completion c.getMap().broadcastMessage(c, MaplePacketCreator.showForeignEffect(c.getId(), 9), false); //use 9 instead of 12 for both
//c.getMap().broadcastMessage(c, MaplePacketCreator.showForeignEffect(c.getId(), 12), false);
} }
} }