Core/Spells: Added partial support for Mixology (duration boost)

Update issue #4097.
Status: Confirmed
Implemented duration part, waiting for the rest

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-09-29 20:44:14 +02:00
parent 442b312cbf
commit 1ae3459cff
+17 -2
View File
@@ -12763,8 +12763,23 @@ int32 Unit::ModSpellDuration(SpellEntry const* spellProto, Unit const* target, i
if (durationMod != 0) if (durationMod != 0)
duration = int32(float(duration) * float(100.0f+durationMod) / 100.0f); duration = int32(float(duration) * float(100.0f+durationMod) / 100.0f);
} }
//else positive mods here, there are no currently else
//when there will be, change GetTotalAuraModifierByMiscValue to GetTotalPositiveAuraModifierByMiscValue {
//else positive mods here, there are no currently
//when there will be, change GetTotalAuraModifierByMiscValue to GetTotalPositiveAuraModifierByMiscValue
// Mixology - duration boost
if (target->GetTypeId() == TYPEID_PLAYER)
{
if (spellProto->SpellFamilyName == SPELLFAMILY_POTION && (
sSpellMgr.IsSpellMemberOfSpellGroup(spellProto->Id, SPELL_GROUP_ELIXIR_BATTLE) ||
sSpellMgr.IsSpellMemberOfSpellGroup(spellProto->Id, SPELL_GROUP_ELIXIR_GUARDIAN)))
{
if (target->HasAura(53042) && target->HasSpell(spellProto->EffectTriggerSpell[0]))
duration *= 2;
}
}
}
// Glyphs which increase duration of selfcasted buffs // Glyphs which increase duration of selfcasted buffs
if (target == this) if (target == this)