From cba122ad94af5081fa748c5d77842dd5205e7b67 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 25 Oct 2015 13:20:28 +0100 Subject: Core/Conditions: Optimizations part 3 removed copying condition containers all over the place (cherry picked from commit b09e63e9debfab49e635a591339294dd96b09d95) --- src/server/game/Spells/Spell.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') 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) -- cgit v1.2.3