Ejemplo n.º 1
0
 public Drop(Item item, MapObject dropper, int x, int y, int secondsToLive)
 {
     if (item is Equip)
     {
         Item = new DroppedEquip(item as Equip);
     }
     else
     {
         Item = new DroppedItem(item);
     }
     DroppedBy = dropper;
     Position = new Vector2(x, y);
     Expire = Program.CurrentTime.AddSeconds(secondsToLive);
     CanTake = true;
 }
Ejemplo n.º 2
0
 public Drop(Item item, MapObject dropper, int x, int y, int secondsToLive)
 {
     if (item is Equip)
     {
         Item = new DroppedEquip(item as Equip);
     }
     else
     {
         Item = new DroppedItem(item);
     }
     DroppedBy = dropper;
     Position  = new Vector2(x, y);
     Expire    = Program.CurrentTime.AddSeconds(secondsToLive);
     CanTake   = true;
 }
Ejemplo n.º 3
0
        public Equip(DroppedEquip pBase, ZoneCharacter pNewOwner, sbyte pSlot)
        {
            DatabaseEquip dbeq = new DatabaseEquip();
            dbeq.IncDex = pBase.Dex;
            dbeq.IncStr = pBase.Str;
            dbeq.IncEnd = pBase.End;
            dbeq.IncInt = pBase.Int;
            dbeq.IncSpr = pBase.Spr;
            dbeq.Upgrades = pBase.Upgrades;
            dbeq.EquipID = pBase.ItemID;
            dbeq.Slot = pSlot;
            dbeq.Character = pNewOwner.character;

            Program.Entity.AddToDatabaseEquips(dbeq);
            equip = dbeq;
            ItemID = (ushort)dbeq.EquipID;
            pNewOwner.InventoryItems.Add(pSlot, this);
            pNewOwner.Save();
        }
Ejemplo n.º 4
0
        public Equip(DroppedEquip pBase, ZoneCharacter pNewOwner, sbyte pSlot)
        {
            DatabaseEquip dbeq = new DatabaseEquip();

            dbeq.IncDex    = pBase.Dex;
            dbeq.IncStr    = pBase.Str;
            dbeq.IncEnd    = pBase.End;
            dbeq.IncInt    = pBase.Int;
            dbeq.IncSpr    = pBase.Spr;
            dbeq.Upgrades  = pBase.Upgrades;
            dbeq.EquipID   = pBase.ItemID;
            dbeq.Slot      = pSlot;
            dbeq.Character = pNewOwner.character;

            Program.Entity.AddToDatabaseEquips(dbeq);
            equip  = dbeq;
            ItemID = (ushort)dbeq.EquipID;
            pNewOwner.InventoryItems.Add(pSlot, this);
            pNewOwner.Save();
        }