[Scummvm-git-logs] scummvm master -> 8a469814d40f30303273283343d279b7d9996a82

dreammaster noreply at scummvm.org
Sat Jun 3 18:30:47 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8a469814d4 MM: XEEN: Fix using Coin of Daily Sorcery


Commit: 8a469814d40f30303273283343d279b7d9996a82
    https://github.com/scummvm/scummvm/commit/8a469814d40f30303273283343d279b7d9996a82
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-06-03T11:30:24-07:00

Commit Message:
MM: XEEN: Fix using Coin of Daily Sorcery

Changed paths:
    engines/mm/mm1/game/detect_magic.cpp
    engines/mm/xeen/dialogs/dialogs_items.cpp
    engines/mm/xeen/spells.cpp


diff --git a/engines/mm/mm1/game/detect_magic.cpp b/engines/mm/mm1/game/detect_magic.cpp
index 6ebf7ef31af..81c829c0291 100644
--- a/engines/mm/mm1/game/detect_magic.cpp
+++ b/engines/mm/mm1/game/detect_magic.cpp
@@ -29,8 +29,6 @@ namespace Game {
 void DetectMagic::getMagicStrings() {
 	Inventory &inv = g_globals->_currCharacter->_backpack;
 	for (uint i = 0; i < inv.size(); ++i) {
-		Common::String s;
-
 		int itemId = inv[i]._id;
 		bool flag = false;
 		if (itemId < 12)
diff --git a/engines/mm/xeen/dialogs/dialogs_items.cpp b/engines/mm/xeen/dialogs/dialogs_items.cpp
index 824c5f8cce1..bfd89837546 100644
--- a/engines/mm/xeen/dialogs/dialogs_items.cpp
+++ b/engines/mm/xeen/dialogs/dialogs_items.cpp
@@ -780,7 +780,12 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite
 							ErrorScroll::show(_vm, Res.USE_ITEM_IN_COMBAT);
 						} else if (i._id && !i.isBad() && i._state._counter > 0) {
 							--i._state._counter;
+
 							_oldCharacter = &c;
+							// FIXME: Some spells use combat._oldCharacter, and it may not be set
+							// if an item is used directly after the game is started
+							if (!combat._oldCharacter)
+								combat._oldCharacter = &c;
 
 							windows[30].close();
 							windows[29].close();
diff --git a/engines/mm/xeen/spells.cpp b/engines/mm/xeen/spells.cpp
index 42dd97b79b2..88cb16061fc 100644
--- a/engines/mm/xeen/spells.cpp
+++ b/engines/mm/xeen/spells.cpp
@@ -163,7 +163,7 @@ void Spells::castItemSpell(int itemSpellId) {
 		MS_Hynotize, MS_WalkOnWater, NO_SPELL, MS_DetectMonster, MS_Fireball,
 		MS_ColdRay, MS_CurePoison, MS_AcidSpray, MS_TimeDistortion, MS_DragonSleep,
 		MS_CureDisease, MS_Teleport, MS_FingerOfDeath, MS_CureParalysis, MS_GolemStopper,
-		MS_PoisonVolley, MS_DeadlySwarm, MS_SuperShelter, MS_DayOfProtection, MS_DayOfProtection,
+		MS_PoisonVolley, MS_DeadlySwarm, MS_SuperShelter, MS_DayOfProtection, MS_DayOfSorcery,
 		MS_CreateFood, MS_FieryFlail, MS_RechargeItem, MS_FantasticFreeze, MS_TownPortal,
 		MS_StoneToFlesh, MS_RaiseDead, MS_Etheralize, MS_DancingSword, MS_MoonRay,
 		MS_MassDistortion, MS_PrismaticLight, MS_EnchantItem, MS_Incinerate, MS_HolyWord,




More information about the Scummvm-git-logs mailing list