diff Engine/Objects/Items.h @ 2567:d569340b05ff

Few constants changed into enum values
author a.parshin
date Thu, 21 May 2015 01:50:59 +0200
parents 68cdef6879a0
children dd36326a9994
line wrap: on
line diff
--- a/Engine/Objects/Items.h	Wed May 20 21:05:07 2015 +0200
+++ b/Engine/Objects/Items.h	Thu May 21 01:50:59 2015 +0200
@@ -3,20 +3,20 @@
 #include <map>
 #include "../NZIArray.h"
 
-enum DAMAGE_TYPE:unsigned int
-    {
-    DMGT_FIRE   = 0,
+enum DAMAGE_TYPE: unsigned int
+{
+    DMGT_FIRE = 0,
     DMGT_ELECTR = 1,
-    DMGT_COLD   = 2,
-    DMGT_EARTH      = 3,
-    DMGT_PHISYCAL= 4,
+    DMGT_COLD = 2,
+    DMGT_EARTH = 3,
+    DMGT_PHISYCAL = 4,
     DMGT_MAGICAL = 5,
     DMGT_SPIRIT = 6,
-    DMGT_MIND   = 7,
-    DMGT_BODY   = 8,
-    DMGT_LIGHT  = 9,
-    DMGT_DARK   =10
-    };
+    DMGT_MIND = 7,
+    DMGT_BODY = 8,
+    DMGT_LIGHT = 9,
+    DMGT_DARK = 10
+};
 
 
 
@@ -35,6 +35,33 @@
   ITEM_HARDENED = 0x200,
 };
 
