diff Items.h @ 2495:7b076fe64f23

GetItemTextureFilename fix
author Ritor1
date Wed, 17 Sep 2014 17:35:13 +0600
parents 104fdbea0386
children
line wrap: on
line diff
--- a/Items.h	Tue Sep 16 17:48:58 2014 +0600
+++ b/Items.h	Wed Sep 17 17:35:13 2014 +0600
@@ -26,11 +26,11 @@
   ITEM_IDENTIFIED = 0x1,
   ITEM_BROKEN = 0x2,
   ITEM_TEMP_BONUS = 0x8,
-  ITEM_AURA_EFFECT_RED = 0x10,//16
-  ITEM_AURA_EFFECT_BLUE = 0x20,//32
-  ITEM_AURA_EFFECT_GREEN = 0x40,//64
-  ITEM_AURA_EFFECT_PURPLE = 0x80,//128
-  ITEM_ENCHANT_ANIMATION = 0xF0,//240
+  ITEM_AURA_EFFECT_RED = 0x10,
+  ITEM_AURA_EFFECT_BLUE = 0x20,
+  ITEM_AURA_EFFECT_GREEN = 0x40,
+  ITEM_AURA_EFFECT_PURPLE = 0x80,
+  ITEM_ENCHANT_ANIMATION = 0xF0,
   ITEM_STOLEN = 0x100,
   ITEM_HARDENED = 0x200,
 };
@@ -227,6 +227,13 @@
   static void PopulateArtifactBonusMap();
   static void ClearItemBonusMaps();
 
+  inline void ResetEnchantAnimation(){uAttributes &= 0xFFFFFF0F;}
+  inline bool ItemEnchanted()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) != 0;}
+  inline bool AuraEffectRed()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_RED;}
+  inline bool AuraEffectBlue()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_BLUE;}
+  inline bool AuraEffectGreen()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_GREEN;}
+  inline bool AuraEffectPurple()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_PURPLE;}
+
   void GetItemBonusSpecialEnchantment(Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* additiveBonus, int* halfSkillBonus);
   void GetItemBonusArtifact(Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* bonusSum);
   bool IsRegularEnchanmentForAttribute(CHARACTER_ATTRIBUTE_TYPE attrToGet);