Core/Conditions: Optimizations part 3 removed copying condition containers all over the place
(cherry picked from commit b09e63e9debfab49e635a591339294dd96b09d95)
This commit is contained in:
1 parent
57c4b3d42c
commit
cba122ad94
12 files changed
+131
-118
No files matched your search
@@ -14181,9 +14181,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
continue;
|
||||
|
||||
// do checks using conditions table
|
||||
ConditionContainer conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_PROC, spellProto->Id);
|
||||
ConditionSourceInfo condInfo = ConditionSourceInfo(eventInfo.GetActor(), eventInfo.GetActionTarget());
|
||||
if (!sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
|
||||
if (!sConditionMgr->IsObjectMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_SPELL_PROC, spellProto->Id, eventInfo.GetActor(), eventInfo.GetActionTarget()))
|
||||
continue;
|
||||
|
||||
// AuraScript Hook
|
||||
@@ -16887,9 +16885,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
continue;
|
||||
|
||||
//! Check database conditions
|
||||
ConditionContainer conds = sConditionMgr->GetConditionsForSpellClickEvent(spellClickEntry, itr->second.spellId);
|
||||
ConditionSourceInfo info = ConditionSourceInfo(clicker, this);
|
||||
if (!sConditionMgr->IsObjectMeetToConditions(info, conds))
|
||||
if (!sConditionMgr->IsObjectMeetingSpellClickConditions(spellClickEntry, itr->second.spellId, clicker, this))
|
||||
continue;
|
||||
|
||||
Unit* caster = (itr->second.castFlags & NPC_CLICK_CAST_CASTER_CLICKER) ? clicker : this;
|
||||
|
||||
Reference in new issue
Block a user