summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-03 21:13:18 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-03 21:13:18 +0300
commitaf61285030fa17604a0d3812c679c45cdc8c2a5d (patch)
tree1d37788d1e03b7cca8b20e3d6c4a68ad70ac02c9 /src/net/eathena
parent4546f29469d01fcbb5a030c4cf1746b786b495da (diff)
downloadmanaplus-af61285030fa17604a0d3812c679c45cdc8c2a5d.tar.gz
manaplus-af61285030fa17604a0d3812c679c45cdc8c2a5d.tar.bz2
manaplus-af61285030fa17604a0d3812c679c45cdc8c2a5d.tar.xz
manaplus-af61285030fa17604a0d3812c679c45cdc8c2a5d.zip
Remove network handlers in general handler was deleted.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/adminhandler.cpp5
-rw-r--r--src/net/eathena/adminhandler.h2
-rw-r--r--src/net/eathena/auctionhandler.cpp5
-rw-r--r--src/net/eathena/auctionhandler.h2
-rw-r--r--src/net/eathena/bankhandler.cpp5
-rw-r--r--src/net/eathena/bankhandler.h2
-rw-r--r--src/net/eathena/battlegroundhandler.cpp5
-rw-r--r--src/net/eathena/battlegroundhandler.h2
-rw-r--r--src/net/eathena/beinghandler.cpp5
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/eathena/buyingstorehandler.cpp5
-rw-r--r--src/net/eathena/buyingstorehandler.h2
-rw-r--r--src/net/eathena/buysellhandler.cpp5
-rw-r--r--src/net/eathena/buysellhandler.h2
-rw-r--r--src/net/eathena/cashshophandler.cpp5
-rw-r--r--src/net/eathena/cashshophandler.h2
-rw-r--r--src/net/eathena/charserverhandler.cpp5
-rw-r--r--src/net/eathena/charserverhandler.h2
-rw-r--r--src/net/eathena/chathandler.cpp5
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/elementalhandler.cpp5
-rw-r--r--src/net/eathena/elementalhandler.h2
-rw-r--r--src/net/eathena/familyhandler.cpp5
-rw-r--r--src/net/eathena/familyhandler.h2
-rw-r--r--src/net/eathena/friendshandler.cpp5
-rw-r--r--src/net/eathena/friendshandler.h2
-rw-r--r--src/net/eathena/gamehandler.cpp5
-rw-r--r--src/net/eathena/gamehandler.h2
-rw-r--r--src/net/eathena/generalhandler.cpp35
-rw-r--r--src/net/eathena/guildhandler.cpp2
-rw-r--r--src/net/eathena/homunculushandler.cpp5
-rw-r--r--src/net/eathena/homunculushandler.h2
-rw-r--r--src/net/eathena/inventoryhandler.cpp1
-rw-r--r--src/net/eathena/loginhandler.cpp1
-rw-r--r--src/net/eathena/mailhandler.cpp5
-rw-r--r--src/net/eathena/mailhandler.h2
-rw-r--r--src/net/eathena/maphandler.cpp5
-rw-r--r--src/net/eathena/maphandler.h9
-rw-r--r--src/net/eathena/markethandler.cpp5
-rw-r--r--src/net/eathena/markethandler.h2
-rw-r--r--src/net/eathena/mercenaryhandler.cpp5
-rw-r--r--src/net/eathena/mercenaryhandler.h2
-rw-r--r--src/net/eathena/npchandler.cpp5
-rw-r--r--src/net/eathena/npchandler.h2
-rw-r--r--src/net/eathena/partyhandler.cpp1
-rw-r--r--src/net/eathena/pethandler.cpp5
-rw-r--r--src/net/eathena/pethandler.h2
-rw-r--r--src/net/eathena/playerhandler.cpp5
-rw-r--r--src/net/eathena/playerhandler.h2
-rw-r--r--src/net/eathena/questhandler.cpp5
-rw-r--r--src/net/eathena/questhandler.h2
-rw-r--r--src/net/eathena/roulettehandler.cpp5
-rw-r--r--src/net/eathena/roulettehandler.h2
-rw-r--r--src/net/eathena/searchstorehandler.cpp5
-rw-r--r--src/net/eathena/searchstorehandler.h2
-rw-r--r--src/net/eathena/skillhandler.cpp5
-rw-r--r--src/net/eathena/skillhandler.h2
-rw-r--r--src/net/eathena/tradehandler.cpp6
-rw-r--r--src/net/eathena/tradehandler.h2
-rw-r--r--src/net/eathena/vendinghandler.cpp5
-rw-r--r--src/net/eathena/vendinghandler.h2
61 files changed, 236 insertions, 8 deletions
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index 87ab97fec..45cfb9ed5 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -43,6 +43,11 @@ AdminHandler::AdminHandler() :
adminHandler = this;
}
+AdminHandler::~AdminHandler()
+{
+ adminHandler = nullptr;
+}
+
void AdminHandler::announce(const std::string &text) const
{
createOutPacket(CMSG_ADMIN_ANNOUNCE);
diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h
index 0c9e25e72..2cee9a354 100644
--- a/src/net/eathena/adminhandler.h
+++ b/src/net/eathena/adminhandler.h
@@ -35,6 +35,8 @@ class AdminHandler final : public Ea::AdminHandler
A_DELETE_COPY(AdminHandler)
+ ~AdminHandler();
+
void announce(const std::string &text) const override final;
void localAnnounce(const std::string &text) const override final;
diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp
index 24c09f16a..709e15138 100644
--- a/src/net/eathena/auctionhandler.cpp
+++ b/src/net/eathena/auctionhandler.cpp
@@ -37,6 +37,11 @@ AuctionHandler::AuctionHandler()
auctionHandler = this;
}
+AuctionHandler::~AuctionHandler()
+{
+ auctionHandler = nullptr;
+}
+
void AuctionHandler::cancelReg() const
{
createOutPacket(CMSG_AUCTION_CANCEL_REG);
diff --git a/src/net/eathena/auctionhandler.h b/src/net/eathena/auctionhandler.h
index 21b70a4d5..097f4ca3b 100644
--- a/src/net/eathena/auctionhandler.h
+++ b/src/net/eathena/auctionhandler.h
@@ -32,6 +32,8 @@ class AuctionHandler final : public Net::AuctionHandler
A_DELETE_COPY(AuctionHandler)
+ ~AuctionHandler();
+
void cancelReg() const override final;
void setItem(const Item *const item,
diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp
index 8c73bad91..19d600059 100644
--- a/src/net/eathena/bankhandler.cpp
+++ b/src/net/eathena/bankhandler.cpp
@@ -36,6 +36,11 @@ BankHandler::BankHandler() :
bankHandler = this;
}
+BankHandler::~BankHandler()
+{
+ bankHandler = nullptr;
+}
+
void BankHandler::deposit(const int money) const
{
if (packetVersion < 20130320)
diff --git a/src/net/eathena/bankhandler.h b/src/net/eathena/bankhandler.h
index 3686eee94..0e890a61e 100644
--- a/src/net/eathena/bankhandler.h
+++ b/src/net/eathena/bankhandler.h
@@ -32,6 +32,8 @@ class BankHandler final : public Net::BankHandler
A_DELETE_COPY(BankHandler)
+ ~BankHandler();
+
void deposit(const int money) const override final;
void withdraw(const int money) const override final;
diff --git a/src/net/eathena/battlegroundhandler.cpp b/src/net/eathena/battlegroundhandler.cpp
index 606b90cc1..09bc28a01 100644
--- a/src/net/eathena/battlegroundhandler.cpp
+++ b/src/net/eathena/battlegroundhandler.cpp
@@ -35,6 +35,11 @@ BattleGroundHandler::BattleGroundHandler()
battleGroundHandler = this;
}
+BattleGroundHandler::~BattleGroundHandler()
+{
+ battleGroundHandler = nullptr;
+}
+
void BattleGroundHandler::registerBg(const BattleGroundTypeT &type,
const std::string &name) const
{
diff --git a/src/net/eathena/battlegroundhandler.h b/src/net/eathena/battlegroundhandler.h
index 7dca88a08..230146963 100644
--- a/src/net/eathena/battlegroundhandler.h
+++ b/src/net/eathena/battlegroundhandler.h
@@ -32,6 +32,8 @@ class BattleGroundHandler final : public Net::BattleGroundHandler
A_DELETE_COPY(BattleGroundHandler)
+ ~BattleGroundHandler();
+
void registerBg(const BattleGroundTypeT &type,
const std::string &name) const override final;
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index d87b37b3d..d53848654 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -40,6 +40,11 @@ BeingHandler::BeingHandler(const bool enableSync) :
beingHandler = this;
}
+BeingHandler::~BeingHandler()
+{
+ beingHandler = nullptr;
+}
+
void BeingHandler::requestNameById(const BeingId id) const
{
createOutPacket(CMSG_NAME_REQUEST);
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index 0574f5270..cb8f8c248 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -35,6 +35,8 @@ class BeingHandler final : public Ea::BeingHandler
A_DELETE_COPY(BeingHandler)
+ ~BeingHandler();
+
void requestNameById(const BeingId id) const override final;
void undress(Being *const being) const override final;
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
index ae2157452..c4d172b89 100644
--- a/src/net/eathena/buyingstorehandler.cpp
+++ b/src/net/eathena/buyingstorehandler.cpp
@@ -44,6 +44,11 @@ BuyingStoreHandler::BuyingStoreHandler()
buyingStoreHandler = this;
}
+BuyingStoreHandler::~BuyingStoreHandler()
+{
+ buyingStoreHandler = nullptr;
+}
+
void BuyingStoreHandler::create(const std::string &name,
const int maxMoney,
const bool flag,
diff --git a/src/net/eathena/buyingstorehandler.h b/src/net/eathena/buyingstorehandler.h
index 61b412bd6..8aed152c9 100644
--- a/src/net/eathena/buyingstorehandler.h
+++ b/src/net/eathena/buyingstorehandler.h
@@ -32,6 +32,8 @@ class BuyingStoreHandler final : public Net::BuyingStoreHandler
A_DELETE_COPY(BuyingStoreHandler)
+ ~BuyingStoreHandler();
+
void create(const std::string &name,
const int maxMoney,
const bool flag,
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 19d555ff3..6858f0808 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -41,6 +41,11 @@ BuySellHandler::BuySellHandler() :
Ea::BuySellRecv::mBuyDialog = nullptr;
}
+BuySellHandler::~BuySellHandler()
+{
+ buySellHandler = nullptr;
+}
+
void BuySellHandler::requestSellList(const std::string &nick A_UNUSED) const
{
}
diff --git a/src/net/eathena/buysellhandler.h b/src/net/eathena/buysellhandler.h
index 22a717424..b7aea35c7 100644
--- a/src/net/eathena/buysellhandler.h
+++ b/src/net/eathena/buysellhandler.h
@@ -35,6 +35,8 @@ class BuySellHandler final : public Ea::BuySellHandler
A_DELETE_COPY(BuySellHandler)
+ ~BuySellHandler();
+
void requestSellList(const std::string &nick)
const override final A_CONST;
diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp
index c693cb1f0..2e1e9cde4 100644
--- a/src/net/eathena/cashshophandler.cpp
+++ b/src/net/eathena/cashshophandler.cpp
@@ -42,6 +42,11 @@ CashShopHandler::CashShopHandler() :
CashShopRecv::mBuyDialog = nullptr;
}
+CashShopHandler::~CashShopHandler()
+{
+ cashShopHandler = nullptr;
+}
+
void CashShopHandler::buyItem(const int points,
const int itemId,
const ItemColor color A_UNUSED,
diff --git a/src/net/eathena/cashshophandler.h b/src/net/eathena/cashshophandler.h
index 8adfec064..7294b5cae 100644
--- a/src/net/eathena/cashshophandler.h
+++ b/src/net/eathena/cashshophandler.h
@@ -32,6 +32,8 @@ class CashShopHandler final : public Net::CashShopHandler
A_DELETE_COPY(CashShopHandler)
+ ~CashShopHandler();
+
void buyItem(const int points,
const int itemId,
const ItemColor color,
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index f9cd6729d..18273de0a 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -58,6 +58,11 @@ CharServerHandler::CharServerHandler() :
charServerHandler = this;
}
+CharServerHandler::~CharServerHandler()
+{
+ charServerHandler = nullptr;
+}
+
void CharServerHandler::chooseCharacter(Net::Character *const character) const
{
if (character == nullptr)
diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h
index 20b467120..cef8f868e 100644
--- a/src/net/eathena/charserverhandler.h
+++ b/src/net/eathena/charserverhandler.h
@@ -38,6 +38,8 @@ class CharServerHandler final : public Ea::CharServerHandler
A_DELETE_COPY(CharServerHandler)
+ ~CharServerHandler();
+
void chooseCharacter(Net::Character *const character) const
override final;
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 0b630ee63..6b8e0517b 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -49,6 +49,11 @@ ChatHandler::ChatHandler() :
chatHandler = this;
}
+ChatHandler::~ChatHandler()
+{
+ chatHandler = nullptr;
+}
+
void ChatHandler::talk(const std::string &restrict text,
const std::string &restrict channel A_UNUSED) const
{
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 6ed4dac0c..685327cd3 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -36,6 +36,8 @@ class ChatHandler final : public Ea::ChatHandler
A_DELETE_COPY(ChatHandler)
+ ~ChatHandler();
+
void talk(const std::string &restrict text,
const std::string &restrict channel) const override final;
diff --git a/src/net/eathena/elementalhandler.cpp b/src/net/eathena/elementalhandler.cpp
index cc27fc39b..8a8fa56bb 100644
--- a/src/net/eathena/elementalhandler.cpp
+++ b/src/net/eathena/elementalhandler.cpp
@@ -31,4 +31,9 @@ ElementalHandler::ElementalHandler() :
elementalHandler = this;
}
+ElementalHandler::~ElementalHandler()
+{
+ elementalHandler = nullptr;
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/elementalhandler.h b/src/net/eathena/elementalhandler.h
index 12b889959..517b74a30 100644
--- a/src/net/eathena/elementalhandler.h
+++ b/src/net/eathena/elementalhandler.h
@@ -31,6 +31,8 @@ class ElementalHandler final : public Net::ElementalHandler
ElementalHandler();
A_DELETE_COPY(ElementalHandler)
+
+ ~ElementalHandler();
};
} // namespace EAthena
diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp
index e475503f0..5ec423ce5 100644
--- a/src/net/eathena/familyhandler.cpp
+++ b/src/net/eathena/familyhandler.cpp
@@ -40,6 +40,11 @@ FamilyHandler::FamilyHandler() :
familyHandler = this;
}
+FamilyHandler::~FamilyHandler()
+{
+ familyHandler = nullptr;
+}
+
void FamilyHandler::askForChild(const Being *const being) const
{
if (being == nullptr)
diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h
index bd40a5610..91531fb2d 100644
--- a/src/net/eathena/familyhandler.h
+++ b/src/net/eathena/familyhandler.h
@@ -32,6 +32,8 @@ class FamilyHandler final : public Net::FamilyHandler
A_DELETE_COPY(FamilyHandler)
+ ~FamilyHandler();
+
void askForChild(const Being *const being) const override final;
void askForChildReply(const bool accept) const override final;
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp
index e18f179bf..000ea909d 100644
--- a/src/net/eathena/friendshandler.cpp
+++ b/src/net/eathena/friendshandler.cpp
@@ -33,6 +33,11 @@ FriendsHandler::FriendsHandler()
friendsHandler = this;
}
+FriendsHandler::~FriendsHandler()
+{
+ friendsHandler = nullptr;
+}
+
void FriendsHandler::invite(const std::string &name) const
{
createOutPacket(CMSG_FRIENDS_ADD_PLAYER);
diff --git a/src/net/eathena/friendshandler.h b/src/net/eathena/friendshandler.h
index 47de5a35a..7b985e0ca 100644
--- a/src/net/eathena/friendshandler.h
+++ b/src/net/eathena/friendshandler.h
@@ -32,6 +32,8 @@ class FriendsHandler final : public Net::FriendsHandler
A_DELETE_COPY(FriendsHandler)
+ ~FriendsHandler();
+
void invite(const std::string &name) const override final;
void inviteResponse(const int accountId,
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index ca7fdf81a..1878e2298 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -52,6 +52,11 @@ GameHandler::GameHandler() :
gameHandler = this;
}
+GameHandler::~GameHandler()
+{
+ gameHandler = nullptr;
+}
+
void GameHandler::mapLoadedEvent() const
{
createOutPacket(CMSG_MAP_LOADED);
diff --git a/src/net/eathena/gamehandler.h b/src/net/eathena/gamehandler.h
index 76466db94..4b2725a2f 100644
--- a/src/net/eathena/gamehandler.h
+++ b/src/net/eathena/gamehandler.h
@@ -35,6 +35,8 @@ class GameHandler final : public Ea::GameHandler
A_DELETE_COPY(GameHandler)
+ ~GameHandler();
+
void connect() const override final;
bool isConnected() const override final A_WARN_UNUSED;
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 71187cac7..9758b8a7d 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -117,6 +117,41 @@ GeneralHandler::GeneralHandler() :
GeneralHandler::~GeneralHandler()
{
delete2(Network::mInstance);
+
+ delete2(mAdminHandler);
+ delete2(mBeingHandler);
+ delete2(mBuySellHandler);
+ delete2(mCharServerHandler);
+ delete2(mChatHandler);
+ delete2(mGameHandler);
+ delete2(mGuildHandler);
+ delete2(mInventoryHandler);
+ delete2(mItemHandler);
+ delete2(mLoginHandler);
+ delete2(mNpcHandler);
+ delete2(mPartyHandler);
+ delete2(mPetHandler);
+ delete2(mPlayerHandler);
+ delete2(mSkillHandler);
+ delete2(mTradeHandler);
+ delete2(mQuestHandler);
+ delete2(mServerFeatures);
+ delete2(mMailHandler);
+ delete2(mAuctionHandler);
+ delete2(mCashShopHandler);
+ delete2(mFamilyHandler);
+ delete2(mBankHandler);
+ delete2(mBattleGroundHandler);
+ delete2(mMercenaryHandler);
+ delete2(mBuyingStoreHandler);
+ delete2(mHomunculusHandler);
+ delete2(mFriendsHandler);
+ delete2(mElementalHandler);
+ delete2(mMapHandler);
+ delete2(mMarketHandler);
+ delete2(mVendingHandler);
+ delete2(mRouletteHandler);
+ delete2(mSearchStoreHandler);
}
void GeneralHandler::load() const
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 178a628fc..b55918f85 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -53,6 +53,8 @@ GuildHandler::GuildHandler() :
GuildHandler::~GuildHandler()
{
delete2(guildTab);
+ guildHandler = nullptr;
+ taGuild = nullptr;
}
void GuildHandler::clear() const
diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp
index 482d29bce..3a3021387 100644
--- a/src/net/eathena/homunculushandler.cpp
+++ b/src/net/eathena/homunculushandler.cpp
@@ -39,6 +39,11 @@ HomunculusHandler::HomunculusHandler()
homunculusHandler = this;
}
+HomunculusHandler::~HomunculusHandler()
+{
+ homunculusHandler = nullptr;
+}
+
void HomunculusHandler::setName(const std::string &name) const
{
createOutPacket(CMSG_HOMUNCULUS_SET_NAME);
diff --git a/src/net/eathena/homunculushandler.h b/src/net/eathena/homunculushandler.h
index 868f22e89..817c6ee75 100644
--- a/src/net/eathena/homunculushandler.h
+++ b/src/net/eathena/homunculushandler.h
@@ -32,6 +32,8 @@ class HomunculusHandler final : public Net::HomunculusHandler
A_DELETE_COPY(HomunculusHandler)
+ ~HomunculusHandler();
+
void setName(const std::string &name) const override final;
void moveToMaster() const override final;
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index ed9296a8b..f59dc4c6c 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -77,6 +77,7 @@ InventoryHandler::InventoryHandler() :
InventoryHandler::~InventoryHandler()
{
+ inventoryHandler = nullptr;
}
void InventoryHandler::equipItem(const Item *const item) const
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index 1c8e25e69..35a8cf77f 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -48,6 +48,7 @@ LoginHandler::LoginHandler() :
LoginHandler::~LoginHandler()
{
+ loginHandler = nullptr;
}
void LoginHandler::connect() const
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp
index 4ecbfdda4..44edeb5bd 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -35,6 +35,11 @@ MailHandler::MailHandler()
mailHandler = this;
}
+MailHandler::~MailHandler()
+{
+ mailHandler = nullptr;
+}
+
void MailHandler::refresh() const
{
createOutPacket(CMSG_MAIL_REFRESH_INBOX);
diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h
index e7bd13004..4d55238a6 100644
--- a/src/net/eathena/mailhandler.h
+++ b/src/net/eathena/mailhandler.h
@@ -33,6 +33,8 @@ class MailHandler final : public Net::MailHandler
A_DELETE_COPY(MailHandler)
+ ~MailHandler();
+
void refresh() const override final;
void readMessage(const int msgId) const override final;
diff --git a/src/net/eathena/maphandler.cpp b/src/net/eathena/maphandler.cpp
index 042f87778..b16fc664f 100644
--- a/src/net/eathena/maphandler.cpp
+++ b/src/net/eathena/maphandler.cpp
@@ -31,4 +31,9 @@ MapHandler::MapHandler() :
mapHandler = this;
}
+MapHandler::~MapHandler()
+{
+ mapHandler = nullptr;
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/maphandler.h b/src/net/eathena/maphandler.h
index 432039209..d9da12ded 100644
--- a/src/net/eathena/maphandler.h
+++ b/src/net/eathena/maphandler.h
@@ -38,14 +38,7 @@ class MapHandler final : public Net::MapHandler
A_DELETE_COPY(MapHandler)
- protected:
- void processInstanceStart(Net::MessageIn &msg);
-
- void processInstanceCreate(Net::MessageIn &msg);
-
- void processInstanceInfo(Net::MessageIn &msg);
-
- void processInstanceDelete(Net::MessageIn &msg);
+ ~MapHandler();
};
} // namespace EAthena
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp
index 98b8b5d9f..46bf44027 100644
--- a/src/net/eathena/markethandler.cpp
+++ b/src/net/eathena/markethandler.cpp
@@ -42,6 +42,11 @@ MarketHandler::MarketHandler() :
MarketRecv::mBuyDialog = nullptr;
}
+MarketHandler::~MarketHandler()
+{
+ marketHandler = nullptr;
+}
+
void MarketHandler::close() const
{
if (packetVersion < 20131218)
diff --git a/src/net/eathena/markethandler.h b/src/net/eathena/markethandler.h
index 8fe2c4bfb..c06018c0b 100644
--- a/src/net/eathena/markethandler.h
+++ b/src/net/eathena/markethandler.h
@@ -33,6 +33,8 @@ class MarketHandler final : public Net::MarketHandler
A_DELETE_COPY(MarketHandler)
+ ~MarketHandler();
+
void close() const override final;
void buyItem(const int itemId,
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp
index 0159a5cbd..ffb1b5b2c 100644
--- a/src/net/eathena/mercenaryhandler.cpp
+++ b/src/net/eathena/mercenaryhandler.cpp
@@ -37,6 +37,11 @@ MercenaryHandler::MercenaryHandler()
mercenaryHandler = this;
}
+MercenaryHandler::~MercenaryHandler()
+{
+ mercenaryHandler = nullptr;
+}
+
void MercenaryHandler::fire() const
{
createOutPacket(CMSG_MERCENARY_ACTION);
diff --git a/src/net/eathena/mercenaryhandler.h b/src/net/eathena/mercenaryhandler.h
index 05a5363e4..bd5e06b14 100644
--- a/src/net/eathena/mercenaryhandler.h
+++ b/src/net/eathena/mercenaryhandler.h
@@ -32,6 +32,8 @@ class MercenaryHandler final : public Net::MercenaryHandler
A_DELETE_COPY(MercenaryHandler)
+ ~MercenaryHandler();
+
void fire() const override final;
void moveToMaster() const override final;
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 65e05e866..50d076ec4 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -56,6 +56,11 @@ NpcHandler::NpcHandler() :
npcHandler = this;
}
+NpcHandler::~NpcHandler()
+{
+ npcHandler = nullptr;
+}
+
void NpcHandler::talk(const Being *const being) const
{
if (being == nullptr)
diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h
index f1f259718..e5177d7c9 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -35,6 +35,8 @@ class NpcHandler final : public Ea::NpcHandler
A_DELETE_COPY(NpcHandler)
+ ~NpcHandler();
+
void talk(const Being *const being) const override final;
void nextDialog(const BeingId npcId) const override final;
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index 7f59ec4db..bc3bcfb83 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -50,6 +50,7 @@ PartyHandler::PartyHandler() :
PartyHandler::~PartyHandler()
{
+ partyHandler = nullptr;
}
void PartyHandler::create(const std::string &name) const
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 043acbedc..28624e285 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -37,6 +37,11 @@ PetHandler::PetHandler()
petHandler = this;
}
+PetHandler::~PetHandler()
+{
+ petHandler = nullptr;
+}
+
void PetHandler::move(const int x,
const int y) const
{
diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h
index 449daac43..9785ade7d 100644
--- a/src/net/eathena/pethandler.h
+++ b/src/net/eathena/pethandler.h
@@ -33,6 +33,8 @@ class PetHandler final : public Net::PetHandler
A_DELETE_COPY(PetHandler)
+ ~PetHandler();
+
void move(const int x,
const int y) const override final;
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 02c56c869..4c728fb2f 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -56,6 +56,11 @@ PlayerHandler::PlayerHandler() :
playerHandler = this;
}
+PlayerHandler::~PlayerHandler()
+{
+ playerHandler = nullptr;
+}
+
void PlayerHandler::attack(const BeingId id,
const Keep keep) const
{
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index 683e761b9..1b000025c 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -35,6 +35,8 @@ class PlayerHandler final : public Ea::PlayerHandler
A_DELETE_COPY(PlayerHandler)
+ ~PlayerHandler();
+
void attack(const BeingId id,
const Keep keep) const override final;
void stopAttack() const override final;
diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp
index 6af26f4fe..0db26ebf4 100644
--- a/src/net/eathena/questhandler.cpp
+++ b/src/net/eathena/questhandler.cpp
@@ -34,6 +34,11 @@ QuestHandler::QuestHandler() :
questHandler = this;
}
+QuestHandler::~QuestHandler()
+{
+ questHandler = nullptr;
+}
+
void QuestHandler::setQeustActiveState(const int questId,
const bool active) const
{
diff --git a/src/net/eathena/questhandler.h b/src/net/eathena/questhandler.h
index 5b857d384..2c5f18b67 100644
--- a/src/net/eathena/questhandler.h
+++ b/src/net/eathena/questhandler.h
@@ -33,6 +33,8 @@ class QuestHandler final : public Net::QuestHandler
A_DELETE_COPY(QuestHandler)
+ ~QuestHandler();
+
void setQeustActiveState(const int questId,
const bool active) const override final;
};
diff --git a/src/net/eathena/roulettehandler.cpp b/src/net/eathena/roulettehandler.cpp
index 6e107af38..b0d9d2829 100644
--- a/src/net/eathena/roulettehandler.cpp
+++ b/src/net/eathena/roulettehandler.cpp
@@ -31,4 +31,9 @@ RouletteHandler::RouletteHandler() :
rouletteHandler = this;
}
+RouletteHandler::~RouletteHandler()
+{
+ rouletteHandler = nullptr;
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/roulettehandler.h b/src/net/eathena/roulettehandler.h
index 09d5d94d7..861f54582 100644
--- a/src/net/eathena/roulettehandler.h
+++ b/src/net/eathena/roulettehandler.h
@@ -31,6 +31,8 @@ class RouletteHandler final : public Net::RouletteHandler
RouletteHandler();
A_DELETE_COPY(RouletteHandler)
+
+ ~RouletteHandler();
};
} // namespace EAthena
diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp
index d9b4625cc..c8cd43d2d 100644
--- a/src/net/eathena/searchstorehandler.cpp
+++ b/src/net/eathena/searchstorehandler.cpp
@@ -36,6 +36,11 @@ SearchStoreHandler::SearchStoreHandler() :
searchStoreHandler = this;
}
+SearchStoreHandler::~SearchStoreHandler()
+{
+ searchStoreHandler = nullptr;
+}
+
void SearchStoreHandler::search(const StoreSearchTypeT type,
const int minPrice,
const int maxPrice,
diff --git a/src/net/eathena/searchstorehandler.h b/src/net/eathena/searchstorehandler.h
index 151086a0d..5e425e6e5 100644
--- a/src/net/eathena/searchstorehandler.h
+++ b/src/net/eathena/searchstorehandler.h
@@ -32,6 +32,8 @@ class SearchStoreHandler final : public Net::SearchStoreHandler
A_DELETE_COPY(SearchStoreHandler)
+ ~SearchStoreHandler();
+
void search(const StoreSearchTypeT type,
const int minPrice,
const int maxPrice,
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index f3acb257f..ec8176eef 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -39,6 +39,11 @@ SkillHandler::SkillHandler() :
skillHandler = this;
}
+SkillHandler::~SkillHandler()
+{
+ skillHandler = nullptr;
+}
+
void SkillHandler::useBeing(const int id, const int level,
const BeingId beingId) const
{
diff --git a/src/net/eathena/skillhandler.h b/src/net/eathena/skillhandler.h
index 63ef06619..d615dac77 100644
--- a/src/net/eathena/skillhandler.h
+++ b/src/net/eathena/skillhandler.h
@@ -35,6 +35,8 @@ class SkillHandler final : public Ea::SkillHandler
A_DELETE_COPY(SkillHandler)
+ ~SkillHandler();
+
void useBeing(const int id,
const int level,
const BeingId beingId) const override final;
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp
index 94ea4fb9d..5c6877f5e 100644
--- a/src/net/eathena/tradehandler.cpp
+++ b/src/net/eathena/tradehandler.cpp
@@ -36,6 +36,7 @@
namespace EAthena
{
+
TradeHandler::TradeHandler() :
Ea::TradeHandler()
{
@@ -44,6 +45,11 @@ TradeHandler::TradeHandler() :
TradeRecv::mQuantity = 0;
}
+TradeHandler::~TradeHandler()
+{
+ tradeHandler = nullptr;
+}
+
void TradeHandler::request(const Being *const being) const
{
if (being == nullptr)
diff --git a/src/net/eathena/tradehandler.h b/src/net/eathena/tradehandler.h
index 5934544ea..0bf5b2eb2 100644
--- a/src/net/eathena/tradehandler.h
+++ b/src/net/eathena/tradehandler.h
@@ -35,6 +35,8 @@ class TradeHandler final : public Ea::TradeHandler
A_DELETE_COPY(TradeHandler)
+ ~TradeHandler();
+
void request(const Being *const being) const override final;
void respond(const bool accept) const override final;
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index c5791cfd5..73fa5d12b 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -44,6 +44,11 @@ VendingHandler::VendingHandler()
VendingRecv::mBuyDialog = nullptr;
}
+VendingHandler::~VendingHandler()
+{
+ vendingHandler = nullptr;
+}
+
void VendingHandler::close() const
{
createOutPacket(CMSG_VENDING_CLOSE);
diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h
index d8d3948f6..7929a6d19 100644
--- a/src/net/eathena/vendinghandler.h
+++ b/src/net/eathena/vendinghandler.h
@@ -32,6 +32,8 @@ class VendingHandler final : public Net::VendingHandler
A_DELETE_COPY(VendingHandler)
+ ~VendingHandler();
+
void close() const override final;
void open(const Being *const being) const override final;