private unsafe void HandleUnequip(GameClient Client, ItemUsage *Packet) { ItemPosition Position = (ItemPosition)Packet->Location; ConquerItem Item; if (Client.TryGetEquipment(Position, out Item)) { if (Client.AddInventory(Item)) { Client.Unequip(Item, Position); } else { Client.Message("Inventory is full!", ChatType.Top, Color.Red); } } }
private unsafe void HandleUnequip(GameClient Client, ItemUsage* Packet) { ItemPosition Position = (ItemPosition)Packet->Location; ConquerItem Item; if (Client.TryGetEquipment(Position, out Item)) { if (Client.AddInventory(Item)) { Client.Unequip(Item, Position); } else { Client.Message("Inventory is full!", ChatType.Top, Color.Red); } } }
public override void Execute(GameClient Client, byte *pPacket) { Chat *Packet = (Chat *)pPacket; string[] Parameters = PacketHelper.ParseChat(Packet); CommandAction Action = CommandAction.None; if ((Action = CommandProcessor.Process(Client, Parameters)) != CommandAction.None) { if (Action == CommandAction.Processed) { } else if (Action == CommandAction.ClearNpcScripts) { NpcScriptEngine.Clear(); } return; } switch (Packet->ChatType) { case ChatType.Talk: Client.SendScreen(Packet, Packet->Size); break; case ChatType.Whisper: GameClient Receiver = EntityManager.FindByName(Parameters[1]); if (Receiver != null) { Receiver.Send(Packet, Packet->Size); } else { Client.Message("It appears that " + Parameters[1] + " is offline", ChatType.Top, Color.White); } break; } }
public override void Execute(GameClient Client, byte* pPacket) { Chat* Packet = (Chat*)pPacket; string[] Parameters = PacketHelper.ParseChat(Packet); CommandAction Action = CommandAction.None; if ((Action = CommandProcessor.Process(Client, Parameters)) != CommandAction.None) { if (Action == CommandAction.Processed) { } else if (Action == CommandAction.ClearNpcScripts) { NpcScriptEngine.Clear(); } return; } switch (Packet->ChatType) { case ChatType.Talk: Client.SendScreen(Packet, Packet->Size); break; case ChatType.Whisper: GameClient Receiver = EntityManager.FindByName(Parameters[1]); if (Receiver != null) { Receiver.Send(Packet, Packet->Size); } else { Client.Message("It appears that " + Parameters[1] + " is offline", ChatType.Top, Color.White); } break; } }