public new static Container Mobile_CreateCorpseHandler(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List <Item> initialContent, List <Item> equipItems) { var pm = owner as PlayerMobile; if (pm == null || BountyInformation.GetBounty(pm) <= 0) { return(Corpse.Mobile_CreateCorpseHandler(owner, hair, facialhair, initialContent, equipItems)); } Corpse c = new BountyCorpse(owner, hair, facialhair, equipItems); //UOSI Logging //MoreLogging.WriteLine(owner, "A BountyCorpse has been created!"); owner.Corpse = c; for (var i = 0; i < initialContent.Count; ++i) { var item = initialContent[i]; if (Core.AOS && item.Parent == owner.Backpack) { c.AddItem(item); } else { c.DropItem(item); } if (Core.AOS) { c.SetRestoreInfo(item, item.Location); } } if (Core.AOS) { c.RestoreEquip = pm.EquipSnapshot; } var loc = owner.Location; var map = owner.Map; if (map == null || map == Map.Internal) { loc = owner.LogoutLocation; map = owner.LogoutMap; } c.MoveToWorld(loc, map); return(c); }
public new static Container Mobile_CreateCorpseHandler(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> initialContent, List<Item> equipItems) { var pm = owner as PlayerMobile; if (pm == null || BountyInformation.GetBounty(pm) <= 0) return Corpse.Mobile_CreateCorpseHandler(owner, hair, facialhair, initialContent, equipItems); Corpse c = new BountyCorpse(owner, hair, facialhair, equipItems); owner.Corpse = c; for (var i = 0; i < initialContent.Count; ++i) { var item = initialContent[i]; if (Core.AOS && item.Parent == owner.Backpack) c.AddItem(item); else c.DropItem(item); if (Core.AOS) c.SetRestoreInfo(item, item.Location); } if (Core.AOS) { c.RestoreEquip = pm.EquipSnapshot; } var loc = owner.Location; var map = owner.Map; if (map == null || map == Map.Internal) { loc = owner.LogoutLocation; map = owner.LogoutMap; } c.MoveToWorld(loc, map); return c; }