SetRestoreInfo() public méthode

public SetRestoreInfo ( Item item, Server.Point3D loc ) : void
item Item
loc Server.Point3D
Résultat void
Exemple #1
0
        public static Container Mobile_CreateCorpseHandler(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List <Item> initialContent, List <Item> equipItems)
        {
            bool shouldFillCorpse = true;

            //if ( owner is BaseCreature )
            //	shouldFillCorpse = !((BaseCreature)owner).IsBonded;

            Corpse c;

            c = new Corpse(owner, hair, facialhair, shouldFillCorpse ? equipItems : new List <Item>());

            owner.Corpse = c;

            if (shouldFillCorpse)
            {
                for (int i = 0; i < initialContent.Count; ++i)
                {
                    Item item = initialContent[i];

                    if (Core.AOS && owner.Player && item.Parent == owner.Backpack)
                    {
                        c.AddItem(item);
                    }
                    else
                    {
                        c.DropItem(item);
                    }

                    if (owner.Player && Core.AOS)
                    {
                        c.SetRestoreInfo(item, item.Location);
                    }
                }

                if (!owner.Player)
                {
                    c.AssignInstancedLoot();
                }
            }
            else
            {
                c.Carved = true;                 // TODO: Is it needed?
            }

            Point3D loc = owner.Location;
            Map     map = owner.Map;

            if (map == null || map == Map.Internal)
            {
                loc = owner.LogoutLocation;
                map = owner.LogoutMap;
            }

            c.MoveToWorld(loc, map);

            return(c);
        }
Exemple #2
0
        public static Container Mobile_CreateCorpseHandler(
            Mobile owner, HairInfo hair, FacialHairInfo facialhair, List <Item> initialContent, List <Item> equipItems)
        {
            var c = new Corpse(owner, hair, facialhair, equipItems);

            owner.Corpse = c;

            for (int i = 0; i < initialContent.Count; ++i)
            {
                Item item = initialContent[i];

                if (owner.Player && item.Parent == owner.Backpack)
                {
                    c.AddItem(item);
                }
                else
                {
                    c.DropItem(item);
                }

                if (owner.Player)
                {
                    c.SetRestoreInfo(item, item.Location);
                }
            }

            if (!owner.Player)
            {
                c.AssignInstancedLoot();
                c.HasAssignedInstancedLoot = true;
            }
            else
            {
                PlayerMobile pm = owner as PlayerMobile;

                if (pm != null)
                {
                    c.RestoreEquip = pm.EquipSnapshot;
                }
            }

            Point3D loc = owner.Location;
            Map     map = owner.Map;

            if (map == null || map == Map.Internal)
            {
                loc = owner.LogoutLocation;
                map = owner.LogoutMap;
            }

            c.MoveToWorld(loc, map);

            return(c);
        }
Exemple #3
0
        public static Container Mobile_CreateCorpseHandler(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List <Item> initialContent, List <Item> equipItems)
        {
            Corpse c = new Corpse(owner, hair, facialhair, equipItems);

            owner.Corpse = c;

            for (int i = 0; i < initialContent.Count; ++i)
            {
                Item item = (Item)initialContent[i];

                if (owner.IsPlayer && item.Parent == owner.Backpack)
                {
                    c.AddItem(item);
                }
                else
                {
                    c.DropItem(item);
                }

                if (owner.IsPlayer)
                {
                    c.SetRestoreInfo(item, item.Location);
                }
            }

            Point3D loc = owner.Location;
            Map     map = owner.Map;

            if (map == null || map == Map.Internal)
            {
                loc = owner.LogoutLocation;
                map = owner.LogoutMap;
            }

            c.MoveToWorld(loc, map);

            return(c);
        }
Exemple #4
0
        public static Container Mobile_CreateCorpseHandler(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List <Item> initialContent, List <Item> equipItems)
        {
            bool shouldFillCorpse = true;

            Corpse c = new Corpse(owner, hair, facialhair, shouldFillCorpse ? equipItems : new List <Item>());

            owner.Corpse = c;

            if (shouldFillCorpse)
            {
                for (int i = 0; i < initialContent.Count; ++i)
                {
                    Item item = initialContent[i];

                    c.DropItem(item);
                    c.SetRestoreInfo(item, item.Location);
                }
            }
            else
            {
                c.Carved = true;                 // TODO: Is it needed?
            }

            Point3D loc = owner.Location;
            Map     map = owner.Map;

            if (map == null || map == Map.Internal)
            {
                loc = owner.LogoutLocation;
                map = owner.LogoutMap;
            }

            c.MoveToWorld(loc, map);

            return(c);
        }
Exemple #5
0
		public static Container Mobile_CreateCorpseHandler( Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> initialContent, List<Item> equipItems )
		{
			bool shouldFillCorpse = true;

			Corpse c = new Corpse( owner, hair, facialhair, shouldFillCorpse ? equipItems : new List<Item>() );

			owner.Corpse = c;

			if ( shouldFillCorpse )
			{
				for ( int i = 0; i < initialContent.Count; ++i )
				{
					Item item = initialContent[i];

					c.DropItem( item );
                    c.SetRestoreInfo( item, item.Location );
				}
			}
			else
			{
				c.Carved = true; // TODO: Is it needed?
			}

			Point3D loc = owner.Location;
			Map map = owner.Map;

			if ( map == null || map == Map.Internal )
			{
				loc = owner.LogoutLocation;
				map = owner.LogoutMap;
			}

			c.MoveToWorld( loc, map );

			return c;
		}
Exemple #6
0
        public static Container Mobile_CreateCorpseHandler(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> initialContent, List<Item> equipedItems)
        {
            bool shouldFillCorpse = true;

            //if ( owner is BaseCreature )
            //	shouldFillCorpse = !((BaseCreature)owner).IsBonded;

            Corpse c = new Corpse(owner, hair, facialhair, shouldFillCorpse ? equipedItems : new List<Item>());

            owner.Corpse = c;

            if ( shouldFillCorpse )
            {
                for ( int i = 0; i < initialContent.Count; ++i )
                {
                    Item item = (Item)initialContent[i];

                    if ( Core.AOS && owner.Player && item.Parent == owner.Backpack )
                        c.AddItem( item );
                    else
                        c.DropItem( item );

                    if ( owner.Player && Core.AOS )
                        c.SetRestoreInfo( item, item.Location );
                }
            }
            else
            {
                c.Carved = true; // TODO: Is it needed?
            }

            Point3D loc = owner.Location;
            Map map = owner.Map;

            if ( map == null || map == Map.Internal )
            {
                loc = owner.LogoutLocation;
                map = owner.LogoutMap;
            }

            c.MoveToWorld( loc, map );

            return c;
        }
Exemple #7
0
        public static Container Mobile_CreateCorpseHandler( Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> initialContent, List<Item> equipItems )
        {
            Corpse c = new Corpse( owner, hair, facialhair, equipItems );
            owner.Corpse = c;

            for ( int i = 0; i < initialContent.Count; ++i )
            {
                Item item = (Item) initialContent[i];

                if ( owner.IsPlayer && item.Parent == owner.Backpack )
                    c.AddItem( item );
                else
                    c.DropItem( item );

                if ( owner.IsPlayer )
                    c.SetRestoreInfo( item, item.Location );
            }

            Point3D loc = owner.Location;
            Map map = owner.Map;

            if ( map == null || map == Map.Internal )
            {
                loc = owner.LogoutLocation;
                map = owner.LogoutMap;
            }

            c.MoveToWorld( loc, map );

            return c;
        }