public static void OnAddTaskbarItem(WorldClient client, INetPacketStream packet) { var addTaskbarItemPacket = new AddTaskbarItemPacket(packet); var addTaskbarItemEventArgs = new AddTaskbarItemEventArgs(addTaskbarItemPacket.SlotLevelIndex, addTaskbarItemPacket.SlotIndex, addTaskbarItemPacket.Type, addTaskbarItemPacket.ObjectId, addTaskbarItemPacket.ObjectType, addTaskbarItemPacket.ObjectIndex, addTaskbarItemPacket.UserId, addTaskbarItemPacket.ObjectData, addTaskbarItemPacket.Text); client.Player.NotifySystem <TaskbarSystem>(addTaskbarItemEventArgs); }
private void HandleAddItemTaskbarShortcut(IPlayerEntity player, AddTaskbarItemEventArgs e) { player.Taskbar.Items.CreateShortcut(new Shortcut(e.SlotIndex, e.Type, e.ObjId, e.ObjectType, e.ObjIndex, e.UserId, e.ObjData, e.Text), e.SlotLevelIndex); Logger.LogDebug("Created Shortcut of type {0} on slot {1} for player {2} on the Item Taskbar", Enum.GetName(typeof(ShortcutType), e.Type), e.SlotIndex, player.Object.Name); }