*Fix a bug that pet/charmed cannot AOE neutral creatures.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-19 19:45:54 -05:00
parent e1806419be
commit 68fd41d2c8
9 changed files with 61 additions and 31 deletions

View File

@@ -5761,7 +5761,7 @@ void Spell::EffectSummonCritter(uint32 i)
if(!critter)
return;
critter->SetOwnerGUID(m_caster->GetGUID());
critter->SetOwner(m_caster, true);
critter->SetCreatorGUID(m_caster->GetGUID());
critter->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
critter->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
@@ -6426,7 +6426,7 @@ void Spell::SummonTotem(uint32 entry, SummonPropertiesEntry const *properties)
if(slot >= SUMMON_SLOT_TOTEM && slot < MAX_TOTEM_SLOT)
m_caster->m_SummonSlot[slot] = pTotem->GetGUID();
pTotem->SetOwner(m_caster->GetGUID());
pTotem->SetOwner(m_caster);
pTotem->SetTypeBySummonSpell(m_spellInfo); // must be after Create call where m_spells initilized
int32 duration=GetSpellDuration(m_spellInfo);
@@ -6534,7 +6534,7 @@ void Spell::SummonVehicle(uint32 entry, SummonPropertiesEntry const *properties)
if(!vehicle)
return;
vehicle->SetOwnerGUID(m_caster->GetGUID());
vehicle->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID());
vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
if(damage)