From b09e63e9debfab49e635a591339294dd96b09d95 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 --- 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 68bf45f2213..3045a0807ca 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4821,10 +4821,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