Exemplo n.º 1
0
 public void SendOffHand(params Player[] players)
 {
     for (int i = 0; i < players.Length; ++i)
     {
         MobEquipmentPacket pk = new MobEquipmentPacket();
         pk.EntityRuntimeId = this.Holder.EntityID;
         pk.Item            = this.OffHandItem;
         pk.InventorySlot   = 0;
         pk.WindowId        = this.Type;
         players[i].SendPacket(pk);
     }
 }
Exemplo n.º 2
0
 public void SendMainHand(params Player[] players)
 {
     for (int i = 0; i < players.Length; ++i)
     {
         MobEquipmentPacket pk = new MobEquipmentPacket
         {
             EntityRuntimeId = this.Holder.EntityID,
             Item            = this.MainHandItem,
             InventorySlot   = (byte)this.MainHandSlot,
             HotbarSlot      = (byte)this.MainHandSlot,
             WindowId        = this.Type
         };
         players[i].SendPacket(pk);
     }
 }
 private void MobEquipmentHandle(MobEquipmentPacket pk)
 {
     this.Inventory.MainHandSlot = pk.HotbarSlot;
     this.SetFlag(Entity.DATA_FLAGS, Entity.DATA_FLAG_ACTION, false, true);
 }