summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-02 12:47:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-02 12:47:16 +0300
commit05f6f3e94abc5c1e1801d62100cef494e2711474 (patch)
treed3ee874dd7fa9c6b6170cae8435ea7f18eb1f102 /src/net/ea
parent11caa7aeeb3a7b40823da8573576d2354b7504b5 (diff)
downloadmanaverse-05f6f3e94abc5c1e1801d62100cef494e2711474.tar.gz
manaverse-05f6f3e94abc5c1e1801d62100cef494e2711474.tar.bz2
manaverse-05f6f3e94abc5c1e1801d62100cef494e2711474.tar.xz
manaverse-05f6f3e94abc5c1e1801d62100cef494e2711474.zip
Add missing const and static into net classes.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/gui/guildtab.cpp11
-rw-r--r--src/net/ea/gui/partytab.cpp5
-rw-r--r--src/net/ea/inventoryhandler.cpp6
-rw-r--r--src/net/ea/inventoryhandler.h6
-rw-r--r--src/net/ea/itemhandler.cpp6
-rw-r--r--src/net/ea/itemhandler.h6
-rw-r--r--src/net/ea/playerhandler.cpp18
-rw-r--r--src/net/ea/playerhandler.h18
-rw-r--r--src/net/ea/skillhandler.cpp6
-rw-r--r--src/net/ea/skillhandler.h6
-rw-r--r--src/net/ea/tradehandler.cpp10
-rw-r--r--src/net/ea/tradehandler.h10
12 files changed, 49 insertions, 59 deletions
diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp
index 6a801bba4..5a8c78c60 100644
--- a/src/net/ea/gui/guildtab.cpp
+++ b/src/net/ea/gui/guildtab.cpp
@@ -127,15 +127,8 @@ void GuildTab::handleInput(const std::string &msg)
if (!taGuild)
return;
- if (chatWindow)
- {
- Net::getGuildHandler()->chat(taGuild->getId(),
- chatWindow->doReplace(msg));
- }
- else
- {
- Net::getGuildHandler()->chat(taGuild->getId(), msg);
- }
+ Net::getGuildHandler()->chat(taGuild->getId(),
+ ChatWindow::doReplace(msg));
}
void GuildTab::showHelp()
diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp
index 76e204205..4a59e89b7 100644
--- a/src/net/ea/gui/partytab.cpp
+++ b/src/net/ea/gui/partytab.cpp
@@ -64,10 +64,7 @@ PartyTab::~PartyTab()
void PartyTab::handleInput(const std::string &msg)
{
- if (chatWindow)
- Net::getPartyHandler()->chat(chatWindow->doReplace(msg));
- else
- Net::getPartyHandler()->chat(msg);
+ Net::getPartyHandler()->chat(ChatWindow::doReplace(msg));
}
void PartyTab::showHelp()
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 94b81adb0..74f0a4ba7 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -337,7 +337,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
}
}
-void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg) const
+void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg)
{
Inventory *const inventory = player_node
? PlayerInfo::getInventory() : nullptr;
@@ -357,7 +357,7 @@ void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg) const
}
}
-void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg) const
+void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg)
{
Inventory *const inventory = player_node
? PlayerInfo::getInventory() : nullptr;
@@ -380,7 +380,7 @@ void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg) const
}
}
-void InventoryHandler::processItemUseResponse(Net::MessageIn &msg) const
+void InventoryHandler::processItemUseResponse(Net::MessageIn &msg)
{
Inventory *const inventory = player_node
? PlayerInfo::getInventory() : nullptr;
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index eea4dde12..6e8ecec38 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -180,11 +180,11 @@ class InventoryHandler : public Net::InventoryHandler
void processPlayerInventoryAdd(Net::MessageIn &msg);
- void processPlayerInventoryRemove(Net::MessageIn &msg) const;
+ static void processPlayerInventoryRemove(Net::MessageIn &msg);
- void processPlayerInventoryUse(Net::MessageIn &msg) const;
+ static void processPlayerInventoryUse(Net::MessageIn &msg);
- void processItemUseResponse(Net::MessageIn &msg) const;
+ static void processItemUseResponse(Net::MessageIn &msg);
void processPlayerStorageStatus(Net::MessageIn &msg);
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
index aaab0ca3e..9ce85a59b 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) const
+void ItemHandler::processItemVisible(Net::MessageIn &msg)
{
const int id = msg.readInt32();
const int itemId = msg.readInt16();
@@ -55,7 +55,7 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg) const
}
}
-void ItemHandler::processItemDropped(Net::MessageIn &msg) const
+void ItemHandler::processItemDropped(Net::MessageIn &msg)
{
const int id = msg.readInt32();
const int itemId = msg.readInt16();
@@ -73,7 +73,7 @@ void ItemHandler::processItemDropped(Net::MessageIn &msg) const
}
}
-void ItemHandler::processItemRemove(Net::MessageIn &msg) const
+void ItemHandler::processItemRemove(Net::MessageIn &msg)
{
if (actorManager)
{
diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h
index 8b07789f9..6bc23fb10 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) const;
+ static void processItemVisible(Net::MessageIn &msg);
- void processItemRemove(Net::MessageIn &msg) const;
+ static void processItemRemove(Net::MessageIn &msg);
- void processItemDropped(Net::MessageIn &msg) const;
+ static void processItemDropped(Net::MessageIn &msg);
};
} // namespace Ea
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index c6d20573d..3e5db9169 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -124,7 +124,7 @@ Vector PlayerHandler::getDefaultWalkSpeed() const
return Vector(150, 150, 0);
}
-void PlayerHandler::processWalkResponse(Net::MessageIn &msg) const
+void PlayerHandler::processWalkResponse(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processWalkResponse")
/*
@@ -140,7 +140,7 @@ void PlayerHandler::processWalkResponse(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processWalkResponse")
}
-void PlayerHandler::processPlayerWarp(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerWarp(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerWarp")
std::string mapPath = msg.readString(16);
@@ -216,7 +216,7 @@ void PlayerHandler::processPlayerWarp(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerWarp")
}
-void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate1")
const int type = msg.readInt16();
@@ -405,7 +405,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerStatUpdate1")
}
-void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate2")
const int type = msg.readInt16();
@@ -450,7 +450,7 @@ void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerStatUpdate2")
}
-void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate3")
const int type = msg.readInt32();
@@ -464,7 +464,7 @@ void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerStatUpdate3")
}
-void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate4")
const int type = msg.readInt16();
@@ -484,7 +484,7 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerStatUpdate4")
}
-void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate5")
PlayerInfo::setAttribute(PlayerInfo::CHAR_POINTS, msg.readInt16());
@@ -558,7 +558,7 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerStatUpdate5")
}
-void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate6")
const int type = msg.readInt16();
@@ -593,7 +593,7 @@ void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerStatUpdate6")
}
-void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerArrowMessage")
const int type = msg.readInt16();
diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h
index 2bac97ac1..589874e2e 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/ea/playerhandler.h
@@ -53,23 +53,23 @@ class PlayerHandler : public Net::PlayerHandler
int getAttackLocation() const override final A_WARN_UNUSED;
- void processWalkResponse(Net::MessageIn &msg) const;
+ static void processWalkResponse(Net::MessageIn &msg);
- void processPlayerWarp(Net::MessageIn &msg) const;
+ static void processPlayerWarp(Net::MessageIn &msg);
- void processPlayerStatUpdate1(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate1(Net::MessageIn &msg);
- void processPlayerStatUpdate2(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate2(Net::MessageIn &msg);
- void processPlayerStatUpdate3(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate3(Net::MessageIn &msg);
- void processPlayerStatUpdate4(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate4(Net::MessageIn &msg);
- void processPlayerStatUpdate5(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate5(Net::MessageIn &msg);
- void processPlayerStatUpdate6(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate6(Net::MessageIn &msg);
- void processPlayerArrowMessage(Net::MessageIn &msg) const;
+ static void processPlayerArrowMessage(Net::MessageIn &msg);
};
} // namespace Ea
diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp
index 3f5b38c68..3a5a1ab75 100644
--- a/src/net/ea/skillhandler.cpp
+++ b/src/net/ea/skillhandler.cpp
@@ -71,7 +71,7 @@ SkillHandler::SkillHandler()
{
}
-void SkillHandler::processPlayerSkills(Net::MessageIn &msg) const
+void SkillHandler::processPlayerSkills(Net::MessageIn &msg)
{
msg.readInt16(); // length
const int skillCount = (msg.getLength() - 4) / 37;
@@ -101,7 +101,7 @@ void SkillHandler::processPlayerSkills(Net::MessageIn &msg) const
skillDialog->playUpdateEffect(updateSkill);
}
-void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) const
+void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg)
{
const int skillId = msg.readInt16();
const int level = msg.readInt16();
@@ -119,7 +119,7 @@ void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) const
}
}
-void SkillHandler::processSkillFailed(Net::MessageIn &msg) const
+void SkillHandler::processSkillFailed(Net::MessageIn &msg)
{
// Action failed (ex. sit because you have not reached the
// right level)
diff --git a/src/net/ea/skillhandler.h b/src/net/ea/skillhandler.h
index 251388969..8dc724e0a 100644
--- a/src/net/ea/skillhandler.h
+++ b/src/net/ea/skillhandler.h
@@ -36,11 +36,11 @@ class SkillHandler : public Net::SkillHandler
A_DELETE_COPY(SkillHandler)
- void processPlayerSkills(Net::MessageIn &msg) const;
+ static void processPlayerSkills(Net::MessageIn &msg);
- void processPlayerSkillUp(Net::MessageIn &msg) const;
+ static void processPlayerSkillUp(Net::MessageIn &msg);
- void processSkillFailed(Net::MessageIn &msg) const;
+ static void processSkillFailed(Net::MessageIn &msg);
};
} // namespace Ea
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 45948f963..9457a31db 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -182,7 +182,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
}
}
-void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) const
+void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
{
const int amount = msg.readInt32();
const int type = msg.readInt16();
@@ -205,7 +205,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) const
}
}
-void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) const
+void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
{
// Trade: New Item add response (was 0x00ea, now 01b1)
const int index = msg.readInt16() - INVENTORY_OFFSET;
@@ -255,7 +255,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) const
}
}
-void TradeHandler::processTradeOk(Net::MessageIn &msg) const
+void TradeHandler::processTradeOk(Net::MessageIn &msg)
{
// 0 means ok from myself, 1 means ok from other;
if (tradeWindow)
@@ -264,7 +264,7 @@ void TradeHandler::processTradeOk(Net::MessageIn &msg) const
msg.readInt8();
}
-void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED) const
+void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED)
{
NotifyManager::notify(NotifyManager::TRADE_CANCELLED);
if (tradeWindow)
@@ -275,7 +275,7 @@ void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED) const
PlayerInfo::setTrading(false);
}
-void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED) const
+void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED)
{
NotifyManager::notify(NotifyManager::TRADE_COMPLETE);
if (tradeWindow)
diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h
index c3f759ef4..22a78e9e6 100644
--- a/src/net/ea/tradehandler.h
+++ b/src/net/ea/tradehandler.h
@@ -43,15 +43,15 @@ class TradeHandler : public Net::TradeHandler
void processTradeResponse(Net::MessageIn &msg) const;
- void processTradeItemAdd(Net::MessageIn &msg) const;
+ static void processTradeItemAdd(Net::MessageIn &msg);
- void processTradeItemAddResponse(Net::MessageIn &msg) const;
+ static void processTradeItemAddResponse(Net::MessageIn &msg);
- void processTradeOk(Net::MessageIn &msg) const;
+ static void processTradeOk(Net::MessageIn &msg);
- void processTradeCancel(Net::MessageIn &msg) const;
+ static void processTradeCancel(Net::MessageIn &msg);
- void processTradeComplete(Net::MessageIn &msg) const;
+ static void processTradeComplete(Net::MessageIn &msg);
};
} // namespace Ea