fix: Removes GetObjectsInRange and fixes boat planks closing (#1579)
## BREAKING CHANGE - Deletes `map.GetObjectsInRange` and `map.GetObejctsInBounds` ### Notes Developers are expected to enumerate mobiles and items separately now using `map.GetMobilesInRange` and `map.GetItemsInRange`. This helps keep the code streamlined so we don't have to maintain multiple copies of ref struct enumerators that do the same thing. ### Fixes - [X] Fixes bug with planks closing - [X] Fixes issue with iterating items/mobiles from a null map
This commit is contained in:
parent
cb1638591b
commit
977fdc2c5a
21 changed files with 543 additions and 461 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Server;
|
||||
using Server.Collections;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
|
|
@ -11,7 +12,7 @@ namespace UOContent.Tests
|
|||
{
|
||||
public MoveBoatHS(
|
||||
Mobile beholder, BaseBoat boat, Direction d,
|
||||
int speed, List<IEntity> ents, int xOffset,
|
||||
int speed, PooledRefList<IEntity> ents, int xOffset,
|
||||
int yOffset
|
||||
) : base(0xF6)
|
||||
{
|
||||
|
|
@ -30,11 +31,6 @@ namespace UOContent.Tests
|
|||
|
||||
foreach (var ent in ents)
|
||||
{
|
||||
if (!beholder.CanSee(ent))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Stream.Write(ent.Serial);
|
||||
Stream.Write((short)(ent.X + xOffset));
|
||||
Stream.Write((short)(ent.Y + yOffset));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue