Mercurial > mm7
diff Items.h @ 1611:8e99b4a7176f
Слияние
author | Ritor1 |
---|---|
date | Sat, 14 Sep 2013 10:28:23 +0600 |
parents | 4b79ff62df3a |
children | a4390cef284c |
line wrap: on
line diff
--- a/Items.h Sat Sep 14 10:28:13 2013 +0600 +++ b/Items.h Sat Sep 14 10:28:23 2013 +0600 @@ -1,5 +1,6 @@ #pragma once #include <array> +#include <map> enum DAMAGE_TYPE:unsigned int { @@ -135,10 +136,22 @@ ITEM_FORGE_GAUNTLETS = 534, ITEM_ARTIFACT_HEROS_BELT = 535,//217 ITEM_ARTIFACT_LADYS_ESCORT = 536, + ITEM_RARE_CLANKERS_AMULET = 537, + ITEM_RARE_LIETENANTS_CUTLASS = 538, + ITEM_RARE_MEDUSAS_MIRROR = 539, + ITEM_RARE_LADY_CARMINES_DAGGER = 540, + ITEM_RARE_VILLAINS_BLADE = 541, + ITEM_RARE_PERFECT_BOW = 542, + ITEM_RARE_PERFECT_BOW_FIXED = 543, ITEM_RARE_SHADOWS_MASK = 544,//220 + ITEM_RARE_GHOST_RING = 545,//220 + ITEM_RARE_FAERIE_RING = 546,//220 ITEM_RARE_SUN_CLOAK = 547,//223 ITEM_RARE_MOON_CLOAK = 548,//224 + ITEM_RARE_ZOKKARS_AXE = 549,//224 ITEM_RARE_VAMPIRES_CAPE = 550,//226 + ITEM_RARE_MINOTAURS_AXE = 551,//226 + ITEM_RARE_GROGNARDS_CUTLASS = 552,//226 ITEM_LICH_JAR_FULL = 601, ITEM_WETSUIT = 604, ITEM_LICH_JAR_EMPTY = 615, @@ -173,7 +186,19 @@ EQUIP_NONE = 20 }; +enum CHARACTER_ATTRIBUTE_TYPE; +struct Player; +typedef struct CEnchantment +{ + CEnchantment(int bonus, unsigned __int16 Player::* skillPtr = NULL): +statBonus(bonus), + statPtr(skillPtr) +{ +} +int statBonus; +unsigned __int16 Player::* statPtr; +} CEnchantment; /* 64 */ #pragma pack(push, 1) @@ -184,6 +209,23 @@ // { // Reset(); // } + static void AddToMap(std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > &maptoadd, + int enchId, + CHARACTER_ATTRIBUTE_TYPE attrId, + int bonusValue = 0, + unsigned __int16 Player::* skillPtr = NULL); + + static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > regularBonusMap; + static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > specialBonusMap; + static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > artifactBonusMap; + + static void PopulateSpecialBonusMap(); + static void PopulateRegularBonusMap(); + static void PopulateArtifactBonusMap(); + + 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); inline bool IsBroken() {return (uAttributes & ITEM_BROKEN) != 0;} inline void SetBroken() {uAttributes |= ITEM_BROKEN;} @@ -204,7 +246,7 @@ int uItemID; //0 int uEnchantmentType; //4 - int _bonus_strength; //8 + int m_enchantmentStrength; //8 int uSpecEnchantmentType; // 25 +5 levels //0c // 16 Drain Hit Points from target. // 35 Increases chance of disarming.