*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
This commit is contained in:
QAston committed 2010-02-01 19:22:32 +01:00
1 parent 65705a16c1
commit a1256d88ee
13 files changed
+516 -216

No files matched your search

+4 -3
View File
@@ -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];
}