fix: Fixes map iterators for Items (#1564)
### Summary Modifying a ValueLinkList using one of the methods will bump the "version". This field is used by iterators (foreach loops) to determine if the link list was modified while iterating. The sector.Items (and in the future other lists), will no longer be safe to modify while iterating. The server will _CRASH_ if the ValueLinkList is modified. Thanks to @stefanomerotta for help! ### Screenshots <img width="588" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/83ee0b6e-ff4f-4768-9e29-84456e04b1ec">
This commit is contained in:
parent
658f564f34
commit
d919f71149
33 changed files with 706 additions and 468 deletions
|
|
@ -130,7 +130,7 @@ public partial class MarkContainer : LockableContainer
|
|||
|
||||
private static bool FindMarkContainer(Point3D p, Map map)
|
||||
{
|
||||
foreach (var item in map.GetItemsInRange<MarkContainer>(p, 0))
|
||||
foreach (var item in map.GetItemsAt<MarkContainer>(p))
|
||||
{
|
||||
if (item.Z == p.Z)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue