summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being/localplayer.cpp2
-rw-r--r--src/being/localplayer.h2
-rw-r--r--src/enums/being/pickup.h33
-rw-r--r--src/net/eathena/inventoryhandler.cpp2
-rw-r--r--src/net/tmwa/inventoryhandler.cpp2
5 files changed, 19 insertions, 22 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 4ad43b098..fedda2777 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -818,7 +818,7 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo,
const int amount,
const unsigned char color,
const BeingId floorItemId,
- const Pickup::Type fail)
+ const PickupT fail)
{
if (fail != Pickup::OKAY)
{
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index e64f8fd58..59bd34d4c 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -180,7 +180,7 @@ class LocalPlayer final : public Being,
const int amount,
const unsigned char color,
const BeingId floorItemId,
- const Pickup::Type fail);
+ const PickupT fail);
int getLevel() const override final A_WARN_UNUSED;
diff --git a/src/enums/being/pickup.h b/src/enums/being/pickup.h
index 198097824..28a99976d 100644
--- a/src/enums/being/pickup.h
+++ b/src/enums/being/pickup.h
@@ -23,26 +23,23 @@
#ifndef ENUMS_BEING_PICKUP_H
#define ENUMS_BEING_PICKUP_H
+#include "enums/simpletypes/enumdefines.h"
+
#include "localconsts.h"
-namespace Pickup
+enumStart(Pickup)
{
- /**
- * Reasons an item can fail to be picked up.
- */
- enum Type
- {
- OKAY = 0,
- UNKNOWN,
- BAD_ITEM,
- TOO_HEAVY,
- TOO_FAR,
- INV_FULL,
- STACK_FULL,
- DROP_STEAL,
- MAX_AMOUNT,
- STACK_AMOUNT
- };
-} // namespace Pickup
+ OKAY = 0,
+ UNKNOWN,
+ BAD_ITEM,
+ TOO_HEAVY,
+ TOO_FAR,
+ INV_FULL,
+ STACK_FULL,
+ DROP_STEAL,
+ MAX_AMOUNT,
+ STACK_AMOUNT
+}
+enumEnd(Pickup);
#endif // ENUMS_BEING_PICKUP_H
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 186bb5fc5..ed834c9e8 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -502,7 +502,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
if (err)
{
- Pickup::Type pickup;
+ PickupT pickup;
switch (err)
{
case 1:
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index d1b7014f3..7f81ac461 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -361,7 +361,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
if (err)
{
- Pickup::Type pickup;
+ PickupT pickup;
switch (err)
{
case 1: