mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
IsSpellBlocked converted to use xyz_location
This commit is contained in:
+2
-6
@@ -1869,7 +1869,7 @@ void Zone::ClearBlockedSpells()
|
||||
}
|
||||
}
|
||||
|
||||
bool Zone::IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz)
|
||||
bool Zone::IsSpellBlocked(uint32 spell_id, const xyz_location& location)
|
||||
{
|
||||
if (blocked_spells)
|
||||
{
|
||||
@@ -1919,12 +1919,8 @@ bool Zone::IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz)
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if ((( nx >= (blocked_spells[x].m_Location.m_X-blocked_spells[x].m_Difference.m_X)) && (nx <= (blocked_spells[x].m_Location.m_X+blocked_spells[x].m_Difference.m_X))) &&
|
||||
(( ny >= (blocked_spells[x].m_Location.m_Y-blocked_spells[x].m_Difference.m_Y)) && (ny <= (blocked_spells[x].m_Location.m_Y+blocked_spells[x].m_Difference.m_Y))) &&
|
||||
(( nz >= (blocked_spells[x].m_Location.m_Z-blocked_spells[x].m_Difference.m_Z)) && (nz <= (blocked_spells[x].m_Location.m_Z+blocked_spells[x].m_Difference.m_Z))))
|
||||
{
|
||||
if (!IsWithinAxisAlignedBox(location, blocked_spells[x].m_Location - blocked_spells[x].m_Difference, blocked_spells[x].m_Location + blocked_spells[x].m_Difference))
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user