From 75274ebd6ba90784f5aa837b7e5ea97fc6bfb720 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 20 Oct 2012 16:35:26 +0000 Subject: Item id based inventory, support for weapon dealers. --- src/client/inventorywindow.cc | 4 +--- src/client/trademenu.cc | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/client') diff --git a/src/client/inventorywindow.cc b/src/client/inventorywindow.cc index 2b956c4..7912d0d 100644 --- a/src/client/inventorywindow.cc +++ b/src/client/inventorywindow.cc @@ -327,11 +327,9 @@ void InventoryWindow::act_eject() std::ostringstream cmdstr; cmdstr << "remote eject "; - cmdstr << inventorywindow_listview->selected()->item()->info()->type()->label() << " "; - cmdstr << inventorywindow_listview->selected()->item()->info()->label() << " "; + cmdstr << inventorywindow_listview->selected()->item()->id() << " "; cmdstr << inventorywindow_ejectslider->value(); - con_debug "Executing command '" << cmdstr.str() << "'" << std::endl; core::CommandBuffer::exec(cmdstr.str()); show_item_info(0); diff --git a/src/client/trademenu.cc b/src/client/trademenu.cc index 1de42e4..6421d43 100644 --- a/src/client/trademenu.cc +++ b/src/client/trademenu.cc @@ -192,7 +192,7 @@ void TradeMenu::set_item(ui::ListItem *item) amount = (long) menu_slider->value(); std::ostringstream commandstr; - commandstr << "remote sell " << item->info()->type()->label() << " " << item->info()->label() << " " << amount; + commandstr << "remote sell " << item->item()->id() << " " << amount; menu_buybutton->set_command(commandstr.str()); menu_buybutton->enable(); } @@ -237,7 +237,7 @@ void TradeMenu::set_item(ui::ListItem *item) amount = (long) menu_slider->value(); std::ostringstream commandstr; - commandstr << "remote buy " << item->info()->type()->label() << " " << item->info()->label() << " " << amount; + commandstr << "remote buy " << item->item()->id() << " " << amount; menu_buybutton->set_command(commandstr.str()); menu_buybutton->enable(); -- cgit v1.2.3