diff --git a/Changelog.txt b/Changelog.txt index 58c76fec9..2fed73343 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -3945,5 +3945,8 @@ Added: 'H' shortcut for variables to get the value as hexadecimal. This tag does not prevent the player from coming back to life, it just prevents them from respawning on that corpse. The player always comes back to life, but not on that corpse. - Fixed: If you are around an entity that you own and you are trying to open a bank next to a bank, the "bank" command is perceived as a pet command and the bank does not open. There is no problem when you type "bank" after mounting the mount, but "bank" does not work when you dismount. (Issue #1331) +27-11-2024, Gladie +- Fixed: Redeeding t_multi_addon outside of housing system. Before it was only looking for owner of the multi, but in our case we need to know uid of the redeeding char. +======= 02-11-2024, raydie - Added: Add LAYER_SPELL_Explosion for use delayed explosion spell. Now if set Duration to spell explosion, these duration is the delay to execute the explosion (From UOGuide, explosion spell: 2 second delay between targetting and explosion) diff --git a/src/game/items/CItemMulti.cpp b/src/game/items/CItemMulti.cpp index 01cf07eca..64753406c 100644 --- a/src/game/items/CItemMulti.cpp +++ b/src/game/items/CItemMulti.cpp @@ -1174,7 +1174,7 @@ int16 CItemMulti::GetMultiCount() const return _iMultiCount; } -void CItemMulti::Redeed(bool fDisplayMsg, bool fMoveToBank, CUID uidChar) +void CItemMulti::Redeed(bool fDisplayMsg, bool fMoveToBank, CUID uidRedeedingChar) { ADDTOCALLSTACK("CItemMulti::Redeed"); if (GetKeyNum("REMOVED") > 0) // Just don't pass from here again, to avoid duplicated deeds. @@ -1209,7 +1209,7 @@ void CItemMulti::Redeed(bool fDisplayMsg, bool fMoveToBank, CUID uidChar) args.m_iN3 = fMoveToBank; // Transfer the Moving Crate to the owner's bank. if (IsTrigUsed(TRIGGER_REDEED)) { - tRet = OnTrigger(ITRIG_Redeed, uidChar.CharFind(), &args); + tRet = OnTrigger(ITRIG_Redeed, uidRedeedingChar.CharFind(), &args); if (args.m_iN2 == 0) { fMoveToBank = false; @@ -1230,7 +1230,8 @@ void CItemMulti::Redeed(bool fDisplayMsg, bool fMoveToBank, CUID uidChar) } CChar* pOwner = GetOwner().CharFind(); - if (!pOwner || !pOwner->m_pPlayer) + CChar* pChar = uidRedeedingChar.CharFind(); + if ((!pChar || !pChar->m_pPlayer) && (!pOwner || !pOwner->m_pPlayer)) { return; } @@ -1256,11 +1257,26 @@ void CItemMulti::Redeed(bool fDisplayMsg, bool fMoveToBank, CUID uidChar) } if (fMoveToBank) { - pOwner->GetBank(LAYER_BANKBOX)->ContentAdd(pDeed); + if (pOwner) + { + pOwner->GetBank(LAYER_BANKBOX)->ContentAdd(pDeed); + } + else + { + pChar->GetBank(LAYER_BANKBOX)->ContentAdd(pDeed); + } + } else { - pOwner->ItemBounce(pDeed, fDisplayMsg); + if (pOwner) + { + pOwner->ItemBounce(pDeed, fDisplayMsg); + } + else + { + pChar->ItemBounce(pDeed, fDisplayMsg); + } } } SetKeyNum("REMOVED", 1);