[Scummvm-git-logs] scummvm master -> 8061e0bf5dee1c618d5ce656108e9888423d844d
dreammaster
noreply at scummvm.org
Sun May 28 04:14:50 UTC 2023
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3f17e6daff MM: MM1: Fix char highlighting when switching in blacksmith items
348951bfc2 MM: MM1: Fix selling items at blacksmith
bf7171064a MM: MM1: Removed deprecated comment
8061e0bf5d MM: MM1: Fix displaying spell failures
Commit: 3f17e6daff5a07eaf510004ebb4d98bb70a86128
https://github.com/scummvm/scummvm/commit/3f17e6daff5a07eaf510004ebb4d98bb70a86128
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-27T20:43:15-07:00
Commit Message:
MM: MM1: Fix char highlighting when switching in blacksmith items
Changed paths:
engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
diff --git a/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp b/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
index 6e9f6db8d77..6c009f8401f 100644
--- a/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
+++ b/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
@@ -189,6 +189,7 @@ void BlacksmithItems::itemSelected() {
}
void BlacksmithItems::charSwitched(Character *priorChar) {
+ ItemsView::charSwitched(priorChar);
populateItems();
redraw();
}
Commit: 348951bfc2250eb47ccd6d58e1ef1c2461343343
https://github.com/scummvm/scummvm/commit/348951bfc2250eb47ccd6d58e1ef1c2461343343
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-27T20:51:48-07:00
Commit Message:
MM: MM1: Fix selling items at blacksmith
Changed paths:
engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
diff --git a/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp b/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
index 6c009f8401f..7326f4adc85 100644
--- a/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
+++ b/engines/mm/mm1/views_enh/locations/blacksmith_items.cpp
@@ -67,7 +67,7 @@ void BlacksmithItems::drawTitle() {
if (_mode == SELL_MODE) {
// Show sell mode title
Common::String title = Common::String::format(
- STRING["enhdialogs.blacksmith.backpack_for"].c_str(),
+ STRING["enhdialogs.items.backpack_for"].c_str(),
c._name,
STRING[Common::String::format("stats.classes.%d", c._class)].c_str()
);
Commit: bf7171064aeabf998e981fa7e68212fc95fc0457
https://github.com/scummvm/scummvm/commit/bf7171064aeabf998e981fa7e68212fc95fc0457
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-27T20:59:30-07:00
Commit Message:
MM: MM1: Removed deprecated comment
Changed paths:
engines/mm/mm1/game/use_item.cpp
diff --git a/engines/mm/mm1/game/use_item.cpp b/engines/mm/mm1/game/use_item.cpp
index ba56cdd98f0..9b877a65857 100644
--- a/engines/mm/mm1/game/use_item.cpp
+++ b/engines/mm/mm1/game/use_item.cpp
@@ -91,9 +91,7 @@ Common::String UseItem::nonCombatUseItem(Inventory &inv, Inventory::Entry &invEn
Game::SpellsParty::cast(_spellIndex, g_globals->_currCharacter);
} else {
- // TODO: find out area of Character _effectId is used as an offset for
- //error("TODO: _effectId used as a character offset to increase attribute?");
- //add temorary equip bonus to character parameters
+ // Add temorary equip bonus to character parameters
applyItemBonus (item->_tempBonus_id, item->_tempBonus_value);
if (g_globals->_nonCombatEffectCtr)
Commit: 8061e0bf5dee1c618d5ce656108e9888423d844d
https://github.com/scummvm/scummvm/commit/8061e0bf5dee1c618d5ce656108e9888423d844d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-27T21:14:40-07:00
Commit Message:
MM: MM1: Fix displaying spell failures
Changed paths:
engines/mm/mm1/game/use_item.cpp
engines/mm/mm1/views_enh/character_inventory.cpp
diff --git a/engines/mm/mm1/game/use_item.cpp b/engines/mm/mm1/game/use_item.cpp
index 9b877a65857..3f3b3652eba 100644
--- a/engines/mm/mm1/game/use_item.cpp
+++ b/engines/mm/mm1/game/use_item.cpp
@@ -88,8 +88,17 @@ Common::String UseItem::nonCombatUseItem(Inventory &inv, Inventory::Entry &invEn
if (item->_tempBonus_id== 0xff) {
setSpell(item->_spellId, 0, 0);
- Game::SpellsParty::cast(_spellIndex, g_globals->_currCharacter);
-
+ SpellResult result = Game::SpellsParty::cast(_spellIndex, g_globals->_currCharacter);
+ switch (result) {
+ case SR_SUCCESS_DONE:
+ msg = STRING["spells.done"];
+ break;
+ case SR_FAILED:
+ msg = STRING["spells.failed"];
+ break;
+ case SR_SUCCESS_SILENT:
+ break;
+ }
} else {
// Add temorary equip bonus to character parameters
applyItemBonus (item->_tempBonus_id, item->_tempBonus_value);
@@ -100,7 +109,6 @@ Common::String UseItem::nonCombatUseItem(Inventory &inv, Inventory::Entry &invEn
g_globals->_party.updateAC();
msg = STRING["spells.done"];
- return "";
}
} else {
msg = STRING["dialogs.character.use_noncombat.no_charges_left"];
diff --git a/engines/mm/mm1/views_enh/character_inventory.cpp b/engines/mm/mm1/views_enh/character_inventory.cpp
index a7b3203ba22..9011d5f06a2 100644
--- a/engines/mm/mm1/views_enh/character_inventory.cpp
+++ b/engines/mm/mm1/views_enh/character_inventory.cpp
@@ -275,7 +275,10 @@ void CharacterInventory::useItem() {
else
msg = Game::UseItem::nonCombatUseItem(inv, *invEntry, _mode == BACKPACK_MODE);
- displayMessage(msg);
+ if (!msg.empty())
+ displayMessage(msg);
+ else
+ g_events->replaceView("Game", true);
}
void CharacterInventory::discardItem() {
More information about the Scummvm-git-logs
mailing list