Mercurial > mm7
view Items.h @ 284:fcfdb7f40c1b
m
author | Ritor1 |
---|---|
date | Sun, 17 Feb 2013 23:11:26 +0600 |
parents | b9f4ff2f6c45 |
children | 1f0af5cac2dd |
line wrap: on
line source
#pragma once /* 338 */ enum ITEM_FLAGS { ITEM_IDENTIFIED = 0x1, ITEM_BROKEN = 0x2, ITEM_TEMP_BONUS = 0x8, ITEM_STOLEN = 0x100, ITEM_ENCHANTED = 0x200, }; /* 330 */ enum ITEM_TYPE { 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_LEATHER_1 = 0x42, ITEM_CHAINMAIL_1 = 0x47, ITEM_PLATE_1 = 0x4C, ITEM_BUCKLER_1 = 0x54, ITEM_GAUNTLETS_1 = 0x6E, ITEM_BOOTS_1 = 0x73, ITEM_WAND_FIRE = 0x87, ITEM_WAND_STUN = 0x8A, ITEM_WAND_INCENERATION = 0x9F, ITEM_TROLL_BLOOD = 0xCA, ITEM_DRAGON_EYE = 0xCC, ITEM_HARPY_FEATHER = 0xCF, ITEM_DEVIL_ICHOR = 0xD6, ITEM_OOZE_ECTOPLASM_BOTTLE = 0xD9, ITEM_POTION_BOTTLE = 0xDC, ITEM_SPELLBOOK_FIRE_STRIKE = 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_ARTIFACT_PUCK = 0x1F4, ITEM_RELIC_MEKORIGS_HAMMER = 0x210, }; /* 331 */ enum ITEM_EQUIP_TYPE { EQUIP_ONE_OR_TWO_HANDS = 0x0, EQUIP_TWO_HANDED = 0x1, EQUIP_BOW = 0x2, EQUIP_ARMOUR = 0x3, EQUIP_SHIELD = 0x4, EQUIP_HELMET = 0x5, EQUIP_BELT = 0x6, EQUIP_CLOAK = 0x7, EQUIP_GAUNTLETS = 0x8, EQUIP_BOOTS = 0x9, EQUIP_RING = 0xA, EQUIP_AMULET = 0xB, EQUIP_C = 0xC, EQUIP_REAGENT = 0xD, EQUIP_POTION = 0xE, EQUIP_F = 0xF, EQUIP_BOOK = 0x10, EQUIP_11 = 0x11, EQUIP_GOLD = 0x12, EQUIP_GEM = 0x13, }; /* 64 */ #pragma pack(push, 1) struct ItemGen { //----- (0042EB25) -------------------------------------------------------- inline ItemGen() { Reset(); } bool GenerateArtifact(); unsigned int GetValue(); const char *GetDisplayName(); const char *GetIdentifiedName(); void UpdateTempBonus(__int64 uTimePlayed); void Reset(); int _439DF3_get_additional_damage(int *a2, int *a3); unsigned int uItemID; int _bonus_type; int _bonus_strength; int uAdditionalValue; int uNumCharges; unsigned int uAttributes; unsigned __int8 uBodyAnchor; char uMaxCharges; char field_1A; char field_1B; unsigned __int64 uExpireTime; }; #pragma pack(pop) /* 175 */ #pragma pack(push, 1) struct ItemDesc { //Item # |Pic File|Name|Value|Equip Stat|Skill Group|Mod1|Mod2|material| ///ID/Rep/St|Not identified name|Sprite Index|VarA|VarB|Equip X|Equip Y|Notes char *pIconName; //0 4 char *pName; //4 8 char *pUnidentifiedName; //8 c char *pDescription; //0c 10 unsigned int uValue; //10 14 unsigned __int16 uSpriteID; //14 18 __int16 field_1A; //16 unsigned __int16 uEquipX; //18 1c unsigned __int16 uEquipY; //1a 1e unsigned __int8 uEquipType; //1c 20 unsigned __int8 uSkillType; //1d 21 unsigned __int8 uDamageDice; //1e 22 unsigned __int8 uDamageRoll; //1f 23 unsigned __int8 uDamageMod; //20 24 unsigned __int8 uMaterial; //21 25 char _additional_value; //22 26 char _bonus_type; //23 27 char _bonus_strength; //24 28 char field_25; // 25 29 char field_26; //26 2A char field_27; // 27 2b union { unsigned __int8 uChanceByTreasureLvl[6]; struct { unsigned __int8 uChanceByTreasureLvl1; // 28 2c unsigned __int8 uChanceByTreasureLvl2; // 29 2d unsigned __int8 uChanceByTreasureLvl3; // 2A 2e unsigned __int8 uChanceByTreasureLvl4; // 2B 2f unsigned __int8 uChanceByTreasureLvl5; // 2C 30 unsigned __int8 uChanceByTreasureLvl6; // 2D 32 }; }; unsigned char uItemID_Rep_St; //2e 32 char field_2f; }; #pragma pack(pop) /* 177 */ #pragma pack(push, 1) struct ItemEnchantment { //Bonus|Sta|Of Name|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul char *pBonusStat; char *pOfName; /* union{ struct { unsigned char to_arm; unsigned char to_shld; unsigned char to_helm; unsigned char to_belt; unsigned char to_cape; unsigned char to_gaunt; unsigned char to_boot; unsigned char to_ring; unsigned char to_amul; }; */ unsigned char to_item[12]; // }; }; #pragma pack(pop) /* 178 */ #pragma pack(push, 1) struct ItemSpecialEnchantment { //Bonus Stat|Name Add|W1|W2|Miss|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul|Value|Lvl|Description fo special Bonuses and values char *pBonusStatement; char *pNameAdd; char to_item_apply[12]; int iValue; int iTreasureLevel; }; #pragma pack(pop) #pragma pack(push, 1) struct BonusRange { unsigned int minR; unsigned int maxR; }; #pragma pack(pop) /* 176 */ #pragma pack(push, 1) struct ItemsTable { void Initialize(); void LoadPotions(); void LoadPotionNotes(); void GenerateItem(int treasure_level, int a3, ItemGen *pItem); void SetSpecialBonus(ItemGen *pItem); bool _456D43_is_material_equals_3(ItemGen *pItem); bool _456D5E_is_some_material(ItemGen *pItem); char *Release(); int uAllItemsCount; ItemDesc pItems[800]; //4-9604h ItemEnchantment pEnchantments[24]; //9604h ItemSpecialEnchantment pSpecialEnchantments[72]; //97E4h -9FC4h char field_9FC4[5000]; char field_B348[5000]; char field_C6D0[5000]; char field_DA58[5000]; char field_EDE0[384]; unsigned __int16 potion_data[50][50]; // 77B2h*2=EF64h -102ECh unsigned __int16 potion_note[50][50]; // 8176h*2=102ECh -11674h char *pItemsTXT_Raw; //11674h char *pRndItemsTXT_Raw; char *pStdItemsTXT_Raw; //1167Ch char *pSpcItemsTXT_Raw; //11680h unsigned int uChanceByTreasureLvlSumm[6]; //11684 unsigned int uBonusChanceStandart[6]; //1169c unsigned int uBonusChanceSpecial[6]; //116B4 unsigned int uBonusChanceWpSpecial[6]; //116cc -116e4 unsigned int pEnchantmentsSumm[9]; //116E4h -11708h BonusRange bonus_ranges[6]; //45C2h*4 =11708h unsigned int pSpecialEnchantmentsSumm[24]; //11738h unsigned int pSpecialEnchantments_count; //11798h char field_1179C; }; #pragma pack(pop) extern ItemGen *ptr_50C9A4; extern struct ItemsTable *pItemsTable;