diff --git a/changelog.txt b/changelog.txt index e22f02697..f0dd21757 100644 --- a/changelog.txt +++ b/changelog.txt @@ -14,6 +14,7 @@ Kayen: Minor fixes to how lifetap from melee effects are calced. Removed arbitra Kayen: Fix to issue that prevented NPC's from receiving HP Regeneration derived from spell buffs. Kayen: Fixes and Updates for melee and spell mitigation runes. Kayen: Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed. DOT ticks will no longer be absorbed. +Kayen: Implemented SE_Metabolism - Modifies food/drink consumption rates. [Data for AA is already in database] == 06/13/2014 == Kayen: For table 'npc_spell_effects_entries' setting se_max for damage shield effects (59) will now determine the DS Type (ie burning) diff --git a/common/spdat.h b/common/spdat.h index 3cd4a232a..b302e8314 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -380,7 +380,7 @@ typedef enum { //#define SE_ExtendedShielding 230 // not used as bonus - increase range of /shield ability #define SE_StunBashChance 231 // implemented - increase chance to stun from bash. #define SE_DivineSave 232 // implemented (base1 == % chance on death to insta-res) (base2 == spell cast on save) -//#define SE_Metabolism 233 // *not implemented - (Crown of Feathers) Increase metabolism? +#define SE_Metabolism 233 // implemented - Modifies food/drink consumption rates. //#define SE_ReduceApplyPoisonTime 234 // not implemented as bonus - reduces the time to apply poison #define SE_ChannelChanceSpells 235 // implemented[AA] - chance to channel from SPELLS *No longer used on live. //#define SE_FreePet 236 // not used diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 481ec668a..3ce6becca 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1264,6 +1264,10 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon) newbon->BerserkSPA = true; break; + case SE_Metabolism: + newbon->Metabolism += base1; + break; + } } } @@ -2729,6 +2733,11 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne newbon->BerserkSPA = true; break; + + case SE_Metabolism: + newbon->Metabolism += effect_value; + break; + //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { @@ -4130,6 +4139,12 @@ void Mob::NegateSpellsBonuses(uint16 spell_id) aabonuses.Vampirism = effect_value; itembonuses.Vampirism = effect_value; break; + + case SE_Metabolism: + spellbonuses.Metabolism = effect_value; + aabonuses.Metabolism = effect_value; + itembonuses.Metabolism = effect_value; + break; } } diff --git a/zone/client.cpp b/zone/client.cpp index 7aa7bd748..2ce193346 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -8134,20 +8134,12 @@ void Client::Consume(const Item_Struct *item, uint8 type, int16 slot, bool auto_ uint16 cons_mod = 180; - switch(GetAA(aaInnateMetabolism)){ - case 1: - cons_mod = cons_mod * 110 * RuleI(Character, ConsumptionMultiplier) / 10000; - break; - case 2: - cons_mod = cons_mod * 125 * RuleI(Character, ConsumptionMultiplier) / 10000; - break; - case 3: - cons_mod = cons_mod * 150 * RuleI(Character, ConsumptionMultiplier) / 10000; - break; - default: - cons_mod = cons_mod * RuleI(Character, ConsumptionMultiplier) / 100; - break; - } + int16 metabolism_bonus = spellbonuses.Metabolism + itembonuses.Metabolism + aabonuses.Metabolism; + + if (metabolism_bonus) + cons_mod = cons_mod * metabolism_bonus* RuleI(Character, ConsumptionMultiplier) / 10000; + else + cons_mod = cons_mod * RuleI(Character, ConsumptionMultiplier) / 100; if(type == ItemTypeFood) { diff --git a/zone/common.h b/zone/common.h index b687d07df..f94962ee1 100644 --- a/zone/common.h +++ b/zone/common.h @@ -356,7 +356,8 @@ struct StatBonuses { bool BStacker; // For buff stack blocking bool CStacker; // For buff stack blocking bool DStacker; // For buff stack blocking - bool BerserkSPA; // berserk effect + bool BerserkSPA; // berserk effect + int16 Metabolism; // Food/drink consumption rates. // AAs int8 Packrat; //weight reduction for items, 1 point = 10% diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index af20d3734..b46f34a6e 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2901,6 +2901,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) case SE_DoubleRiposte: case SE_Berserk: case SE_Vampirism: + case SE_Metabolism: { break; }