summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-06 22:41:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-07 02:07:03 +0300
commita51da75e329df773a01e963c3a27e72cf487138c (patch)
treec48d7c682be1104138dd16daa75fd12a3fcae82b /src/net
parent4f7e38d218848bd34bd86dda75446881dad2bb32 (diff)
downloadmanaplus-a51da75e329df773a01e963c3a27e72cf487138c.tar.gz
manaplus-a51da75e329df773a01e963c3a27e72cf487138c.tar.bz2
manaplus-a51da75e329df773a01e963c3a27e72cf487138c.tar.xz
manaplus-a51da75e329df773a01e963c3a27e72cf487138c.zip
fix code style.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/download.cpp8
-rw-r--r--src/net/ea/buysellhandler.cpp9
-rw-r--r--src/net/ea/chathandler.cpp19
-rw-r--r--src/net/ea/gamehandler.cpp7
-rw-r--r--src/net/ea/guildhandler.cpp32
-rw-r--r--src/net/ea/inventoryhandler.cpp7
-rw-r--r--src/net/ea/partyhandler.cpp37
-rw-r--r--src/net/ea/playerhandler.cpp13
-rw-r--r--src/net/ea/skillhandler.cpp6
-rw-r--r--src/net/ea/tradehandler.cpp27
-rw-r--r--src/net/eathena/adminhandler.cpp7
-rw-r--r--src/net/eathena/buysellhandler.cpp11
-rw-r--r--src/net/eathena/partyhandler.cpp5
-rw-r--r--src/net/tmwa/adminhandler.cpp7
-rw-r--r--src/net/tmwa/buysellhandler.cpp11
-rw-r--r--src/net/tmwa/partyhandler.cpp5
-rw-r--r--src/net/uploadcharinfo.h6
17 files changed, 122 insertions, 95 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 03e258b38..069290cde 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -569,12 +569,16 @@ void Download::secureCurl(CURL *const curl)
#endif
}
+#if CURLVERSION_ATLEAST(7, 21, 7)
void Download::addHeaders(CURL *const curl)
{
-#if CURLVERSION_ATLEAST(7, 21, 7)
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
-#endif
}
+#else
+void Download::addHeaders(CURL *const curl A_UNUSED)
+{
+}
+#endif
void Download::prepareForm(curl_httppost **form, const std::string &fileName)
{
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 47074d99c..f8871748f 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -24,7 +24,6 @@
#include "configuration.h"
#include "inventory.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/attributes.h"
@@ -42,6 +41,8 @@
#include "utils/timer.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
namespace Ea
@@ -162,7 +163,7 @@ void BuySellHandler::processNpcSell(Net::MessageIn &msg,
}
else
{
- NotifyManager::notify(NotifyManager::SELL_LIST_EMPTY);
+ NotifyManager::notify(NotifyTypes::SELL_LIST_EMPTY);
}
}
@@ -170,7 +171,7 @@ void BuySellHandler::processNpcBuyResponse(Net::MessageIn &msg) const
{
if (msg.readInt8() == 0)
{
- NotifyManager::notify(NotifyManager::BUY_DONE);
+ NotifyManager::notify(NotifyTypes::BUY_DONE);
}
else
{
@@ -178,7 +179,7 @@ void BuySellHandler::processNpcBuyResponse(Net::MessageIn &msg) const
// would go fine
if (mBuyDialog)
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
- NotifyManager::notify(NotifyManager::BUY_FAILED);
+ NotifyManager::notify(NotifyTypes::BUY_FAILED);
}
}
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 40dc15a15..5c972db6b 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -25,7 +25,6 @@
#include "actormanager.h"
#include "configuration.h"
#include "guildmanager.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/localplayer.h"
@@ -36,10 +35,12 @@
#include "gui/widgets/tabs/gmtab.h"
-#include "gui/widgets/tabs/chattab.h"
-
#include "net/messagein.h"
+#include "resources/notifytypes.h"
+
+#include "utils/gettext.h"
+
#include <string>
#include "debug.h"
@@ -423,9 +424,9 @@ void ChatHandler::processMVP(Net::MessageIn &msg) const
{
const Being *const being = actorManager->findBeing(id);
if (!being)
- NotifyManager::notify(NotifyManager::MVP_PLAYER, "");
+ NotifyManager::notify(NotifyTypes::MVP_PLAYER, "");
else
- NotifyManager::notify(NotifyManager::MVP_PLAYER, being->getName());
+ NotifyManager::notify(NotifyTypes::MVP_PLAYER, being->getName());
}
BLOCK_END("ChatHandler::processMVP")
}
@@ -448,10 +449,10 @@ void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg) const
switch (fail)
{
case 0:
- NotifyManager::notify(NotifyManager::WHISPERS_IGNORED);
+ NotifyManager::notify(NotifyTypes::WHISPERS_IGNORED);
break;
default:
- NotifyManager::notify(NotifyManager::
+ NotifyManager::notify(NotifyTypes::
WHISPERS_IGNORE_FAILED);
break;
}
@@ -462,10 +463,10 @@ void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg) const
switch (fail)
{
case 0:
- NotifyManager::notify(NotifyManager::WHISPERS_UNIGNORED);
+ NotifyManager::notify(NotifyTypes::WHISPERS_UNIGNORED);
break;
default:
- NotifyManager::notify(NotifyManager::
+ NotifyManager::notify(NotifyTypes::
WHISPERS_UNIGNORE_FAILED);
break;
}
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 3d7da6247..afebc93a1 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -24,7 +24,6 @@
#include "client.h"
#include "game.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/localplayer.h"
@@ -33,6 +32,10 @@
#include "net/messagein.h"
+#include "resources/notifytypes.h"
+
+#include "utils/gettext.h"
+
#include "debug.h"
namespace Ea
@@ -73,7 +76,7 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const
void GameHandler::processWhoAnswer(Net::MessageIn &msg) const
{
- NotifyManager::notify(NotifyManager::ONLINE_USERS, msg.readInt32());
+ NotifyManager::notify(NotifyTypes::ONLINE_USERS, msg.readInt32());
}
void GameHandler::processCharSwitchResponse(Net::MessageIn &msg) const
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index 15fa3165e..68d6a774b 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -23,7 +23,6 @@
#include "actormanager.h"
#include "configuration.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/localplayer.h"
@@ -36,6 +35,9 @@
#include "net/ea/gui/guildtab.h"
#include "utils/delete2.h"
+#include "utils/gettext.h"
+
+#include "resources/notifytypes.h"
#include "debug.h"
@@ -78,27 +80,27 @@ void GuildHandler::processGuildCreateResponse(Net::MessageIn &msg) const
{
case 0:
// Success
- NotifyManager::notify(NotifyManager::GUILD_CREATED);
+ NotifyManager::notify(NotifyTypes::GUILD_CREATED);
break;
case 1:
// Already in a guild
- NotifyManager::notify(NotifyManager::GUILD_ALREADY);
+ NotifyManager::notify(NotifyTypes::GUILD_ALREADY);
break;
case 2:
// Unable to make (likely name already in use)
- NotifyManager::notify(NotifyManager::GUILD_ALREADY);
+ NotifyManager::notify(NotifyTypes::GUILD_ALREADY);
break;
case 3:
// Emperium check failed
- NotifyManager::notify(NotifyManager::GUILD_EMPERIUM_CHECK_FAILED);
+ NotifyManager::notify(NotifyTypes::GUILD_EMPERIUM_CHECK_FAILED);
break;
default:
// Unknown response
- NotifyManager::notify(NotifyManager::GUILD_ERROR);
+ NotifyManager::notify(NotifyTypes::GUILD_ERROR);
break;
}
}
@@ -426,23 +428,23 @@ void GuildHandler::processGuildInviteAck(Net::MessageIn &msg) const
switch (flag)
{
case 0:
- NotifyManager::notify(NotifyManager::GUILD_INVITE_FAILED);
+ NotifyManager::notify(NotifyTypes::GUILD_INVITE_FAILED);
break;
case 1:
- NotifyManager::notify(NotifyManager::GUILD_INVITE_REJECTED);
+ NotifyManager::notify(NotifyTypes::GUILD_INVITE_REJECTED);
break;
case 2:
- NotifyManager::notify(NotifyManager::GUILD_INVITE_JOINED);
+ NotifyManager::notify(NotifyTypes::GUILD_INVITE_JOINED);
break;
case 3:
- NotifyManager::notify(NotifyManager::GUILD_INVITE_FULL);
+ NotifyManager::notify(NotifyTypes::GUILD_INVITE_FULL);
break;
default:
- NotifyManager::notify(NotifyManager::GUILD_INVITE_ERROR);
+ NotifyManager::notify(NotifyTypes::GUILD_INVITE_ERROR);
break;
}
}
@@ -465,7 +467,7 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) const
taGuild->removeFromMembers();
taGuild->clearMembers();
}
- NotifyManager::notify(NotifyManager::GUILD_LEFT);
+ NotifyManager::notify(NotifyTypes::GUILD_LEFT);
delete2(guildTab)
if (socialWindow && taGuild)
@@ -475,7 +477,7 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) const
}
else
{
- NotifyManager::notify(NotifyManager::GUILD_USER_LEFT, nick);
+ NotifyManager::notify(NotifyTypes::GUILD_USER_LEFT, nick);
if (actorManager)
{
Being *const b = actorManager->findBeingByName(
@@ -508,7 +510,7 @@ void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) const
taGuild->removeFromMembers();
taGuild->clearMembers();
}
- NotifyManager::notify(NotifyManager::GUILD_KICKED);
+ NotifyManager::notify(NotifyTypes::GUILD_KICKED);
delete2(guildTab)
if (socialWindow && taGuild)
@@ -518,7 +520,7 @@ void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) const
}
else
{
- NotifyManager::notify(NotifyManager::GUILD_USER_KICKED, nick);
+ NotifyManager::notify(NotifyTypes::GUILD_USER_KICKED, nick);
if (actorManager)
{
Being *const b = actorManager->findBeingByName(
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 21ad9139a..a508460d4 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -22,7 +22,6 @@
#include "net/ea/inventoryhandler.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/attributes.h"
@@ -37,6 +36,8 @@
#include "listeners/arrowslistener.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
extern int serverVersion;
@@ -394,7 +395,7 @@ void InventoryHandler::processItemUseResponse(Net::MessageIn &msg)
if (msg.readInt8() == 0)
{
- NotifyManager::notify(NotifyManager::USE_FAILED);
+ NotifyManager::notify(NotifyTypes::USE_FAILED);
}
else
{
@@ -555,7 +556,7 @@ void InventoryHandler::processPlayerEquip(Net::MessageIn &msg)
const int flag = msg.readInt8();
if (!flag)
- NotifyManager::notify(NotifyManager::EQUIP_FAILED);
+ NotifyManager::notify(NotifyTypes::EQUIP_FAILED);
else
mEquips.setEquipment(getSlot(equipType), index);
}
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index be672f760..8ba78cd91 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -23,7 +23,6 @@
#include "actormanager.h"
#include "configuration.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "party.h"
@@ -38,6 +37,8 @@
#include "utils/delete2.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
namespace Ea
@@ -75,9 +76,9 @@ void PartyHandler::clear() const
void PartyHandler::processPartyCreate(Net::MessageIn &msg) const
{
if (msg.readInt8())
- NotifyManager::notify(NotifyManager::PARTY_CREATE_FAILED);
+ NotifyManager::notify(NotifyTypes::PARTY_CREATE_FAILED);
else
- NotifyManager::notify(NotifyManager::PARTY_CREATED);
+ NotifyManager::notify(NotifyTypes::PARTY_CREATED);
}
void PartyHandler::processPartyInfo(Net::MessageIn &msg) const
@@ -139,7 +140,7 @@ void PartyHandler::processPartyInfo(Net::MessageIn &msg) const
{
if (names.find(nick) == names.end())
{
- NotifyManager::notify(NotifyManager::PARTY_USER_JOINED,
+ NotifyManager::notify(NotifyTypes::PARTY_USER_JOINED,
nick);
joined = true;
}
@@ -193,21 +194,21 @@ void PartyHandler::processPartyInviteResponse(Net::MessageIn &msg) const
switch (msg.readInt8())
{
case 0:
- NotifyManager::notify(NotifyManager::PARTY_INVITE_ALREADY_MEMBER,
+ NotifyManager::notify(NotifyTypes::PARTY_INVITE_ALREADY_MEMBER,
nick);
break;
case 1:
- NotifyManager::notify(NotifyManager::PARTY_INVITE_REFUSED, nick);
+ NotifyManager::notify(NotifyTypes::PARTY_INVITE_REFUSED, nick);
break;
case 2:
- NotifyManager::notify(NotifyManager::PARTY_INVITE_DONE, nick);
+ NotifyManager::notify(NotifyTypes::PARTY_INVITE_DONE, nick);
break;
case 3:
- NotifyManager::notify(NotifyManager::PARTY_INVITE_PARTY_FULL,
+ NotifyManager::notify(NotifyTypes::PARTY_INVITE_PARTY_FULL,
nick);
break;
default:
- NotifyManager::notify(NotifyManager::PARTY_INVITE_ERROR, nick);
+ NotifyManager::notify(NotifyTypes::PARTY_INVITE_ERROR, nick);
break;
}
}
@@ -257,19 +258,19 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg)
if (mShareExp == Net::PartyShare::YES)
break;
mShareExp = Net::PartyShare::YES;
- NotifyManager::notify(NotifyManager::PARTY_EXP_SHARE_ON);
+ NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_ON);
break;
case Net::PartyShare::NO:
if (mShareExp == Net::PartyShare::NO)
break;
mShareExp = Net::PartyShare::NO;
- NotifyManager::notify(NotifyManager::PARTY_EXP_SHARE_OFF);
+ NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_OFF);
break;
case Net::PartyShare::NOT_POSSIBLE:
if (mShareExp == Net::PartyShare::NOT_POSSIBLE)
break;
mShareExp = Net::PartyShare::NOT_POSSIBLE;
- NotifyManager::notify(NotifyManager::PARTY_EXP_SHARE_ERROR);
+ NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_ERROR);
break;
default:
logger->log("QQQ Unknown party exp option: %d\n", exp);
@@ -282,19 +283,19 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg)
if (mShareItems == Net::PartyShare::YES)
break;
mShareItems = Net::PartyShare::YES;
- NotifyManager::notify(NotifyManager::PARTY_ITEM_SHARE_ON);
+ NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_ON);
break;
case Net::PartyShare::NO:
if (mShareItems == Net::PartyShare::NO)
break;
mShareItems = Net::PartyShare::NO;
- NotifyManager::notify(NotifyManager::PARTY_ITEM_SHARE_OFF);
+ NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_OFF);
break;
case Net::PartyShare::NOT_POSSIBLE:
if (mShareItems == Net::PartyShare::NOT_POSSIBLE)
break;
mShareItems = Net::PartyShare::NOT_POSSIBLE;
- NotifyManager::notify(NotifyManager::PARTY_ITEM_SHARE_ERROR);
+ NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_ERROR);
break;
default:
logger->log("QQQ Unknown party item option: %d\n", exp);
@@ -348,7 +349,7 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) const
Ea::taParty->removeFromMembers();
Ea::taParty->clearMembers();
}
- NotifyManager::notify(NotifyManager::PARTY_LEFT);
+ NotifyManager::notify(NotifyTypes::PARTY_LEFT);
delete2(Ea::partyTab)
if (socialWindow && Ea::taParty)
@@ -357,7 +358,7 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) const
}
else
{
- NotifyManager::notify(NotifyManager::PARTY_USER_LEFT, nick);
+ NotifyManager::notify(NotifyTypes::PARTY_USER_LEFT, nick);
if (actorManager)
{
Being *const b = actorManager->findBeing(id);
@@ -431,7 +432,7 @@ void PartyHandler::processPartyMessage(Net::MessageIn &msg) const
}
else
{
- NotifyManager::notify(NotifyManager::PARTY_UNKNOWN_USER_MSG,
+ NotifyManager::notify(NotifyTypes::PARTY_UNKNOWN_USER_MSG,
chatMsg);
}
}
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 0ed9f9a18..9e2a0dfb3 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -25,7 +25,6 @@
#include "configuration.h"
#include "game.h"
#include "party.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "units.h"
@@ -38,6 +37,8 @@
#include "gui/windows/skilldialog.h"
#include "gui/windows/statuswindow.h"
+#include "resources/notifytypes.h"
+
#include "resources/db/deaddb.h"
#include "resources/map/map.h"
@@ -50,6 +51,8 @@
#include "net/ea/eaprotocol.h"
+#include "utils/gettext.h"
+
#include "debug.h"
extern int weightNoticeTime;
@@ -395,12 +398,12 @@ void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg)
const int newMoney = msg.readInt32();
if (newMoney > oldMoney)
{
- NotifyManager::notify(NotifyManager::MONEY_GET,
+ NotifyManager::notify(NotifyTypes::MONEY_GET,
Units::formatCurrency(newMoney - oldMoney));
}
else if (newMoney < oldMoney)
{
- NotifyManager::notify(NotifyManager::MONEY_SPENT,
+ NotifyManager::notify(NotifyTypes::MONEY_SPENT,
Units::formatCurrency(oldMoney - newMoney).c_str());
}
@@ -448,7 +451,7 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg)
const int points = PlayerInfo::getAttribute(Attributes::CHAR_POINTS)
+ oldValue - value;
PlayerInfo::setAttribute(Attributes::CHAR_POINTS, points);
- NotifyManager::notify(NotifyManager::SKILL_RAISE_ERROR);
+ NotifyManager::notify(NotifyTypes::SKILL_RAISE_ERROR);
}
PlayerInfo::setStatBase(type, value);
@@ -571,7 +574,7 @@ void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg)
switch (type)
{
case 0:
- NotifyManager::notify(NotifyManager::ARROWS_EQUIP_NEEDED);
+ NotifyManager::notify(NotifyTypes::ARROWS_EQUIP_NEEDED);
break;
case 3:
// arrows equiped
diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp
index fd10a6087..002309de4 100644
--- a/src/net/ea/skillhandler.cpp
+++ b/src/net/ea/skillhandler.cpp
@@ -23,7 +23,6 @@
#include "net/ea/skillhandler.h"
#include "logger.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/localplayer.h"
@@ -31,10 +30,13 @@
#include "gui/windows/skilldialog.h"
+#include "utils/gettext.h"
#include "utils/stringutils.h"
#include "net/messagein.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
/** job dependend identifiers (?) */
@@ -254,6 +256,6 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg)
}
}
- NotifyManager::notify(NotifyManager::SKILL_FAIL_MESSAGE, txt);
+ NotifyManager::notify(NotifyTypes::SKILL_FAIL_MESSAGE, txt);
}
} // namespace Ea
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 64e41646a..b328086fc 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -25,7 +25,6 @@
#include "inventory.h"
#include "item.h"
#include "logger.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/playerinfo.h"
@@ -38,6 +37,10 @@
#include "net/ea/eaprotocol.h"
+#include "utils/gettext.h"
+
+#include "resources/notifytypes.h"
+
#include "listeners/requesttradelistener.h"
#include "debug.h"
@@ -128,15 +131,15 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
switch (msg.readInt8())
{
case 0: // Too far away
- NotifyManager::notify(NotifyManager::TRADE_FAIL_FAR_AWAY,
+ NotifyManager::notify(NotifyTypes::TRADE_FAIL_FAR_AWAY,
tradePartnerName);
break;
case 1: // Character doesn't exist
- NotifyManager::notify(NotifyManager::TRADE_FAIL_CHAR_NOT_EXISTS,
+ NotifyManager::notify(NotifyTypes::TRADE_FAIL_CHAR_NOT_EXISTS,
tradePartnerName);
break;
case 2: // Invite request check failed...
- NotifyManager::notify(NotifyManager::TRADE_CANCELLED_ERROR);
+ NotifyManager::notify(NotifyTypes::TRADE_CANCELLED_ERROR);
break;
case 3: // Trade accepted
if (tradeWindow)
@@ -153,7 +156,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
if (player_relations.hasPermission(tradePartnerName,
PlayerRelation::SPEECH_LOG))
{
- NotifyManager::notify(NotifyManager::TRADE_CANCELLED_NAME,
+ NotifyManager::notify(NotifyTypes::TRADE_CANCELLED_NAME,
tradePartnerName);
}
// otherwise ignore silently
@@ -166,7 +169,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
PlayerInfo::setTrading(false);
break;
default: // Shouldn't happen as well, but to be sure
- NotifyManager::notify(NotifyManager::TRADE_ERROR_UNKNOWN,
+ NotifyManager::notify(NotifyTypes::TRADE_ERROR_UNKNOWN,
tradePartnerName);
if (tradeWindow)
tradeWindow->clear();
@@ -228,19 +231,19 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
break;
case 1:
// Add item failed - player overweighted
- NotifyManager::notify(NotifyManager::
+ NotifyManager::notify(NotifyTypes::
TRADE_ADD_PARTNER_OVER_WEIGHT);
break;
case 2:
// Add item failed - player has no free slot
- NotifyManager::notify(NotifyManager::TRADE_ADD_PARTNER_NO_SLOTS);
+ NotifyManager::notify(NotifyTypes::TRADE_ADD_PARTNER_NO_SLOTS);
break;
case 3:
// Add item failed - non tradable item
- NotifyManager::notify(NotifyManager::TRADE_ADD_UNTRADABLE_ITEM);
+ NotifyManager::notify(NotifyTypes::TRADE_ADD_UNTRADABLE_ITEM);
break;
default:
- NotifyManager::notify(NotifyManager::TRADE_ADD_ERROR);
+ NotifyManager::notify(NotifyTypes::TRADE_ADD_ERROR);
logger->log("QQQ SMSG_TRADE_ITEM_ADD_RESPONSE: "
+ toString(res));
break;
@@ -258,7 +261,7 @@ void TradeHandler::processTradeOk(Net::MessageIn &msg)
void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED)
{
- NotifyManager::notify(NotifyManager::TRADE_CANCELLED);
+ NotifyManager::notify(NotifyTypes::TRADE_CANCELLED);
if (tradeWindow)
{
tradeWindow->setVisible(false);
@@ -269,7 +272,7 @@ void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED)
void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED)
{
- NotifyManager::notify(NotifyManager::TRADE_COMPLETE);
+ NotifyManager::notify(NotifyTypes::TRADE_COMPLETE);
if (tradeWindow)
{
tradeWindow->setVisible(false);
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index 6a68446f3..86b57a2b2 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -22,12 +22,13 @@
#include "net/eathena/adminhandler.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
+#include "resources/notifytypes.h"
+
#include <string>
#include "debug.h"
@@ -56,9 +57,9 @@ void AdminHandler::handleMessage(Net::MessageIn &msg)
{
case SMSG_ADMIN_KICK_ACK:
if (msg.readInt32() == 0)
- NotifyManager::notify(NotifyManager::KICK_FAIL);
+ NotifyManager::notify(NotifyTypes::KICK_FAIL);
else
- NotifyManager::notify(NotifyManager::KICK_SUCCEED);
+ NotifyManager::notify(NotifyTypes::KICK_SUCCEED);
break;
default:
break;
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 65e955d91..30fb8beae 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -22,7 +22,6 @@
#include "net/eathena/buysellhandler.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/attributes.h"
@@ -34,6 +33,8 @@
#include "net/eathena/protocol.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
extern Net::BuySellHandler *buySellHandler;
@@ -113,17 +114,17 @@ void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg)
switch (msg.readInt8())
{
case 0:
- NotifyManager::notify(NotifyManager::SOLD);
+ NotifyManager::notify(NotifyTypes::SOLD);
break;
case 1:
default:
- NotifyManager::notify(NotifyManager::SELL_FAILED);
+ NotifyManager::notify(NotifyTypes::SELL_FAILED);
break;
case 2:
- NotifyManager::notify(NotifyManager::SELL_TRADE_FAILED);
+ NotifyManager::notify(NotifyTypes::SELL_TRADE_FAILED);
break;
case 3:
- NotifyManager::notify(NotifyManager::SELL_UNSELLABLE_FAILED);
+ NotifyManager::notify(NotifyTypes::SELL_UNSELLABLE_FAILED);
break;
}
}
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index bfbe5c8f7..08074fa23 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -22,7 +22,6 @@
#include "net/eathena/partyhandler.h"
#include "actormanager.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "party.h"
@@ -31,6 +30,8 @@
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
extern Net::PartyHandler *partyHandler;
@@ -167,7 +168,7 @@ void PartyHandler::kick(const std::string &name) const
const PartyMember *const m = Ea::taParty->getMember(name);
if (!m)
{
- NotifyManager::notify(NotifyManager::PARTY_USER_NOT_IN_PARTY, name);
+ NotifyManager::notify(NotifyTypes::PARTY_USER_NOT_IN_PARTY, name);
return;
}
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index c7b437944..c1cc349d4 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -22,12 +22,13 @@
#include "net/tmwa/adminhandler.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
+#include "resources/notifytypes.h"
+
#include <string>
#include "debug.h"
@@ -56,9 +57,9 @@ void AdminHandler::handleMessage(Net::MessageIn &msg)
{
case SMSG_ADMIN_KICK_ACK:
if (msg.readInt32() == 0)
- NotifyManager::notify(NotifyManager::KICK_FAIL);
+ NotifyManager::notify(NotifyTypes::KICK_FAIL);
else
- NotifyManager::notify(NotifyManager::KICK_SUCCEED);
+ NotifyManager::notify(NotifyTypes::KICK_SUCCEED);
break;
default:
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 5cc23a786..c44b2ebbf 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -22,7 +22,6 @@
#include "net/tmwa/buysellhandler.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "being/attributes.h"
@@ -34,6 +33,8 @@
#include "net/tmwa/protocol.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
extern Net::BuySellHandler *buySellHandler;
@@ -120,17 +121,17 @@ void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg)
switch (msg.readInt8())
{
case 0:
- NotifyManager::notify(NotifyManager::SOLD);
+ NotifyManager::notify(NotifyTypes::SOLD);
break;
case 1:
default:
- NotifyManager::notify(NotifyManager::SELL_FAILED);
+ NotifyManager::notify(NotifyTypes::SELL_FAILED);
break;
case 2:
- NotifyManager::notify(NotifyManager::SELL_TRADE_FAILED);
+ NotifyManager::notify(NotifyTypes::SELL_TRADE_FAILED);
break;
case 3:
- NotifyManager::notify(NotifyManager::SELL_UNSELLABLE_FAILED);
+ NotifyManager::notify(NotifyTypes::SELL_UNSELLABLE_FAILED);
break;
}
}
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index ca11ccdf0..b0ab2dcef 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -22,7 +22,6 @@
#include "net/tmwa/partyhandler.h"
#include "actormanager.h"
-#include "notifications.h"
#include "notifymanager.h"
#include "party.h"
@@ -31,6 +30,8 @@
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
extern Net::PartyHandler *partyHandler;
@@ -169,7 +170,7 @@ void PartyHandler::kick(const std::string &name) const
const PartyMember *const m = Ea::taParty->getMember(name);
if (!m)
{
- NotifyManager::notify(NotifyManager::PARTY_USER_NOT_IN_PARTY, name);
+ NotifyManager::notify(NotifyTypes::PARTY_USER_NOT_IN_PARTY, name);
return;
}
diff --git a/src/net/uploadcharinfo.h b/src/net/uploadcharinfo.h
index 83eb854f9..14946c385 100644
--- a/src/net/uploadcharinfo.h
+++ b/src/net/uploadcharinfo.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_UPLOADCHRINFO_H
-#define NET_UPLOADCHRINFO_H
+#ifndef NET_UPLOADCHARINFO_H
+#define NET_UPLOADCHARINFO_H
#include <string>
@@ -49,4 +49,4 @@ struct UploadChatInfo final
std::string addStr;
};
-#endif // NET_UPLOADCHRINFO_H
+#endif // NET_UPLOADCHARINFO_H