// Check if the new position is on an arrow
foreach (Item Item in GetFloorItems())
{
if (Item.Definition.SpriteId == 5000)
{
if (Actor.PositionToSet.X == Item.RoomPosition.X && Actor.PositionToSet.Y == Item.RoomPosition.Y)
{
Session Session = SessionManager.GetSessionByCharacterId(Actor.ReferenceId);
ItemEventDispatcher.InvokeItemEventHandler(Session, Item, this, ItemEventType.Interact, Actor.MoveToAndInteractData);
}
}
}
错误行:if (Actor.PositionToSet.X == Item.RoomPosition.X && Actor.PositionToSet.Y == Item.RoomPosition.Y)
抱歉,我是 C# 新手。以前有这个问题,我似乎看不出有什么问题,虽然它在不同的行上,我所要做的就是检查它是否为空,但在这里看不到很多相同的地方吗?