aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2010-02-01 19:22:32 +0100
committerQAston <none@none>2010-02-01 19:22:32 +0100
commita1256d88ee4cb4295e38fcf5f85581e9b1d8c876 (patch)
tree5ba85162a48efeeedf9b31bd7dbf5fa18ca8488e /src/game/ObjectMgr.cpp
parent65705a16c148d06e1b7f029edd98756dbef24489 (diff)
*drop spell_elixir table
*add spell_group table for storage of groups of spell (kinda obvious, isn't it?) and populate the table with converted spell_elixir table data *the table is going to be maintained by core team *fix percentage display at spell_ranks table loading *add TARGET_UNIT_CASTER to allowed learn spell targets in npc_trainer table, thanks to Aokromes for noticing the issue. --HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 4f9f2b1faa2..0fd304b9c3c 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -8020,14 +8020,15 @@ void ObjectMgr::LoadTrainerSpell()
{
if(spellinfo->Effect[i] != SPELL_EFFECT_LEARN_SPELL)
continue;
+ if (trainerSpell.learnedSpell[0] == spell)
+ trainerSpell.learnedSpell[0] = 0;
// player must be able to cast spell on himself
- if (spellinfo->EffectImplicitTargetA[i] != 0 && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ALLY && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ANY)
+ if (spellinfo->EffectImplicitTargetA[i] != 0 && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ALLY
+ && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ANY && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_CASTER)
{
sLog.outErrorDb("Table `npc_trainer` has spell %u for trainer entry %u with learn effect which has incorrect target type, ignoring learn effect!", spell, entry);
continue;
}
- if (trainerSpell.learnedSpell[0] == spell)
- trainerSpell.learnedSpell[0] = 0;
trainerSpell.learnedSpell[i] = spellinfo->EffectTriggerSpell[i];
}