mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 14:39:43 -04:00
Core/Spells: Ignore LoS when spells are cast/triggered by gameobjects
... and this is why you shouldn't use the so called hacks. You will just keep adding sh*t on top of more sh*t (like this). Currently, GO spell casts spawn an invisible WORLD_TRIGGER (npc 12999) inside of the gameobject (for certain forms of gameobjects) (and this is why the LoS check was failing). It shouldn't be like that. GOs should be able to cast the spells without having to spawn an auxiliary creature. Fixes "Eye of Acherus" and others
This commit is contained in:
@@ -1674,7 +1674,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
|
||||
else
|
||||
{
|
||||
trigger->setFaction(14);
|
||||
// Set owner guid for target if no owner avalible - needed by trigger auras
|
||||
// Set owner guid for target if no owner available - needed by trigger auras
|
||||
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
|
||||
trigger->CastSpell(target ? target : trigger, spellInfo, true, 0, 0, target ? target->GetGUID() : 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user