summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 00:00:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 00:00:03 +0300
commit7abba762ddd14b63f34a3be9c9212db3a1939960 (patch)
tree1a5ecee6d78d80c597b87c4860663abdb6a6c327
parent41dfafa2ff6e878308c5edde056edfa944bf6f03 (diff)
downloadmv-7abba762ddd14b63f34a3be9c9212db3a1939960.tar.gz
mv-7abba762ddd14b63f34a3be9c9212db3a1939960.tar.bz2
mv-7abba762ddd14b63f34a3be9c9212db3a1939960.tar.xz
mv-7abba762ddd14b63f34a3be9c9212db3a1939960.zip
Convert Rank enum into strong typed enum.
-rw-r--r--src/enums/being/rank.h18
-rw-r--r--src/net/beinghandler.h2
-rw-r--r--src/net/eathena/beinghandler.cpp2
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/tmwa/beinghandler.cpp2
-rw-r--r--src/net/tmwa/beinghandler.h2
6 files changed, 14 insertions, 14 deletions
diff --git a/src/enums/being/rank.h b/src/enums/being/rank.h
index 3d2ee065e..c23e82c02 100644
--- a/src/enums/being/rank.h
+++ b/src/enums/being/rank.h
@@ -22,16 +22,16 @@
#define ENUMS_BEING_RANK_H
#ifdef EATHENA_SUPPORT
-namespace Rank
+#include "enums/simpletypes/enumdefines.h"
+
+enumStart(Rank)
{
- enum Rank
- {
- Blacksmith = 0,
- Alchemist = 1,
- Taekwon = 2,
- Pk = 3
- };
-} // namespace Rank
+ Blacksmith = 0,
+ Alchemist = 1,
+ Taekwon = 2,
+ Pk = 3
+}
+enumEnd(Rank);
#endif // EATHENA_SUPPORT
#endif // ENUMS_BEING_RANK_H
diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h
index a99b0377c..b21af2ae6 100644
--- a/src/net/beinghandler.h
+++ b/src/net/beinghandler.h
@@ -46,7 +46,7 @@ class BeingHandler notfinal
virtual void undress(Being *const being) const = 0;
#ifdef EATHENA_SUPPORT
- virtual void requestRanks(const Rank::Rank rank) const = 0;
+ virtual void requestRanks(const RankT rank) const = 0;
#endif
};
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 79354e34c..9a678321a 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -486,7 +486,7 @@ void BeingHandler::undress(Being *const being) const
// being->setSprite(SPRITE_BODY, 0, "", true);
}
-void BeingHandler::requestRanks(const Rank::Rank rank) const
+void BeingHandler::requestRanks(const RankT rank) const
{
createOutPacket(CMSG_REQUEST_RANKS);
outMsg.writeInt16(static_cast<int16_t>(rank), "type");
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index e60318314..0e26b84a7 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -44,7 +44,7 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void undress(Being *const being) const override final;
- void requestRanks(const Rank::Rank rank) const override final;
+ void requestRanks(const RankT rank) const override final;
protected:
static Being *createBeing2(Net::MessageIn &msg,
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 451a88ec5..7d13f2a70 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -252,7 +252,7 @@ void BeingHandler::undress(Being *const being) const
}
#ifdef EATHENA_SUPPORT
-void BeingHandler::requestRanks(const Rank::Rank rank A_UNUSED) const
+void BeingHandler::requestRanks(const RankT rank A_UNUSED) const
{
}
#endif
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index 20badffe0..2a65c70c0 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -44,7 +44,7 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void undress(Being *const being) const override final;
#ifdef EATHENA_SUPPORT
- void requestRanks(const Rank::Rank rank A_UNUSED) const override final;
+ void requestRanks(const RankT rank A_UNUSED) const override final;
#endif
protected: