aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 442305ef6b2..7d21f94f372 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -852,6 +852,26 @@ void ConditionMgr::LoadConditions(bool isReload)
case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION:
valid = addToGossipMenuItems(cond);
break;
+ case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT:
+ {
+ //if no list for npc create one
+ if (SpellClickEventConditionStore.find(cond->SourceGroup) == SpellClickEventConditionStore.end())
+ {
+ ConditionTypeContainer cmap;
+ SpellClickEventConditionStore[cond->SourceGroup] = cmap;
+ }
+ //if no list for spellclick spell create one
+ if (SpellClickEventConditionStore[cond->SourceGroup].find(cond->SourceEntry) == SpellClickEventConditionStore[cond->SourceGroup].end())
+ {
+ ConditionList clist;
+ SpellClickEventConditionStore[cond->SourceGroup][cond->SourceEntry] = clist;
+ }
+ SpellClickEventConditionStore[cond->SourceGroup][cond->SourceEntry].push_back(cond);
+ valid = true;
+ ++count;
+ continue; // do not add to m_AllocatedMemory to avoid double deleting
+ break;
+ }
case CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET:
valid = addToSpellImplicitTargetConditions(cond);
break;