From 13bd88a962de51e32031931dc5af70f6df341f3f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 23 Nov 2015 21:09:02 +0300 Subject: Impliment packet SMSG_SKILL_WARP_POINT (hercules) --- src/net/eathena/skillrecv.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/net/eathena/skillrecv.cpp') diff --git a/src/net/eathena/skillrecv.cpp b/src/net/eathena/skillrecv.cpp index 2ddc05e28..cfba6fc9f 100644 --- a/src/net/eathena/skillrecv.cpp +++ b/src/net/eathena/skillrecv.cpp @@ -29,9 +29,13 @@ #include "enums/resources/notifytypes.h" +#include "gui/widgets/createwidget.h" #include "gui/widgets/skillinfo.h" #include "gui/windows/skilldialog.h" +#include "gui/windows/textselectdialog.h" + +#include "listeners/skillwarplistener.h" #include "net/messagein.h" @@ -327,12 +331,18 @@ void SkillRecv::processSkillSnap(Net::MessageIn &msg) void SkillRecv::processSkillWarpPoint(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - msg.readInt16("skill id"); - msg.readString(16, "map name 1"); - msg.readString(16, "map name 2"); - msg.readString(16, "map name 3"); - msg.readString(16, "map name 4"); + const int skillId = msg.readInt16("skill id"); + + TextSelectDialog *const dialog = CREATEWIDGETR(TextSelectDialog, + // TRANSLATORS: warp select window name + _("Select warp target"), + // TRANSLATORS: warp select button + _("Warp")); + skillWarpListener.setDialog(dialog); + skillWarpListener.setSkill(skillId); + dialog->addActionListener(&skillWarpListener); + for (int f = 0; f < 4; f ++) + dialog->addText(msg.readString(16, "map name")); } void SkillRecv::processSkillMemoMessage(Net::MessageIn &msg) -- cgit v1.2.3-70-g09d2