aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXanadu <none@none>2010-07-31 04:12:30 +0200
committerXanadu <none@none>2010-07-31 04:12:30 +0200
commitae384ea8c759b96b6b887f790096ecf1bc90c3df (patch)
tree87cd49da0053417faf8464c7725d58d11fafcf5d
parentc8d8e4cb6b59c643d3700ac8cdd4981e7f6020c8 (diff)
Fixed a bug in CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET conditions loading checks.
--HG-- branch : trunk
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 814ba08f2fb..c835b4e8963 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -838,10 +838,10 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
for (int j = 0; j < 3; ++j)
{
- if (pSpellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_TARGET_ENEMY ||
- pSpellInfo->EffectImplicitTargetB[i] == TARGET_UNIT_TARGET_ENEMY ||
- pSpellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_TARGET_ANY ||
- pSpellInfo->EffectImplicitTargetB[i] == TARGET_UNIT_TARGET_ANY)
+ if (pSpellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ENEMY ||
+ pSpellInfo->EffectImplicitTargetB[j] == TARGET_UNIT_TARGET_ENEMY ||
+ pSpellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ANY ||
+ pSpellInfo->EffectImplicitTargetB[j] == TARGET_UNIT_TARGET_ANY)
{
bIsItemSpellValid = true;
break;
@@ -855,7 +855,8 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
if (!bIsItemSpellValid)
{
- sLog.outErrorDb("Conditions:ITEM_REQUIRED_TARGET used by item %u does not have implicit target TARGET_CHAIN_DAMAGE(6), TARGET_DUELVSPLAYER(25), already listed in scriptTargets or doesn't have item spelltrigger.", cond->mSourceEntry);
+ sLog.outErrorDb("Conditions: CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET for item %u, which either doesn't have item spelltrigger or its spells don't have implicit target "
+ "TARGET_UNIT_TARGET_ENEMY(6), TARGET_UNIT_TARGET_ANY(25), or the spells are already listed in CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET conditions.", cond->mSourceEntry);
break;
}
break;