summaryrefslogtreecommitdiff
path: root/src/net/ea/partyhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-03 14:31:43 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-03 14:31:43 +0300
commitb643a5c48d53dbeca7672e3c8b5182f9d698abcb (patch)
treeab596dc9a0c573764c1e0b427f22303faa1bfec1 /src/net/ea/partyhandler.cpp
parent6281c1281fe85a1c75155df44c99aa843561a4f2 (diff)
downloadplus-b643a5c48d53dbeca7672e3c8b5182f9d698abcb.tar.gz
plus-b643a5c48d53dbeca7672e3c8b5182f9d698abcb.tar.bz2
plus-b643a5c48d53dbeca7672e3c8b5182f9d698abcb.tar.xz
plus-b643a5c48d53dbeca7672e3c8b5182f9d698abcb.zip
Convert PacketShare enum into strong typed enum.
Diffstat (limited to 'src/net/ea/partyhandler.cpp')
-rw-r--r--src/net/ea/partyhandler.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 1af9ba7ef..6b0be87e9 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -45,14 +45,14 @@ namespace Ea
{
Party *taParty = nullptr;
-Net::PartyShare::Type PartyHandler::mShareExp = Net::PartyShare::UNKNOWN;
-Net::PartyShare::Type PartyHandler::mShareItems = Net::PartyShare::UNKNOWN;
+PartyShareT PartyHandler::mShareExp = PartyShare::UNKNOWN;
+PartyShareT PartyHandler::mShareItems = PartyShare::UNKNOWN;
PartyHandler::PartyHandler() :
Net::PartyHandler()
{
- mShareExp = Net::PartyShare::UNKNOWN;
- mShareItems = Net::PartyShare::UNKNOWN;
+ mShareExp = PartyShare::UNKNOWN;
+ mShareItems = PartyShare::UNKNOWN;
taParty = Party::getParty(1);
}
@@ -84,27 +84,27 @@ void PartyHandler::processPartyCreate(Net::MessageIn &msg)
}
void PartyHandler::processPartySettingsContinue(Net::MessageIn &msg,
- const int16_t exp,
- const int16_t item)
+ const PartyShareT exp,
+ const PartyShareT item)
{
switch (exp)
{
- case Net::PartyShare::YES:
- if (mShareExp == Net::PartyShare::YES)
+ case PartyShare::YES:
+ if (mShareExp == PartyShare::YES)
break;
- mShareExp = Net::PartyShare::YES;
+ mShareExp = PartyShare::YES;
NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_ON);
break;
- case Net::PartyShare::NO:
- if (mShareExp == Net::PartyShare::NO)
+ case PartyShare::NO:
+ if (mShareExp == PartyShare::NO)
break;
- mShareExp = Net::PartyShare::NO;
+ mShareExp = PartyShare::NO;
NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_OFF);
break;
- case Net::PartyShare::NOT_POSSIBLE:
- if (mShareExp == Net::PartyShare::NOT_POSSIBLE)
+ case PartyShare::NOT_POSSIBLE:
+ if (mShareExp == PartyShare::NOT_POSSIBLE)
break;
- mShareExp = Net::PartyShare::NOT_POSSIBLE;
+ mShareExp = PartyShare::NOT_POSSIBLE;
NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_ERROR);
break;
default:
@@ -114,22 +114,22 @@ void PartyHandler::processPartySettingsContinue(Net::MessageIn &msg,
switch (item)
{
- case Net::PartyShare::YES:
- if (mShareItems == Net::PartyShare::YES)
+ case PartyShare::YES:
+ if (mShareItems == PartyShare::YES)
break;
- mShareItems = Net::PartyShare::YES;
+ mShareItems = PartyShare::YES;
NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_ON);
break;
- case Net::PartyShare::NO:
- if (mShareItems == Net::PartyShare::NO)
+ case PartyShare::NO:
+ if (mShareItems == PartyShare::NO)
break;
- mShareItems = Net::PartyShare::NO;
+ mShareItems = PartyShare::NO;
NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_OFF);
break;
- case Net::PartyShare::NOT_POSSIBLE:
- if (mShareItems == Net::PartyShare::NOT_POSSIBLE)
+ case PartyShare::NOT_POSSIBLE:
+ if (mShareItems == PartyShare::NOT_POSSIBLE)
break;
- mShareItems = Net::PartyShare::NOT_POSSIBLE;
+ mShareItems = PartyShare::NOT_POSSIBLE;
NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_ERROR);
break;
default: