aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-10-25 13:20:28 +0100
committerShauren <shauren.trinity@gmail.com>2015-10-31 20:26:40 +0100
commitcba122ad94af5081fa748c5d77842dd5205e7b67 (patch)
treebb57c52139182732828290cd84442d82a2d319a1 /src/server/game/Spells/Spell.cpp
parent57c4b3d42cbd5052313ef30ecc803d276985810a (diff)
Core/Conditions: Optimizations part 3 removed copying condition containers all over the place
(cherry picked from commit b09e63e9debfab49e635a591339294dd96b09d95)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 3e7c1cb9d60..c026d10241e 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4789,10 +4789,8 @@ SpellCastResult Spell::CheckCast(bool strict)
// check spell cast conditions from database
{
- ConditionSourceInfo condInfo = ConditionSourceInfo(m_caster);
- condInfo.mConditionTargets[1] = m_targets.GetObjectTarget();
- ConditionContainer conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id);
- if (!conditions.empty() && !sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
+ ConditionSourceInfo condInfo = ConditionSourceInfo(m_caster, m_targets.GetObjectTarget());
+ if (!sConditionMgr->IsObjectMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id, condInfo))
{
// mLastFailedCondition can be NULL if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others)
if (condInfo.mLastFailedCondition && condInfo.mLastFailedCondition->ErrorType)