fix: Fixes serious stacking issue (#1225)
* Fixes a major bug where players can stack items into their backpack infinitely even if they get a message saying they can't. * Fixes other minor issues and cleans up code.
This commit is contained in:
parent
d0ba94aa83
commit
e47b62c0ae
5 changed files with 17 additions and 23 deletions
|
|
@ -56,7 +56,7 @@ public class ClientVersion : IComparable<ClientVersion>, IComparer<ClientVersion
|
|||
Patch = pat;
|
||||
Type = type;
|
||||
|
||||
SourceString = Utility.Intern(ToStringImpl());
|
||||
SourceString = ToStringImpl().Intern();
|
||||
}
|
||||
|
||||
public ClientVersion(string fmt)
|
||||
|
|
|
|||
|
|
@ -2311,7 +2311,7 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
|
|||
|
||||
public virtual bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
var success = Parent is Container container && container.OnStackAttempt(from, this, dropped) ||
|
||||
var success = (Parent as Container)?.OnStackAttempt(from, this, dropped) ??
|
||||
StackWith(from, dropped);
|
||||
|
||||
if (success && Spawner != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue