mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-03 21:42:26 +00:00
xdiff, ydiff, and zdiff in ZoneSpellsBlocked converted to xyz_location m_Difference
This commit is contained in:
parent
2fe80d32f9
commit
81d2e7d242
@ -1919,9 +1919,9 @@ bool Zone::IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz)
|
|||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
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))) &&
|
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].ydiff)) && (ny <= (blocked_spells[x].m_Location.m_Y+blocked_spells[x].ydiff))) &&
|
(( 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].zdiff)) && (nz <= (blocked_spells[x].m_Location.m_Z+blocked_spells[x].zdiff))))
|
(( 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))))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1957,9 +1957,9 @@ const char* Zone::GetSpellBlockedMessage(uint32 spell_id, float nx, float ny, fl
|
|||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
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))) &&
|
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].ydiff)) && (ny < (blocked_spells[x].m_Location.m_Y+blocked_spells[x].ydiff))) &&
|
(( 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].zdiff)) && (nz < (blocked_spells[x].m_Location.m_Z+blocked_spells[x].zdiff))))
|
(( 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))))
|
||||||
{
|
{
|
||||||
return blocked_spells[x].message;
|
return blocked_spells[x].message;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2667,9 +2667,7 @@ bool ZoneDatabase::LoadBlockedSpells(int32 blockedSpellsCount, ZoneSpellsBlocked
|
|||||||
into[index].spellid = atoi(row[1]);
|
into[index].spellid = atoi(row[1]);
|
||||||
into[index].type = atoi(row[2]);
|
into[index].type = atoi(row[2]);
|
||||||
into[index].m_Location = xyz_location(atof(row[3]), atof(row[4]), 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].m_Difference = xyz_location(atof(row[6]), atof(row[7]), atof(row[8]));
|
||||||
into[index].ydiff = atof(row[7]);
|
|
||||||
into[index].zdiff = atof(row[8]);
|
|
||||||
strn0cpy(into[index].message, row[9], 255);
|
strn0cpy(into[index].message, row[9], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -117,9 +117,7 @@ struct ZoneSpellsBlocked {
|
|||||||
uint32 spellid;
|
uint32 spellid;
|
||||||
int8 type;
|
int8 type;
|
||||||
xyz_location m_Location;
|
xyz_location m_Location;
|
||||||
float xdiff;
|
xyz_location m_Difference;
|
||||||
float ydiff;
|
|
||||||
float zdiff;
|
|
||||||
char message[256];
|
char message[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user