aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/party.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-30 23:03:15 -0400
committerPaul Gilbert2018-03-30 23:03:15 -0400
commit494fd3bb52e054969eb94ed72dc2d12a6e412fd1 (patch)
tree58781d5b9b2ae8232ba0329f2fb3fec626f32406 /engines/xeen/party.cpp
parentc33fce7ac7445dc9d5a9cf767673ab3abb52bdf6 (diff)
downloadscummvm-rg350-494fd3bb52e054969eb94ed72dc2d12a6e412fd1.tar.gz
scummvm-rg350-494fd3bb52e054969eb94ed72dc2d12a6e412fd1.tar.bz2
scummvm-rg350-494fd3bb52e054969eb94ed72dc2d12a6e412fd1.zip
XEEN: Fixes for giving items via scripts
Diffstat (limited to 'engines/xeen/party.cpp')
-rw-r--r--engines/xeen/party.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index 42b45a8079..d6ef37791e 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -827,7 +827,8 @@ void Party::giveTreasureToCharacter(Character &c, ItemCategory category, int ite
w.update();
events.ipause(5);
- const char *itemName = XeenItem::getItemName(category, treasureItem._id);
+ const char *itemName = XeenItem::getItemName(category, (category == CATEGORY_MISC) ?
+ treasureItem._material : treasureItem._id);
w.writeString(Common::String::format(Res.X_FOUND_Y, c._name.c_str(), itemName));
w.update();
c._items[category].sort();