Add quest rewards to gear initialization

This commit is contained in:
Yunfan Li
2024-08-19 18:46:23 +08:00
parent 0be18889e5
commit 1700a20c89
9 changed files with 151 additions and 122 deletions

View File

@@ -13,7 +13,8 @@
((1 << ITEM_SUBCLASS_WEAPON_AXE) | (1 << ITEM_SUBCLASS_WEAPON_MACE) | (1 << ITEM_SUBCLASS_WEAPON_SWORD) | \
(1 << ITEM_SUBCLASS_WEAPON_DAGGER) | (1 << ITEM_SUBCLASS_WEAPON_FIST))
enum StatsOverflowThreshold {
enum StatsOverflowThreshold
{
SPELL_HIT_OVERFLOW = 17,
MELEE_HIT_OVERFLOW = 8,
RANGED_HIT_OVERFLOW = 8,
@@ -30,6 +31,10 @@ public:
float CalculateItem(uint32 itemId);
float CalculateEnchant(uint32 enchantId);
void SetOverflowPenalty(bool apply) { enable_overflow_penalty_ = apply; }
void SetItemSetBonus(bool apply) { enable_item_set_bonus_ = apply; }
void SetQualityBlend(bool apply) { enable_quality_blend_ = apply; }
private:
void GenerateWeights(Player* player);
void GenerateBasicWeights(Player* player);
@@ -53,7 +58,7 @@ private:
bool enable_overflow_penalty_;
bool enable_item_set_bonus_;
bool enable_quality_blend_;
float weight_;
float stats_weights_[STATS_TYPE_MAX];
};