From 29573d7d19fe323acd9b21e41e4da7d3062e7b80 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Wed, 26 Nov 2014 19:24:28 -0800 Subject: [PATCH] InLava converted to xyz_location --- zone/command.cpp | 4 ++-- zone/forage.cpp | 2 +- zone/water_map.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 5f4d16aaf..7499edd6b 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7635,7 +7635,7 @@ void command_bestz(Client *c, const Seperator *sep) { auto position = xyz_location(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z); RegionType = zone->watermap->ReturnRegionType(position); c->Message(0,"InWater returns %d", zone->watermap->InWater(position)); - c->Message(0,"InLava returns %d", zone->watermap->InLava(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z)); + c->Message(0,"InLava returns %d", zone->watermap->InLava(position)); } else { @@ -7643,7 +7643,7 @@ void command_bestz(Client *c, const Seperator *sep) { auto position = xyz_location(c->GetX(), c->GetY(), z); RegionType = zone->watermap->ReturnRegionType(position); c->Message(0,"InWater returns %d", zone->watermap->InWater(position)); - c->Message(0,"InLava returns %d", zone->watermap->InLava(c->GetX(), c->GetY(), z)); + c->Message(0,"InLava returns %d", zone->watermap->InLava(position)); } diff --git a/zone/forage.cpp b/zone/forage.cpp index 34bfdbc12..459fee6a7 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -237,7 +237,7 @@ bool Client::CanFish() { dest.z = m_Position.m_Z+10; rodPosition.m_Z = zone->zonemap->FindBestZ(dest, nullptr) + 4; - bool in_lava = zone->watermap->InLava(rodPosition.m_X, rodPosition.m_Y, rodPosition.m_Z); + bool in_lava = zone->watermap->InLava(rodPosition); bool in_water = zone->watermap->InWater(rodPosition) || zone->watermap->InVWater(rodPosition); //Message(0, "Rod is at %4.3f, %4.3f, %4.3f, InWater says %d, InLava says %d", RodX, RodY, RodZ, in_water, in_lava); if (in_lava) { diff --git a/zone/water_map.h b/zone/water_map.h index d8428a6ef..82de8cc2d 100644 --- a/zone/water_map.h +++ b/zone/water_map.h @@ -28,7 +28,7 @@ public: virtual WaterRegionType ReturnRegionType(const xyz_location& location) const { return RegionTypeNormal; } virtual bool InWater(const xyz_location& location) const { return false; } virtual bool InVWater(const xyz_location& location) const { return false; } - virtual bool InLava(float y, float x, float z) const { return false; } + virtual bool InLava(const xyz_location& location) const { return false; } virtual bool InLiquid(float y, float x, float z) const { return false; } protected: