aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <none@none>2010-09-29 20:44:14 +0200
committerShauren <none@none>2010-09-29 20:44:14 +0200
commit1ae3459cff09c138be5332ab5302394dd9a3b1ab (patch)
tree6748a9df00af054233f7f01a8059d09a0bdccfbe
parent442b312cbf5c21f789cdd9d09bc32b9c4121c214 (diff)
Core/Spells: Added partial support for Mixology (duration boost)
Update issue #4097. Status: Confirmed Implemented duration part, waiting for the rest --HG-- branch : trunk
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 834fdd84bd3..40c269fb920 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12763,8 +12763,23 @@ int32 Unit::ModSpellDuration(SpellEntry const* spellProto, Unit const* target, i
if (durationMod != 0)
duration = int32(float(duration) * float(100.0f+durationMod) / 100.0f);
}
- //else positive mods here, there are no currently
- //when there will be, change GetTotalAuraModifierByMiscValue to GetTotalPositiveAuraModifierByMiscValue
+ else
+ {
+ //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
if (target == this)