mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Zone::IsSpellBlocked should correctly handle spellid 0 (all spells) blocked in a region (type 2).
This commit is contained in:
parent
d7c110041a
commit
682054970c
@ -1952,24 +1952,16 @@ bool Zone::IsSpellBlocked(uint32 spell_id, const glm::vec3& location)
|
||||
}
|
||||
}
|
||||
|
||||
for (int x = 0; x < totalBS; x++)
|
||||
{
|
||||
// If spellid is 0, block all spells in the zone
|
||||
if (block_all)
|
||||
{
|
||||
// If the same zone has entries other than spellid 0, they act as exceptions and are allowed
|
||||
if (exception)
|
||||
// If all spells are blocked and this is an exception, it is not blocked
|
||||
if (block_all && exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
for (int x = 0; x < totalBS; x++)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (spell_id != blocked_spells[x].spellid)
|
||||
// Spellid of 0 matches all spells
|
||||
if (0 != blocked_spells[x].spellid && spell_id != blocked_spells[x].spellid)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1995,7 +1987,6 @@ bool Zone::IsSpellBlocked(uint32 spell_id, const glm::vec3& location)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user