diff options
author | Paul Gilbert | 2018-03-31 12:37:36 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-31 12:37:36 -0400 |
commit | 31bcb0961981e3e647b2de912927145e8e9429aa (patch) | |
tree | 0bc9f8c159820509b3bf8628a80b4345050488c0 /engines/xeen/scripts.cpp | |
parent | 572dbd86239426c54776f02a538f1bea45f4abd3 (diff) | |
download | scummvm-rg350-31bcb0961981e3e647b2de912927145e8e9429aa.tar.gz scummvm-rg350-31bcb0961981e3e647b2de912927145e8e9429aa.tar.bz2 scummvm-rg350-31bcb0961981e3e647b2de912927145e8e9429aa.zip |
XEEN: Cleanup of item bonus flags to a bitfield state structure
Diffstat (limited to 'engines/xeen/scripts.cpp')
-rw-r--r-- | engines/xeen/scripts.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 970004765c..5bb6c4f4ee 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -966,9 +966,9 @@ bool Scripts::cmdConfirmWord(ParamsIterator ¶ms) { for (int idx = 0; idx < MAX_TREASURE_ITEMS; ++idx) { XeenItem &item = party._treasure._weapons[idx]; if (!item._id) { - item._id = 34; + item._id = XEEN_SLAYER_SWORD; item._material = 0; - item._bonusFlags = 0; + item._state.clear(); party._treasure._hasItems = true; return cmdExit(params); @@ -1259,12 +1259,12 @@ bool Scripts::cmdGiveEnchanted(ParamsIterator ¶ms) { // Handling of misc items. Note that for them, id actually specifies the material field item->_material = id; item->_id = params.readByte(); - item->_bonusFlags = (item->_material == 10 || item->_material == 11) ? 1 : _vm->getRandomNumber(3, 10); + item->_state._counter = (item->_material == 10 || item->_material == 11) ? 1 : _vm->getRandomNumber(3, 10); } else { // Weapons, armor, and accessories item->_id = id; item->_material = params.readByte(); - item->_bonusFlags = params.readByte(); + item->_state = params.readByte(); } } |