fix: Fixes PlayerConstructed stacking/BODs (#2579)
### Summary * Removes player constructed as a requirement for BODs. * When two items stack and they don't match player constructed flags, the resulting stack loses the flag.
This commit is contained in:
parent
2dbaa87377
commit
be3a08513f
3 changed files with 7 additions and 48 deletions
|
|
@ -2350,7 +2350,6 @@ public partial class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropert
|
|||
dropped.ItemID == ItemID &&
|
||||
dropped.Hue == Hue &&
|
||||
dropped.Name == Name &&
|
||||
dropped.PlayerConstructed == PlayerConstructed &&
|
||||
dropped.Amount + Amount <= 60000 &&
|
||||
dropped != this;
|
||||
|
||||
|
|
@ -2369,6 +2368,11 @@ public partial class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropert
|
|||
}
|
||||
|
||||
Amount += dropped.Amount;
|
||||
if (PlayerConstructed != dropped.PlayerConstructed)
|
||||
{
|
||||
PlayerConstructed = false;
|
||||
}
|
||||
|
||||
dropped.Delete();
|
||||
|
||||
if (playSound && from != null)
|
||||
|
|
@ -3451,7 +3455,7 @@ public partial class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropert
|
|||
for (var i = 0; i < props.Length; i++)
|
||||
{
|
||||
var p = props[i];
|
||||
if (p.GetCustomAttribute(typeof(IgnoreDupeAttribute), true) != null || !p.CanRead || !p.CanWrite)
|
||||
if (p.GetCustomAttribute<IgnoreDupeAttribute>(true) != null || !p.CanRead || !p.CanWrite)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue