aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Conditions
diff options
context:
space:
mode:
authorjoschiwald <joschiwald@online.de>2012-12-22 01:37:54 +0100
committerjoschiwald <joschiwald@online.de>2012-12-22 01:37:54 +0100
commitc19f78c36321aead01cc7ceb9fd80f049bf11c0f (patch)
tree5d747db6f0a310f96421d5fc11b20d5cd334741a /src/server/game/Conditions
parent95a201352d025ba2864e12f4c01c5b753128a756 (diff)
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
Diffstat (limited to 'src/server/game/Conditions')
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp2
-rw-r--r--src/server/game/Conditions/ConditionMgr.h3
2 files changed, 4 insertions, 1 deletions
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