Exemplo n.º 1
0
 public void OnUseMap(Packets.Client.UseMap p)
 {
     byte index;
     Item item;
     index = p.GetIndex();
     item = this.Char.inv.GetItem(CONTAINER_TYPE.INVENTORY, index);
     byte map, value;
     map = (byte)(item.skillID / 10);
     value = (byte)(item.skillID % 10);
     this.Pc.OnUseMap(map, value);
     byte newAmount;
     DeleteItemResult res = this.Char.inv.DeleteItem(CONTAINER_TYPE.INVENTORY, index, item.id, 1, out newAmount);
     MapServer.charDB.DeleteItem(this.Char, item);
     Packets.Server.DeleteItem delI = new SagaMap.Packets.Server.DeleteItem();
     delI.SetContainer(CONTAINER_TYPE.INVENTORY);
     delI.SetAmount(1);
     delI.SetIndex(index);
     this.netIO.SendPacket(delI, this.SessionID);
     Packets.Server.ShowMap p2 = new SagaMap.Packets.Server.ShowMap();
     p2.SetMap(map);
     p2.SetZone(value);
     this.netIO.SendPacket(p2, this.SessionID); ;
 }