From 1c2b548e4bc8cd7243cd61bed6c68db859d843db Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Oct 2014 15:57:43 +0300 Subject: Add static in familyhandler. --- src/net/eathena/familyhandler.cpp | 10 +++++++--- src/net/eathena/familyhandler.h | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp index 950762573..e3df97f4f 100644 --- a/src/net/eathena/familyhandler.cpp +++ b/src/net/eathena/familyhandler.cpp @@ -32,11 +32,15 @@ extern Net::FamilyHandler *familyHandler; namespace EAthena { +int FamilyHandler::mParent1 = 0; +int FamilyHandler::mParent2 = 0; + FamilyHandler::FamilyHandler() : - MessageHandler(), - mParent1(0), - mParent2(0) + MessageHandler() { + mParent1 = 0; + mParent2 = 0; + static const uint16_t _messages[] = { SMSG_FAMILY_ASK_FOR_CHILD, diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h index e2c5be154..8fe4716d0 100644 --- a/src/net/eathena/familyhandler.h +++ b/src/net/eathena/familyhandler.h @@ -42,15 +42,15 @@ class FamilyHandler final : public MessageHandler, void askForChildReply(const bool accept) override final; protected: - void processAskForChild(Net::MessageIn &msg); + static void processAskForChild(Net::MessageIn &msg); - void processCallPartner(Net::MessageIn &msg); + static void processCallPartner(Net::MessageIn &msg); - void processDivorced(Net::MessageIn &msg); + static void processDivorced(Net::MessageIn &msg); private: - int mParent1; - int mParent2; + static int mParent1; + static int mParent2; }; } // namespace EAthena -- cgit v1.2.3-70-g09d2