Fix exception when editing team
This commit is contained in:
parent
1c57dffd51
commit
030f05a086
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
using Core.Config;
|
using Core.Config;
|
||||||
using GameServer.Controllers.Attributes;
|
using GameServer.Controllers.Attributes;
|
||||||
using GameServer.Models;
|
using GameServer.Models;
|
||||||
using GameServer.Network;
|
using GameServer.Network;
|
||||||
|
@ -80,7 +80,7 @@ internal class CreatureController : Controller
|
||||||
|
|
||||||
IEnumerable<PlayerEntity> oldEntities = _entitySystem.EnumerateEntities()
|
IEnumerable<PlayerEntity> oldEntities = _entitySystem.EnumerateEntities()
|
||||||
.Where(e => e is PlayerEntity entity && entity.PlayerId == _modelManager.Player.Id)
|
.Where(e => e is PlayerEntity entity && entity.PlayerId == _modelManager.Player.Id)
|
||||||
.Cast<PlayerEntity>();
|
.Cast<PlayerEntity>().ToArray();
|
||||||
|
|
||||||
foreach (PlayerEntity oldEntity in oldEntities)
|
foreach (PlayerEntity oldEntity in oldEntities)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue