summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 23:39:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 23:39:17 +0300
commit273b79cf4f52c846508f3493727e34b1811ecfd5 (patch)
tree2645bc865da16e851b593ca1f3860d70d7911e81
parentc593adb7fb0dffc62f1311e6c52f25bfafcdf0f4 (diff)
downloadmanaverse-273b79cf4f52c846508f3493727e34b1811ecfd5.tar.gz
manaverse-273b79cf4f52c846508f3493727e34b1811ecfd5.tar.bz2
manaverse-273b79cf4f52c846508f3493727e34b1811ecfd5.tar.xz
manaverse-273b79cf4f52c846508f3493727e34b1811ecfd5.zip
Convert CookingType enum into strong typed enum.
-rw-r--r--src/enums/being/cookingtype.h22
-rw-r--r--src/net/eathena/npchandler.cpp2
-rw-r--r--src/net/eathena/npchandler.h2
-rw-r--r--src/net/npchandler.h2
-rw-r--r--src/net/tmwa/npchandler.cpp2
-rw-r--r--src/net/tmwa/npchandler.h2
6 files changed, 16 insertions, 16 deletions
diff --git a/src/enums/being/cookingtype.h b/src/enums/being/cookingtype.h
index 0bd521387..47a579d41 100644
--- a/src/enums/being/cookingtype.h
+++ b/src/enums/being/cookingtype.h
@@ -22,18 +22,18 @@
#define ENUMS_BEING_COOKINGTYPE_H
#ifdef EATHENA_SUPPORT
-namespace CookingType
+#include "enums/simpletypes/enumdefines.h"
+
+enumStart(CookingType)
{
- enum Type
- {
- Cooking = 1,
- Arrow = 2,
- Elemental = 3,
- MixCooking = 4,
- MakeBomb = 5,
- Pharmacy = 6
- };
-} // namespace CookingType
+ Cooking = 1,
+ Arrow = 2,
+ Elemental = 3,
+ MixCooking = 4,
+ MakeBomb = 5,
+ Pharmacy = 6
+}
+enumEnd(CookingType);
#endif // EATHENA_SUPPORT
#endif // ENUMS_BEING_COOKINGTYPE_H
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 2c018dad9..939d35c10 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -246,7 +246,7 @@ void NpcHandler::produceMix(const int nameId,
outMsg.writeInt16(static_cast<int16_t>(materialId3), "material 3");
}
-void NpcHandler::cooking(const CookingType::Type type,
+void NpcHandler::cooking(const CookingTypeT type,
const int nameId) const
{
createOutPacket(CMSG_NPC_COOKING);
diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h
index e69366c09..75d9a245d 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -74,7 +74,7 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
const int materialId2,
const int materialId3) const override final;
- void cooking(const CookingType::Type type,
+ void cooking(const CookingTypeT type,
const int nameId) const override final;
void repair(const int index) const override final;
diff --git a/src/net/npchandler.h b/src/net/npchandler.h
index 83c896d1c..1f4642b4d 100644
--- a/src/net/npchandler.h
+++ b/src/net/npchandler.h
@@ -80,7 +80,7 @@ class NpcHandler notfinal
const int materialId3) const = 0;
#ifdef EATHENA_SUPPORT
- virtual void cooking(const CookingType::Type type,
+ virtual void cooking(const CookingTypeT type,
const int nameId) const = 0;
#endif
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index b3187687c..175adabb9 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -221,7 +221,7 @@ void NpcHandler::produceMix(const int nameId A_UNUSED,
}
#ifdef EATHENA_SUPPORT
-void NpcHandler::cooking(const CookingType::Type type A_UNUSED,
+void NpcHandler::cooking(const CookingTypeT type A_UNUSED,
const int nameId A_UNUSED) const
{
}
diff --git a/src/net/tmwa/npchandler.h b/src/net/tmwa/npchandler.h
index c4880ac15..c8da3fd42 100644
--- a/src/net/tmwa/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -77,7 +77,7 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
const int materialId3) const override final;
#ifdef EATHENA_SUPPORT
- void cooking(const CookingType::Type type,
+ void cooking(const CookingTypeT type,
const int nameId) const override final;
#endif