private void ActionKeyMappingOpenBags_ActionTriggered(object sender, ActionTriggeredEventArgs e) { if (world.PlayerCharacter == null) { return; } if (world.PlayerCharacter.Inventory == null) { return; } if (world.PlayerCharacter.IsDead) { return; } List <Item> worldItems = world.WorldItemsInRange(world.PlayerCharacter.Id); ContainerItem worldItemsTempContainer = new BagClientItem(worldItems); ContainerItem playerContainer = (BagClientItem)world.PlayerCharacter.Inventory; InventoryScreen inventoryScreen = new InventoryScreen(world, worldItemsTempContainer, playerContainer); //inventoryScreen.Player = world.PlayerCharacter; //inventoryScreen.BaseContainer = (BagClientItem)world.PlayerCharacter.Inventory; //new ClientBagItem((BagItem)world.GetItem(world.PlayerCharacter.InventoryBagId)); //inventoryScreen.GroundItems = world.GroundItemsInRange(world.PlayerCharacter.Id); inventoryScreen.Initialize(this.Manager); inventoryScreen.Activate(); }