From c19f78c36321aead01cc7ceb9fd80f049bf11c0f Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 22 Dec 2012 01:37:54 +0100 Subject: Core/Conditions: implement CONDITION_SOURCE_TYPE_SPELL_PROC and use it in old and new proc system Usage: SourceTypeOrReferenceId: 24 - SourceGroup: always 0 - SourceEntry: spell id of aura which triggers the proc - ConditionTarget: * 0 - Actor * 1 - ActionTarget --- src/server/game/Conditions/ConditionMgr.cpp | 2 ++ src/server/game/Conditions/ConditionMgr.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server/game/Conditions') diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 37835618183..d6cd0690f59 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -473,6 +473,7 @@ uint32 Condition::GetMaxAvailableConditionTargets() case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION: case CONDITION_SOURCE_TYPE_SMART_EVENT: case CONDITION_SOURCE_TYPE_NPC_VENDOR: + case CONDITION_SOURCE_TYPE_SPELL_PROC: return 2; default: return 1; @@ -1387,6 +1388,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) break; } case CONDITION_SOURCE_TYPE_SPELL: + case CONDITION_SOURCE_TYPE_SPELL_PROC: { SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry); if (!spellProto) diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 807b75c4ee6..2b3f904eeb9 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -128,7 +128,8 @@ enum ConditionSourceType CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21, CONDITION_SOURCE_TYPE_SMART_EVENT = 22, CONDITION_SOURCE_TYPE_NPC_VENDOR = 23, - CONDITION_SOURCE_TYPE_MAX = 24 // MAX + CONDITION_SOURCE_TYPE_SPELL_PROC = 24, + CONDITION_SOURCE_TYPE_MAX = 25 // MAX }; enum ComparisionType -- cgit v1.2.3