mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 21:12:26 +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())) {
|
||||
const char *msg = zone->GetSpellBlockedMessage(spell_id, GetX(), GetY(), GetZ());
|
||||
const char *msg = zone->GetSpellBlockedMessage(spell_id, GetPosition());
|
||||
if (msg) {
|
||||
Message(13, msg);
|
||||
return false;
|
||||
@ -1894,7 +1894,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
if(IsClient() && !CastToClient()->GetGM()){
|
||||
|
||||
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){
|
||||
Message(13, msg);
|
||||
return false;
|
||||
|
||||
@ -1939,7 +1939,7 @@ bool Zone::IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz)
|
||||
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)
|
||||
{
|
||||
@ -1957,9 +1957,9 @@ const char* Zone::GetSpellBlockedMessage(uint32 spell_id, float nx, float ny, fl
|
||||
}
|
||||
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((( 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))) &&
|
||||
(( 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))) &&
|
||||
(( 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;
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ public:
|
||||
void LoadBlockedSpells(uint32 zoneid);
|
||||
void ClearBlockedSpells();
|
||||
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; }
|
||||
inline bool HasMap() { return zonemap != nullptr; }
|
||||
inline bool HasWaterMap() { return watermap != nullptr; }
|
||||
@ -324,7 +324,7 @@ private:
|
||||
Timer* Instance_Warning_timer;
|
||||
LinkedList<ZoneClientAuth_Struct*> client_auth_list;
|
||||
QGlobalCache *qGlobals;
|
||||
|
||||
|
||||
Timer hotzone_timer;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user