mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-28 13:54:24 -05:00
Fix: Replace All items using a copy of the tile
The field array will get mutated, so make sure that our item reference isn't one of the field tiles.
This commit is contained in:
@@ -389,7 +389,8 @@ private void ReplaceTile(Item tile, int x, int y)
|
||||
}
|
||||
|
||||
bool wholeMap = (ModifierKeys & Keys.Shift) != 0;
|
||||
var count = View.ReplaceFieldItems(tile, pgt, wholeMap);
|
||||
var copy = new Item(tile.RawValue);
|
||||
var count = View.ReplaceFieldItems(copy, pgt, wholeMap);
|
||||
if (count == 0)
|
||||
{
|
||||
WinFormsUtil.Alert(MessageStrings.MsgFieldItemModifyNone);
|
||||
|
||||
Reference in New Issue
Block a user