aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorTraesh <Traesh@users.noreply.github.com>2017-01-29 00:00:43 +0100
committerjoschiwald <joschiwald.trinity@gmail.com>2017-01-29 00:00:43 +0100
commit6ab3877c91c9440b81cf1c7c66a1275ee04ea26a (patch)
tree9930d19512eef247d1c0a23284caa446ceef21c8 /src/server/game/Spells/SpellInfo.cpp
parent5818dd364ca6a8b0cb068710291adf26b571aa23 (diff)
Core/Entities: Basic AreaTrigger System (#18035)
* Implemented AreaTrigger Templates * Implemented AreaTrigger Splines * Implemented SPELL_AURA_AREA_TRIGGER * and many more
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index ccc5d81d5c8..c08a0c43374 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -2445,6 +2445,17 @@ float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
return range;
}
+int32 SpellInfo::CalcDuration(Unit* caster /*= nullptr*/) const
+{
+ int32 duration = GetDuration();
+
+ if (caster)
+ if (Player* modOwner = caster->GetSpellModOwner())
+ modOwner->ApplySpellMod(Id, SPELLMOD_DURATION, duration);
+
+ return duration;
+}
+
int32 SpellInfo::GetDuration() const
{
if (!DurationEntry)