From 528aa915c7401ab773aba268ec5d0816ab580ea9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Dec 2014 17:30:24 +0300 Subject: Move processIpResponse from ea namespace into tmwa. --- src/net/tmwa/beinghandler.cpp | 15 +++++++++++++++ src/net/tmwa/beinghandler.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 7f11598c5..113f0708e 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1604,4 +1604,19 @@ void BeingHandler::processSkillCastCancel(Net::MessageIn &msg) msg.readInt32("skill id"); } +void BeingHandler::processIpResponse(Net::MessageIn &msg) +{ + BLOCK_START("BeingHandler::processIpResponse") + if (!actorManager) + { + BLOCK_END("BeingHandler::processIpResponse") + return; + } + + Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id")); + if (dstBeing) + dstBeing->setIp(ipToString(msg.readInt32("ip address"))); + BLOCK_END("BeingHandler::processIpResponse") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index 24d559b2f..6258b9233 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -92,6 +92,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler static void processBeingSelfEffect(Net::MessageIn &msg); static void processSkillCastCancel(Net::MessageIn &msg); + + static void processIpResponse(Net::MessageIn &msg); }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2