Core/Spells: Moved setting UNIT_CREATED_BY_SPELL out of spell effect handlers and sending SMSG_TOTEM_CREATED into Totem class

This commit is contained in:
Shauren
2011-05-19 22:27:18 +02:00
parent f03bdceaff
commit ac4ed1efdf
7 changed files with 109 additions and 90 deletions

View File

@@ -1397,16 +1397,15 @@ class spell_putricide_mutated_transformation : public SpellScriptLoader
Position pos;
caster->GetPosition(&pos);
TempSummon* summon = caster->GetMap()->SummonCreature(entry, pos, properties, duration, caster);
TempSummon* summon = caster->GetMap()->SummonCreature(entry, pos, properties, duration, caster, GetSpellInfo()->Id);
if (!summon || !summon->IsVehicle())
return;
caster->CastSpell(summon, SPELL_MUTATED_TRANSFORMATION_NAME, true);
summon->CastSpell(summon, SPELL_ABOMINATION_VEHICLE_POWER_DRAIN, true);
summon->CastSpell(summon, SPELL_MUTATED_TRANSFORMATION_DAMAGE, true);
caster->EnterVehicle(summon, 0);
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, GetSpellInfo()->Id);
caster->EnterVehicle(summon, 0);
summon->SetCreatorGUID(caster->GetGUID());
putricide->AI()->JustSummoned(summon);
}