mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 13:15:32 +00:00
rm ContainerStore/refItem
This commit is contained in:
parent
46c6abcf54
commit
186ec8c50f
2 changed files with 3 additions and 14 deletions
|
@ -127,13 +127,6 @@ namespace MWGui
|
||||||
|
|
||||||
void QuickKeysMenu::unassign(ItemWidget* key, int index)
|
void QuickKeysMenu::unassign(ItemWidget* key, int index)
|
||||||
{
|
{
|
||||||
// cleanup refrance ItemContainer
|
|
||||||
if( mAssigned[index] == Type_Item || mAssigned[index] == Type_MagicItem)
|
|
||||||
{
|
|
||||||
MWWorld::Ptr refItem = *key->getUserData<MWWorld::Ptr>();
|
|
||||||
mRefItemContainer.remove(refItem.getCellRef().getRefId(), 1, MWMechanics::getPlayer());
|
|
||||||
}
|
|
||||||
|
|
||||||
mAssignedName[index] = "";
|
mAssignedName[index] = "";
|
||||||
mAssignedId[index] = "";
|
mAssignedId[index] = "";
|
||||||
|
|
||||||
|
@ -236,9 +229,7 @@ namespace MWGui
|
||||||
mAssignedId[mSelectedIndex] = item.getCellRef().getRefId();
|
mAssignedId[mSelectedIndex] = item.getCellRef().getRefId();
|
||||||
mAssignedName[mSelectedIndex] = item.getClass().getName(item);
|
mAssignedName[mSelectedIndex] = item.getClass().getName(item);
|
||||||
|
|
||||||
MWWorld::Ptr refItem = *mRefItemContainer.add(item, 1, MWMechanics::getPlayer());
|
button->setItem(item, ItemWidget::Barter);
|
||||||
|
|
||||||
button->setItem(refItem, ItemWidget::Barter);
|
|
||||||
button->setUserString ("ToolTipType", "ItemPtr");
|
button->setUserString ("ToolTipType", "ItemPtr");
|
||||||
button->setUserData(item);
|
button->setUserData(item);
|
||||||
|
|
||||||
|
|
|
@ -59,12 +59,10 @@ namespace MWGui
|
||||||
MyGUI::EditBox* mInstructionLabel;
|
MyGUI::EditBox* mInstructionLabel;
|
||||||
MyGUI::Button* mOkButton;
|
MyGUI::Button* mOkButton;
|
||||||
|
|
||||||
MWWorld::ContainerStore mRefItemContainer;
|
|
||||||
std::vector<std::string> mAssignedId;
|
|
||||||
std::vector<std::string> mAssignedName;
|
|
||||||
|
|
||||||
std::vector<ItemWidget*> mQuickKeyButtons;
|
std::vector<ItemWidget*> mQuickKeyButtons;
|
||||||
std::vector<QuickKeyType> mAssigned;
|
std::vector<QuickKeyType> mAssigned;
|
||||||
|
std::vector<std::string> mAssignedId;
|
||||||
|
std::vector<std::string> mAssignedName;
|
||||||
|
|
||||||
QuickKeysMenuAssign* mAssignDialog;
|
QuickKeysMenuAssign* mAssignDialog;
|
||||||
ItemSelectionDialog* mItemSelectionDialog;
|
ItemSelectionDialog* mItemSelectionDialog;
|
||||||
|
|
Loading…
Reference in a new issue