ServUO Version
Publish 57
Ultima Expansion
Endless Journey
So blessed or insured items tend to pop out of whatever container they're in even if that container is blessed itself and litter the players backpack, super annoying if you have a lot of blessed items. Is there a way to prevent this from happening?

I found this post but it did not solve the issue:
 
This is handled in Mobile.Kill() in the core; the current unmodified code looks like this;
C#:
				for (var i = 0; i < moveToPack.Count; ++i)
				{
					var item = moveToPack[i];

					if (RetainPackLocsOnDeath && item.Parent == pack)
					{
						continue;
					}

					pack.DropItem(item);
				}

I have not tested this, but it should do the trick in theory;
C#:
				for (var i = 0; i < moveToPack.Count; ++i)
				{
					var item = moveToPack[i];

					if (RetainPackLocsOnDeath && item.Parent == pack)
					{
						continue;
					}
#region CUSTOM
					if (item.Parent is Container ip && ip != pack && ip.CheckBlessed(this))
					{
						continue;
					}
#endregion
					pack.DropItem(item);
				}
 
Nope no luck with that one, items still spill out into the main backpack.

Also I'm still on Pub 57 so this is my current section:
C#:
                for (int i = 0; i < moveToPack.Count; ++i)
                {
                    Item item = moveToPack[i];

                    if (RetainPackLocsOnDeath && item.Parent == pack)
                    {
                        continue;
                    }
                    #region Iomega0318
                    if (item.Parent is Container ip && ip != pack && ip.CheckBlessed(this))
                    {
                        continue;
                    }
                    #endregion

                    pack.DropItem(item);
                }
 
Back