mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-12 09:52:34 +00:00
GetSpellBlockedMessage converted to xyz_location
This commit is contained in:
parent
81d2e7d242
commit
fb9d76f851
@ -522,7 +522,7 @@ bool Mob::DoCastingChecks()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())) {
|
if (zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())) {
|
||||||
const char *msg = zone->GetSpellBlockedMessage(spell_id, GetX(), GetY(), GetZ());
|
const char *msg = zone->GetSpellBlockedMessage(spell_id, GetPosition());
|
||||||
if (msg) {
|
if (msg) {
|
||||||
Message(13, msg);
|
Message(13, msg);
|
||||||
return false;
|
return false;
|
||||||
@ -1894,7 +1894,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
|||||||
if(IsClient() && !CastToClient()->GetGM()){
|
if(IsClient() && !CastToClient()->GetGM()){
|
||||||
|
|
||||||
if(zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())){
|
if(zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())){
|
||||||
const char *msg = zone->GetSpellBlockedMessage(spell_id, GetX(), GetY(), GetZ());
|
const char *msg = zone->GetSpellBlockedMessage(spell_id, GetPosition());
|
||||||
if(msg){
|
if(msg){
|
||||||
Message(13, msg);
|
Message(13, msg);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -1939,7 +1939,7 @@ bool Zone::IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Zone::GetSpellBlockedMessage(uint32 spell_id, float nx, float ny, float nz)
|
const char* Zone::GetSpellBlockedMessage(uint32 spell_id, const xyz_location& location)
|
||||||
{
|
{
|
||||||
if(blocked_spells)
|
if(blocked_spells)
|
||||||
{
|
{
|
||||||
@ -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].m_Difference.m_X)) && (nx < (blocked_spells[x].m_Location.m_X+blocked_spells[x].m_Difference.m_X))) &&
|
if((( location.m_X > (blocked_spells[x].m_Location.m_X-blocked_spells[x].m_Difference.m_X)) && (location.m_X < (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))) &&
|
(( location.m_Y > (blocked_spells[x].m_Location.m_Y-blocked_spells[x].m_Difference.m_Y)) && (location.m_Y < (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))))
|
(( location.m_Z > (blocked_spells[x].m_Location.m_Z-blocked_spells[x].m_Difference.m_Z)) && (location.m_Z < (blocked_spells[x].m_Location.m_Z+blocked_spells[x].m_Difference.m_Z))))
|
||||||
{
|
{
|
||||||
return blocked_spells[x].message;
|
return blocked_spells[x].message;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -246,7 +246,7 @@ public:
|
|||||||
void LoadBlockedSpells(uint32 zoneid);
|
void LoadBlockedSpells(uint32 zoneid);
|
||||||
void ClearBlockedSpells();
|
void ClearBlockedSpells();
|
||||||
bool IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz);
|
bool IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz);
|
||||||
const char *GetSpellBlockedMessage(uint32 spell_id, float nx, float ny, float nz);
|
const char *GetSpellBlockedMessage(uint32 spell_id, const xyz_location& location);
|
||||||
int GetTotalBlockedSpells() { return totalBS; }
|
int GetTotalBlockedSpells() { return totalBS; }
|
||||||
inline bool HasMap() { return zonemap != nullptr; }
|
inline bool HasMap() { return zonemap != nullptr; }
|
||||||
inline bool HasWaterMap() { return watermap != nullptr; }
|
inline bool HasWaterMap() { return watermap != nullptr; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user