Example #1
0
        /// <summary>
        /// Shoot a Rune against the defined Target.
        /// </summary>
        public void Shoot(Slot runeSlot, Creature target)
        {
            #region " Packet Structure Analyze "
            // SZ      ID         BP     SLOT  HMM         X      Y    Z   ??     QD
            //----------------------------------------------------------------------
            // 11  00  83  FF FF  40  00  00  7E 0C  00  15 7E  ED 7B  07  63 00  01
            //----------------------------------------------------------------------
            // 00  01  02  03 04  05  06  07  08 09  10  11 12  13 14  15  16 17  18
            #endregion

            PacketBuilder Builder = new PacketBuilder(0x83, connection);
            Builder.Append(0xFF);
            Builder.Append(0xFF);
            Builder.Append(runeSlot.Container.Position);
            Builder.Append(0x00);
            Builder.Append(runeSlot.Position);
            Builder.Append(runeSlot.Item.Id);
            Builder.Append(runeSlot.Position);
            Builder.Append(target.Location.X);
            Builder.Append(target.Location.Y);
            Builder.Append(target.Location.Z);
            Builder.Append(0x63);
            Builder.Append(0x00);
            Builder.Append(0x01); //TODO: Try increase this value. (Quantity)
            Connection.Send(Builder.GetPacket());
        }
Example #2
0
 public Item(Slot slot)
 {
     Slot = slot;
     connection = slot.Connection;
     if (slot.Item.Id > 0) {
         base.Id = slot.Item.Id;
     }
 }
Example #3
0
 /// <summary>
 /// Sets the owner.
 /// </summary>
 /// <param name="itemOwnerSlot">The item owner slot.</param>
 public void SetOwner(Slot itemOwnerSlot)
 {
     if (itemOwnerSlot != null && itemOwnerSlot.Connection != null) {
         Slot = itemOwnerSlot;
         connection = itemOwnerSlot.Connection;
     }
 }
Example #4
0
 /// <summary>
 /// Shoot a Rune against this Creature.
 /// </summary>
 public void Shoot(Slot RuneSlot)
 {
     Actions.Attack.Shoot(RuneSlot, this);
 }
Example #5
0
 /// <summary>
 /// Drink the Defined Fluid.
 /// </summary>
 public void Drink(Slot SlotSource, bool DropAfterDrink)
 {
     if (SlotSource.Id == InventoryID.Container) {
         Actions.Use.OnPlayer(SlotSource, Location, DropAfterDrink);
     }
 }