diff --git a/zone/zone.cpp b/zone/zone.cpp index eaf73f1da..946f432f9 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1919,9 +1919,9 @@ bool Zone::IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz) } case 2: { - if ((( nx >= (blocked_spells[x].x-blocked_spells[x].xdiff)) && (nx <= (blocked_spells[x].x+blocked_spells[x].xdiff))) && - (( ny >= (blocked_spells[x].y-blocked_spells[x].ydiff)) && (ny <= (blocked_spells[x].y+blocked_spells[x].ydiff))) && - (( nz >= (blocked_spells[x].z-blocked_spells[x].zdiff)) && (nz <= (blocked_spells[x].z+blocked_spells[x].zdiff)))) + if ((( nx >= (blocked_spells[x].m_Location.m_X-blocked_spells[x].xdiff)) && (nx <= (blocked_spells[x].m_Location.m_X+blocked_spells[x].xdiff))) && + (( ny >= (blocked_spells[x].m_Location.m_Y-blocked_spells[x].ydiff)) && (ny <= (blocked_spells[x].m_Location.m_Y+blocked_spells[x].ydiff))) && + (( nz >= (blocked_spells[x].m_Location.m_Z-blocked_spells[x].zdiff)) && (nz <= (blocked_spells[x].m_Location.m_Z+blocked_spells[x].zdiff)))) { return true; } @@ -1957,9 +1957,9 @@ const char* Zone::GetSpellBlockedMessage(uint32 spell_id, float nx, float ny, fl } case 2: { - if((( nx > (blocked_spells[x].x-blocked_spells[x].xdiff)) && (nx < (blocked_spells[x].x+blocked_spells[x].xdiff))) && - (( ny > (blocked_spells[x].y-blocked_spells[x].ydiff)) && (ny < (blocked_spells[x].y+blocked_spells[x].ydiff))) && - (( nz > (blocked_spells[x].z-blocked_spells[x].zdiff)) && (nz < (blocked_spells[x].z+blocked_spells[x].zdiff)))) + if((( nx > (blocked_spells[x].m_Location.m_X-blocked_spells[x].xdiff)) && (nx < (blocked_spells[x].m_Location.m_X+blocked_spells[x].xdiff))) && + (( ny > (blocked_spells[x].m_Location.m_Y-blocked_spells[x].ydiff)) && (ny < (blocked_spells[x].m_Location.m_Y+blocked_spells[x].ydiff))) && + (( nz > (blocked_spells[x].m_Location.m_Z-blocked_spells[x].zdiff)) && (nz < (blocked_spells[x].m_Location.m_Z+blocked_spells[x].zdiff)))) { return blocked_spells[x].message; } diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 3b9c69943..740b67a49 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -2666,9 +2666,7 @@ bool ZoneDatabase::LoadBlockedSpells(int32 blockedSpellsCount, ZoneSpellsBlocked memset(&into[index], 0, sizeof(ZoneSpellsBlocked)); into[index].spellid = atoi(row[1]); into[index].type = atoi(row[2]); - into[index].x = atof(row[3]); - into[index].y = atof(row[4]); - into[index].z = atof(row[5]); + into[index].m_Location = xyz_location(atof(row[3]), atof(row[4]), atof(row[5])); into[index].xdiff = atof(row[6]); into[index].ydiff = atof(row[7]); into[index].zdiff = atof(row[8]); diff --git a/zone/zonedb.h b/zone/zonedb.h index 2dc240817..73192f8d2 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -116,9 +116,7 @@ struct PetInfo { struct ZoneSpellsBlocked { uint32 spellid; int8 type; - float x; - float y; - float z; + xyz_location m_Location; float xdiff; float ydiff; float zdiff;