summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-18 21:52:15 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-18 21:52:15 +0300
commit78744020528ef6231e1606bbe2e8c53011c77935 (patch)
tree3055821a8dabab37c660fdc3b99309f970158b69 /src/net/ea
parentc0d5142d1ed98b62ad87603fa9d2620dce256bd7 (diff)
downloadmv-78744020528ef6231e1606bbe2e8c53011c77935.tar.gz
mv-78744020528ef6231e1606bbe2e8c53011c77935.tar.bz2
mv-78744020528ef6231e1606bbe2e8c53011c77935.tar.xz
mv-78744020528ef6231e1606bbe2e8c53011c77935.zip
add const to net classes.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/adminhandler.cpp3
-rw-r--r--src/net/ea/adminhandler.h8
-rw-r--r--src/net/ea/itemhandler.cpp6
-rw-r--r--src/net/ea/itemhandler.h6
-rw-r--r--src/net/ea/partyhandler.cpp2
-rw-r--r--src/net/ea/partyhandler.h2
-rw-r--r--src/net/ea/tradehandler.cpp14
-rw-r--r--src/net/ea/tradehandler.h14
8 files changed, 28 insertions, 27 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp
index 583239f0c..36a08bc4c 100644
--- a/src/net/ea/adminhandler.cpp
+++ b/src/net/ea/adminhandler.cpp
@@ -93,7 +93,8 @@ void AdminHandler::ipcheckName(const std::string &name) const
Net::getChatHandler()->talk("@ipcheck " + name, GENERAL_CHANNEL);
}
-void AdminHandler::createItems(const int id, const int color, const int amount)
+void AdminHandler::createItems(const int id, const int color,
+ const int amount) const
{
if (serverVersion < 1)
{
diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h
index f32c02ffd..8a2697584 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/ea/adminhandler.h
@@ -59,14 +59,14 @@ class AdminHandler : public Net::AdminHandler
void gotoName(const std::string &name) const;
- void recallName(const std::string &name) const;
+ void recallName(const std::string &name) const override;
- void reviveName(const std::string &name) const;
+ void reviveName(const std::string &name) const override;
- void ipcheckName(const std::string &name) const;
+ void ipcheckName(const std::string &name) const override;
void createItems(const int id, const int color,
- const int amount);
+ const int amount) const override;
};
} // namespace Ea
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
index aafe6fc4b..9c9a74b2d 100644
--- a/src/net/ea/itemhandler.cpp
+++ b/src/net/ea/itemhandler.cpp
@@ -37,7 +37,7 @@ ItemHandler::~ItemHandler()
{
}
-void ItemHandler::processItemVisible(Net::MessageIn &msg)
+void ItemHandler::processItemVisible(Net::MessageIn &msg) const
{
const int id = msg.readInt32();
const int itemId = msg.readInt16();
@@ -55,7 +55,7 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg)
}
}
-void ItemHandler::processItemDropped(Net::MessageIn &msg)
+void ItemHandler::processItemDropped(Net::MessageIn &msg) const
{
const int id = msg.readInt32();
const int itemId = msg.readInt16();
@@ -73,7 +73,7 @@ void ItemHandler::processItemDropped(Net::MessageIn &msg)
}
}
-void ItemHandler::processItemRemove(Net::MessageIn &msg)
+void ItemHandler::processItemRemove(Net::MessageIn &msg) const
{
if (actorSpriteManager)
{
diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h
index 8847090f6..ec45cfba3 100644
--- a/src/net/ea/itemhandler.h
+++ b/src/net/ea/itemhandler.h
@@ -37,11 +37,11 @@ class ItemHandler
virtual ~ItemHandler();
- void processItemVisible(Net::MessageIn &msg);
+ void processItemVisible(Net::MessageIn &msg) const;
- void processItemRemove(Net::MessageIn &msg);
+ void processItemRemove(Net::MessageIn &msg) const;
- void processItemDropped(Net::MessageIn &msg);
+ void processItemDropped(Net::MessageIn &msg) const;
};
} // namespace Ea
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 8bb8b6a8a..b7353be26 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -431,7 +431,7 @@ void PartyHandler::processPartyMessage(Net::MessageIn &msg) const
}
}
-ChatTab *PartyHandler::getTab()
+ChatTab *PartyHandler::getTab() const
{
return partyTab;
}
diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h
index 4b829f73e..ced44a426 100644
--- a/src/net/ea/partyhandler.h
+++ b/src/net/ea/partyhandler.h
@@ -53,7 +53,7 @@ class PartyHandler : public Net::PartyHandler
void clear() const override;
- ChatTab *getTab() override;
+ ChatTab *getTab() const override;
virtual void processPartyCreate(Net::MessageIn &msg) const;
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 77f71d75a..3e1e5c5b3 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -75,7 +75,7 @@ void TradeHandler::removeItem(const int slotNum A_UNUSED,
{
}
-void TradeHandler::processTradeRequest(Net::MessageIn &msg)
+void TradeHandler::processTradeRequest(Net::MessageIn &msg) const
{
// If a trade window or request window is already open, send a
// trade cancel to any other trade request.
@@ -123,7 +123,7 @@ void TradeHandler::processTradeRequest(Net::MessageIn &msg)
}
}
-void TradeHandler::processTradeResponse(Net::MessageIn &msg)
+void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
{
if (confirmDlg || tradePartnerName.empty()
|| !player_relations.hasPermission(tradePartnerName,
@@ -182,7 +182,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg)
}
}
-void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
+void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) const
{
const int amount = msg.readInt32();
const int type = msg.readInt16();
@@ -205,7 +205,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
}
}
-void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
+void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) const
{
// Trade: New Item add response (was 0x00ea, now 01b1)
const int index = msg.readInt16() - INVENTORY_OFFSET;
@@ -258,7 +258,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
}
}
-void TradeHandler::processTradeOk(Net::MessageIn &msg)
+void TradeHandler::processTradeOk(Net::MessageIn &msg) const
{
// 0 means ok from myself, 1 means ok from other;
if (tradeWindow)
@@ -267,7 +267,7 @@ void TradeHandler::processTradeOk(Net::MessageIn &msg)
msg.readInt8();
}
-void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED)
+void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED) const
{
NotifyManager::notify(NotifyManager::TRADE_CANCELLED);
if (tradeWindow)
@@ -278,7 +278,7 @@ void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED)
PlayerInfo::setTrading(false);
}
-void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED)
+void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED) const
{
NotifyManager::notify(NotifyManager::TRADE_COMPLETE);
if (tradeWindow)
diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h
index 98dbd8383..31d0c2c76 100644
--- a/src/net/ea/tradehandler.h
+++ b/src/net/ea/tradehandler.h
@@ -38,19 +38,19 @@ class TradeHandler : public Net::TradeHandler
void removeItem(const int slotNum, const int amount) const override;
- void processTradeRequest(Net::MessageIn &msg);
+ void processTradeRequest(Net::MessageIn &msg) const;
- void processTradeResponse(Net::MessageIn &msg);
+ void processTradeResponse(Net::MessageIn &msg) const;
- void processTradeItemAdd(Net::MessageIn &msg);
+ void processTradeItemAdd(Net::MessageIn &msg) const;
- void processTradeItemAddResponse(Net::MessageIn &msg);
+ void processTradeItemAddResponse(Net::MessageIn &msg) const;
- void processTradeOk(Net::MessageIn &msg);
+ void processTradeOk(Net::MessageIn &msg) const;
- void processTradeCancel(Net::MessageIn &msg);
+ void processTradeCancel(Net::MessageIn &msg) const;
- void processTradeComplete(Net::MessageIn &msg);
+ void processTradeComplete(Net::MessageIn &msg) const;
};
} // namespace Ea