summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp17
-rw-r--r--src/actions/commands.cpp2
2 files changed, 11 insertions, 8 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 92c0029ed..014ae10f8 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -439,7 +439,8 @@ impHandler(dropItemId)
return false;
// +++ ignoring item color for now
- Item *const item = inv->findItem(atoi(event.args.c_str()), 1);
+ Item *const item = inv->findItem(atoi(event.args.c_str()),
+ ItemColor_one);
if (item && !PlayerInfo::isItemProtected(item->getId()))
{
@@ -467,7 +468,8 @@ impHandler(dropItemIdAll)
return false;
// +++ ignoring item color for now
- Item *const item = inv->findItem(atoi(event.args.c_str()), 1);
+ Item *const item = inv->findItem(atoi(event.args.c_str()),
+ ItemColor_one);
if (item && !PlayerInfo::isItemProtected(item->getId()))
PlayerInfo::dropItem(item, item->getQuantity(), Sfx_true);
@@ -1485,14 +1487,14 @@ impHandler0(createItems)
if (!colors)
{
- dialog->addItem(id, 0, 1, 100, 0);
+ dialog->addItem(id, 0, ItemColor_one, 100, 0);
}
else
{
- for (unsigned char f = 0; f < colors; f ++)
+ for (int f = 0; f < colors; f ++)
{
- if (!info->getColor(f).empty())
- dialog->addItem(id, 0, f, 100, 0);
+ if (!info->getColor(fromInt(f, ItemColor)).empty())
+ dialog->addItem(id, 0, fromInt(f, ItemColor), 100, 0);
}
}
}
@@ -1548,7 +1550,8 @@ impHandler(useItem)
if (inv)
{
// +++ ignoring item color for now
- const Item *const item = inv->findItem(itemId, 1);
+ const Item *const item = inv->findItem(itemId,
+ ItemColor_one);
PlayerInfo::useEquipItem(item, Sfx_true);
}
}
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 8070efcc7..0a8ef91ba 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -285,7 +285,7 @@ impHandler(chatAdd)
if (inv)
{
// +++ need add also color here
- item = inv->findItem(id, 1);
+ item = inv->findItem(id, ItemColor_one);
}
if (item)