*Fix a crash caused by passive traps.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-15 09:49:16 -05:00
parent 9777004606
commit f53b049759

View File

@@ -1395,7 +1395,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
trigger->setFaction(14);
// Set owner guid for target if no owner avalible - needed by trigger auras
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
trigger->CastSpell(target, spellInfo, true, 0, 0, target->GetGUID());
trigger->CastSpell(target, spellInfo, true, 0, 0, target ? target->GetGUID() : 0);
}
//trigger->setDeathState(JUST_DIED);
//trigger->RemoveCorpse();