Core/Spell: fix LoS checks for GameObject spells

Closes #21580
This commit is contained in:
ariel- authored and Ovahlord committed 2020-09-11 15:11:24 +02:00
1 parent d34eb1a276
commit dcd017bbad
2 files changed
+18

No files matched your search

@@ -456,6 +456,19 @@ struct GameObjectTemplate
}
}
bool IsIgnoringLOSChecks() const
{
switch (type)
{
case GAMEOBJECT_TYPE_BUTTON: return button.losOK == 0;
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.losOK == 0;
case GAMEOBJECT_TYPE_CHEST: return chest.losOK == 0;
case GAMEOBJECT_TYPE_GOOBER: return goober.losOK == 0;
case GAMEOBJECT_TYPE_FLAGSTAND: return flagstand.losOK == 0;
default: return false;
}
}
uint32 GetLockId() const
{
switch (type)