fix: Cleanup IPoint3D calls (#704)
This commit is contained in:
parent
788b04b958
commit
3293ffcf06
33 changed files with 158 additions and 264 deletions
|
|
@ -245,7 +245,7 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
m_From.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
|
||||
}
|
||||
else if (m_From.Map == arena.Facet && arena.Zone.Contains(m_From))
|
||||
else if (m_From.Map == arena.Facet && arena.Zone.Contains(m_From.Location))
|
||||
{
|
||||
m_From.SendLocalizedMessage(1019003); // You are already there.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace Server.Engines.PartySystem
|
|||
var c = Members[i].Mobile;
|
||||
var ns = c.NetState;
|
||||
|
||||
if (c != m && ns != null && m.Map == c.Map && Utility.InUpdateRange(c, m) && c.CanSee(m))
|
||||
if (c != m && ns != null && m.Map == c.Map && Utility.InUpdateRange(c.Location, m.Location) && c.CanSee(m))
|
||||
{
|
||||
ns.Send(p);
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ namespace Server.Engines.PartySystem
|
|||
var c = Members[i].Mobile;
|
||||
var ns = c.NetState;
|
||||
|
||||
if (c != m && ns != null && m.Map == c.Map && Utility.InUpdateRange(c, m) && c.CanSee(m))
|
||||
if (c != m && ns != null && m.Map == c.Map && Utility.InUpdateRange(c.Location, m.Location) && c.CanSee(m))
|
||||
{
|
||||
ns.Send(p);
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ namespace Server.Engines.PartySystem
|
|||
public void OnStatsQuery(Mobile beholder, Mobile beheld)
|
||||
{
|
||||
if (beholder != beheld && Contains(beholder) && beholder.Map == beheld.Map &&
|
||||
Utility.InUpdateRange(beholder, beheld))
|
||||
Utility.InUpdateRange(beholder.Location, beheld.Location))
|
||||
{
|
||||
if (!beholder.CanSee(beheld))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace Server.Engines.Quests.Necro
|
|||
}
|
||||
else if (qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
|
||||
{
|
||||
if (pm.Map == m_WellOfTearsMap && m_WellOfTearsArea.Contains(pm))
|
||||
if (pm.Map == m_WellOfTearsMap && m_WellOfTearsArea.Contains(pm.Location))
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<UseCallingScrollObjective>();
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace Server.Engines.Quests.Naturalist
|
|||
}
|
||||
}
|
||||
|
||||
public static NestArea Find(IPoint2D p)
|
||||
public static NestArea Find(Point3D p)
|
||||
{
|
||||
return m_Areas.FirstOrDefault(area => area.Contains(p));
|
||||
}
|
||||
|
|
@ -73,11 +73,13 @@ namespace Server.Engines.Quests.Naturalist
|
|||
return null;
|
||||
}
|
||||
|
||||
public bool Contains(IPoint2D p)
|
||||
public bool Contains(Point3D p)
|
||||
{
|
||||
var x = p.X;
|
||||
var y = p.Y;
|
||||
foreach (var rect in m_Rects)
|
||||
{
|
||||
if (rect.Contains(p))
|
||||
if (rect.Contains(x, y))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Engines.Quests.Naturalist
|
|||
{
|
||||
var nest = m_CurrentNest;
|
||||
|
||||
if ((from.Map == Map.Trammel || from.Map == Map.Felucca) && nest.Contains(from))
|
||||
if ((from.Map == Map.Trammel || from.Map == Map.Felucca) && nest.Contains(from.Location))
|
||||
{
|
||||
if (m_StudyState != StudyState.Inactive)
|
||||
{
|
||||
|
|
@ -75,7 +75,7 @@ namespace Server.Engines.Quests.Naturalist
|
|||
}
|
||||
else if (from.Map == Map.Trammel || from.Map == Map.Felucca)
|
||||
{
|
||||
var nest = NestArea.Find(from);
|
||||
var nest = NestArea.Find(from.Location);
|
||||
|
||||
if (nest != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,12 +119,12 @@ namespace Server.Misc
|
|||
{
|
||||
var r = m.Region;
|
||||
|
||||
if (r.IsPartOf<HouseRegion>() || BaseBoat.FindBoatAt(m, m.Map) != null)
|
||||
if (r.IsPartOf<HouseRegion>() || BaseBoat.FindBoatAt(m.Location, m.Map) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// TODO: a CanReach of something check as opposed to above?
|
||||
|
||||
// TODO: a CanReach of something check as opposed to above?
|
||||
if (r.IsPartOf("Yomotsu Mines") || r.IsPartOf("Fan Dancer's Dojo"))
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue