summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemCookedFish.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemCookedFish.h')
-rw-r--r--src/Items/ItemCookedFish.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Items/ItemCookedFish.h b/src/Items/ItemCookedFish.h
new file mode 100644
index 000000000..8a819c6f6
--- /dev/null
+++ b/src/Items/ItemCookedFish.h
@@ -0,0 +1,37 @@
+
+#pragma once
+
+#include "ItemFood.h"
+
+
+
+
+
+class cItemCookedFishHandler :
+ public cItemFoodHandler
+{
+ typedef cItemFoodHandler super;
+
+public:
+ cItemCookedFishHandler()
+ : super(E_ITEM_COOKED_FISH, FoodInfo(0, 0))
+ {
+ }
+
+ virtual FoodInfo GetFoodInfo(const cItem * a_Item) override
+ {
+ static const FoodInfo CookedFishInfos[] =
+ {
+ FoodInfo(5, 6.0), // Cooked fish
+ FoodInfo(6, 9.6), // Cooked salmon
+ };
+
+ if (a_Item->m_ItemDamage >= static_cast<short>(ARRAYCOUNT(CookedFishInfos)))
+ {
+ LOGWARNING("Unknown cooked fish type '%d'", a_Item->m_ItemDamage);
+ return FoodInfo(0, 0);
+ }
+ return CookedFishInfos[a_Item->m_ItemDamage];
+ }
+
+};