+enum ITEM_ENCHANTMENT : unsigned int
+{
+    ITEM_ENCHANTMENT_NULL = 0,
+
+    ITEM_ENCHANTMENT_OF_COLD = 4,         // Adds 3-4 points of cold damage
+    ITEM_ENCHANTMENT_OF_FROST = 5,        // Adds 6-8 points of cold damage
+    ITEM_ENCHANTMENT_OF_ICE = 6,          // Adds 9-12 points of cold damage
+    ITEM_ENCHANTMENT_OF_SPARKS = 7,       // Adds 2-5 points of electrical damage
+    ITEM_ENCHANTMENT_OF_LIGHTNING = 8,    // Adds 4-10 points of electrical damage
+    ITEM_ENCHANTMENT_OF_THUNDERBOLTS = 9, // Adds 6-15 points of electrical damage
+    ITEM_ENCHANTMENT_OF_FIRE = 10,        // Adds 1-6 points of fire damage
+    ITEM_ENCHANTMENT_OF_FLAME = 11,       // Adds 2-12 points of fire damage
+    ITEM_ENCHANTMENT_OF_INFERNOS = 12,    // Adds 3-18 points of fire damage
+    ITEM_ENCHANTMENT_OF_POISON = 13,      // Adds 5 points of body damage
+    ITEM_ENCHANTMENT_OF_VENOM = 14,       // Adds 8 points of body damage
+    ITEM_ENCHANTMENT_OF_ACID = 15,        // Adds 12 points of body damage
+    ITEM_ENCHANTMENT_VAMPIRIC = 16,       // 20% of damage dealt given to wielder
+    ITEM_ENCHANTMENT_OF_RECOVERY = 17,    // Increases rate of Recovery
+
+    ITEM_ENCHANTMENT_OF_FORCE = 24,       // Increases Knockback
+
+    ITEM_ENCHANTMENT_40 = 40,
+    ITEM_ENCHANTMENT_OF_DARKNESS = 41,    // Vampiric and Swift
+
+    ITEM_ENCHANTMENT_OF_DRAGON = 46,      // Adds 10-20 points of fire damage and +25 Might
+};
+
 
 enum ITEM_MATERIAL
 {
@@ -47,34 +74,56 @@
 /*  330 */
 enum ITEM_TYPE
 {
+    ITEM_NULL = 0,
   ITEM_LONGSWORD_1 = 0x1,
-  ITEM_DAGGER_1 = 0xF,
-  ITEM_AXE_1 = 0x17,
-  ITEM_SPEAR_1 = 0x1F,
-  ITEM_CROSSBOW_1 = 0x2F,
-  ITEM_MACE_1 = 0x32,
-  ITEM_STAFF_1 = 0x3D,
+  ITEM_DAGGER_1 = 15,
+  ITEM_AXE_1 = 23,
+  ITEM_SPEAR_1 = 31,
+  ITEM_CROSSBOW_1 = 47,
+  ITEM_MACE_1 = 50,
+  ITEM_STAFF_1 = 61,
   ITEM_BLASTER = 64,
   ITEM_LASER_RIFLE = 65,
-  ITEM_LEATHER_1 = 0x42,
-  ITEM_CHAINMAIL_1 = 0x47,
-  ITEM_PLATE_1 = 0x4C,
-  ITEM_BUCKLER_1 = 0x54,
-  ITEM_GAUNTLETS_1 = 0x6E,
-  ITEM_BOOTS_1 = 0x73,
+  ITEM_LEATHER_1 = 66,
+  ITEM_CHAINMAIL_1 = 71,
+  ITEM_PLATE_1 = 76,
+  ITEM_BUCKLER_1 = 84,
+  ITEM_GAUNTLETS_1 = 110,
+  ITEM_BOOTS_1 = 115,
   ITEM_WAND_FIRE = 135,
   ITEM_WAND_STUN = 138,
-  ITEM_WAND_INCENERATION = 0x9F,
+  ITEM_WAND_INCENERATION = 159,
+  ITEM_160 = 160,
+  ITEM_161 = 161,
+  ITEM_162 = 162,
+  ITEM_GOLD_SMALL = 197,
+  ITEM_GOLD_MEDIUM = 198,
+  ITEM_GOLD_LARGE = 199,
   ITEM_REAGENT_WIDOWSWEEP_BERRIES = 200,
-  ITEM_TROLL_BLOOD = 0xCA,
-  ITEM_DRAGON_EYE = 0xCC,
-  ITEM_HARPY_FEATHER = 0xCF,
-  ITEM_DEVIL_ICHOR = 0xD6,
-  ITEM_OOZE_ECTOPLASM_BOTTLE = 0xD9,
+  ITEM_REAGENT_CRUSHED_ROSE_PETALS = 201,
+  ITEM_TROLL_BLOOD = 202,
+  ITEM_TROLL_RUBY = 203,
+  ITEM_DRAGON_EYE = 204,
+  ITEM_PHIMA_ROOT = 205,
+  ITEM_METEORITE_FRAGMENT = 206,
+  ITEM_HARPY_FEATHER = 207,
+  ITEM_MOONSTONE = 208,
+  ITEM_ELVISH_TOADSTOOL = 209,
+  ITEM_POPPYSNAPS = 210,
+  ITEM_FAE_DUST = 211,
+  ITEM_SULFUR = 212,
+  ITEM_GARNET = 213,
+  ITEM_DEVIL_ICHOR = 214,
+  ITEM_MUSHROOM = 215,
+  ITEM_OBSIDIAN = 216,
+  ITEM_OOZE_ENDOPLASM_VIAL = 217,
+  ITEM_MERCURY = 218,
   ITEM_REAGENT_PHILOSOPHERS_STONE = 219,
   ITEM_POTION_BOTTLE = 220,
   ITEM_POTION_CATALYST = 221,
   ITEM_POTION_CURE_WOUNDS = 222,
+  ITEM_POTION_MAGIC_POTION = 223,
+  ITEM_POTION_CURE_WEAKNESS = 224,
   ITEM_POTION_CURE_DISEASE = 225,
   ITEM_POTION_AWAKEN = 227,
   ITEM_POTION_HASTE = 228,
@@ -89,19 +138,20 @@
   ITEM_POTION_STONE_TO_FLESH = 262,
   ITEM_POTION_SLAYING_POTION = 263,
   ITEM_POTION_REJUVENATION = 271,
-  ITEM_SPELLBOOK_TORCHLIGHT = 400,//0x190
-  ITEM_SPELLBOOK_FIRE_STRIKE = 401,//0x191,
-  ITEM_SPELLBOOK_AIR_FEATHER_FALL = 0x19C,
-  ITEM_SPELLBOOK_WATER_POISON_SPRAY = 0x1A7,
-  ITEM_SPELLBOOK_EARTH_SLOW = 0x1B2,
-  ITEM_SPELLBOOK_SPIRIT_BLESS = 0x1BD,
-  ITEM_SPELLBOOK_MIND_MIND_BLAST = 0x1C8,
-  ITEM_SPELLBOOK_BODY_FIRST_AID = 0x1D3,
-  ITEM_SPELLBOOK_BODY_HEAL = 0x1D6,
-  ITEM_SPELLBOOK_BODY_BREAK_POISON = 0x1D7,
-  ITEM_SPELLBOOK_LIGHT_LIGHT_BOLT = 0x1DD,
-  ITEM_SPELLBOOK_LIGHT_SUN_BURST = 0x1E6,
-  ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION = 0x1E7,
+  ITEM_SPELLBOOK_TORCHLIGHT = 400,
+  ITEM_SPELLBOOK_FIRE_STRIKE = 401,
+  ITEM_SPELLBOOK_AIR_FEATHER_FALL = 412,
+  ITEM_SPELLBOOK_WATER_POISON_SPRAY = 423,
+  ITEM_SPELLBOOK_EARTH_SLOW = 434,
+  ITEM_SPELLBOOK_SPIRIT_BLESS = 445,
+  ITEM_SPELLBOOK_MIND_REMOVE_FEAR = 455,
+  ITEM_SPELLBOOK_MIND_MIND_BLAST = 456,
+  ITEM_SPELLBOOK_BODY_FIRST_AID = 467,
+  ITEM_SPELLBOOK_BODY_HEAL = 470,
+  ITEM_SPELLBOOK_BODY_BREAK_POISON = 471,
+  ITEM_SPELLBOOK_LIGHT_LIGHT_BOLT = 477,
+  ITEM_SPELLBOOK_LIGHT_SUN_BURST = 486,
+  ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION = 487,
   ITEM_ARTIFACT_PUCK = 500,//0x1F4,
   ITEM_ARTIFACT_IRON_FEATHER = 501,
   ITEM_ARTIFACT_WALLACE = 502,
@@ -112,7 +162,7 @@
   ITEM_ARTIFACT_GHOULSBANE = 507,//1FA
   ITEM_ARTIFACT_GIBBET = 508,//1FA
   ITEM_ARTIFACT_CHARELE = 509,//1FA
-  ITEM_ARTEFACT_ULLYSES =510, 
+  ITEM_ARTEFACT_ULLYSES = 510, 
   ITEM_ARTEFACT_HANDS_OF_THE_MASTER =511, 
   ITEM_ARTIFACT_LEAGUE_BOOTS = 512,//200
   ITEM_ARTIFACT_RULERS_RING = 513,
@@ -158,6 +208,18 @@
   ITEM_LICH_JAR_FULL = 601,
   ITEM_WETSUIT = 604,
   ITEM_LICH_JAR_EMPTY = 615,
+  ITEM_GENIE_LAMP = 616,
+
+  ITEM_RED_APPLE = 630,
+
+  ITEM_LUTE = 632,
+  ITEM_FAERIE_PIPES = 633,
+  ITEM_GRYPHONHEARTS_TRUMPET = 634,
+
+  ITEM_HORSESHOE = 646,
+
+  ITEM_TEMPLE_IN_A_BOTTLE = 650,
+
   ITEM_RECIPE_REJUVENATION = 740,
   ITEM_RECIPE_BODY_RESISTANCE = 771,
 };
@@ -251,7 +313,7 @@
   const char *GetIdentifiedName();
   void UpdateTempBonus(__int64 uTimePlayed);
   void Reset();
-  int _439DF3_get_additional_damage(int *a2, bool *vampiyr);
+  int _439DF3_get_additional_damage(DAMAGE_TYPE *a2, bool *vampiyr);
 
   ITEM_EQUIP_TYPE GetItemEquipType();
   unsigned char GetPlayerSkillType();
@@ -263,7 +325,7 @@
   int uItemID; //0
   int uEnchantmentType; //4
   int m_enchantmentStrength;  //8
-  int uSpecEnchantmentType; // 25  +5 levels //0c
+  ITEM_ENCHANTMENT special_enchantment; // 25  +5 levels //0c
                             // 16  Drain Hit Points from target.
                             // 35  Increases chance of disarming.
                             // 39  Double damage vs Demons.