From eb3ed1aec1fb9e4468a7829cabd42572b7554d70 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 19 Aug 2012 11:51:17 +0000 Subject: Another handful of packets rewritten. Also changed cItem::m_ItemID into m_ItemType of type short. Easier handling. m_ItemID kept for compatibility reasons (Lua-interface etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@756 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Defines.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/Defines.h') diff --git a/source/Defines.h b/source/Defines.h index 4f8473ac5..15c94c081 100644 --- a/source/Defines.h +++ b/source/Defines.h @@ -222,7 +222,7 @@ inline float GetSpecialSignf( float a_Val ) //tolua_begin namespace ItemCategory { - inline bool IsPickaxe(ENUM_ITEM_ID a_ItemID) + inline bool IsPickaxe(short a_ItemID) { return (a_ItemID == E_ITEM_WOODEN_PICKAXE) || (a_ItemID == E_ITEM_STONE_PICKAXE) @@ -233,7 +233,7 @@ namespace ItemCategory - inline bool IsAxe(ENUM_ITEM_ID a_ItemID) + inline bool IsAxe(short a_ItemID) { return (a_ItemID == E_ITEM_WOODEN_AXE) || (a_ItemID == E_ITEM_STONE_AXE) @@ -244,7 +244,7 @@ namespace ItemCategory - inline bool IsSword(ENUM_ITEM_ID a_ItemID) + inline bool IsSword(short a_ItemID) { return (a_ItemID == E_ITEM_WOODEN_SWORD) || (a_ItemID == E_ITEM_STONE_SWORD) @@ -255,7 +255,7 @@ namespace ItemCategory - inline bool IsHoe(ENUM_ITEM_ID a_ItemID) + inline bool IsHoe(short a_ItemID) { return (a_ItemID == E_ITEM_WOODEN_HOE) || (a_ItemID == E_ITEM_STONE_HOE) @@ -266,7 +266,7 @@ namespace ItemCategory - inline bool IsShovel(ENUM_ITEM_ID a_ItemID) + inline bool IsShovel(short a_ItemID) { return (a_ItemID == E_ITEM_WOODEN_SHOVEL) || (a_ItemID == E_ITEM_STONE_SHOVEL) @@ -277,7 +277,7 @@ namespace ItemCategory - inline bool IsTool(ENUM_ITEM_ID a_ItemID) + inline bool IsTool(short a_ItemID) { return IsPickaxe( a_ItemID ) || IsAxe ( a_ItemID ) @@ -288,7 +288,7 @@ namespace ItemCategory - inline bool IsHelmet(ENUM_ITEM_ID a_ItemType) + inline bool IsHelmet(short a_ItemType) { return ( (a_ItemType == E_ITEM_LEATHER_CAP) || @@ -301,7 +301,7 @@ namespace ItemCategory - inline bool IsChestPlate(ENUM_ITEM_ID a_ItemType) + inline bool IsChestPlate(short a_ItemType) { return ( (a_ItemType == E_ITEM_LEATHER_TUNIC) || @@ -314,7 +314,7 @@ namespace ItemCategory - inline bool IsLeggings(ENUM_ITEM_ID a_ItemType) + inline bool IsLeggings(short a_ItemType) { return ( (a_ItemType == E_ITEM_LEATHER_PANTS) || @@ -327,7 +327,7 @@ namespace ItemCategory - inline bool IsBoots(ENUM_ITEM_ID a_ItemType) + inline bool IsBoots(short a_ItemType) { return ( (a_ItemType == E_ITEM_LEATHER_BOOTS) || -- cgit v1.2.3