Fix ChestTurnCounter not incrementing if item belongs to another world

This commit is contained in:
aerinon
2024-04-12 16:15:33 -06:00
parent d75c72f85d
commit e12af76559

View File

@@ -265,9 +265,19 @@ PostItemAnimation:
LDA.b #$00 : STA.l TextBoxDefer
+
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE +
LDA.b LinkDirection : BEQ +
JSL IncrementChestTurnCounter
+
LDA.b IndoorsFlag : BEQ +
REP #$20 : LDA.b RoomIndex : STA.l !MULTIWORLD_ROOMID : SEP #$20
LDA.w RoomItemsTaken : STA.l !MULTIWORLD_ROOMDATA
LDA $1B : BEQ +
REP #$20 : LDA $A0 : STA !MULTIWORLD_ROOMID : SEP #$20
LDA $0403 : STA !MULTIWORLD_ROOMDATA
+
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BEQ +
@@ -275,12 +285,7 @@ PostItemAnimation:
LDA.b #$00 : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLB
JML Ancilla_ReceiveItem_objectFinished
+
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE +
LDA.b LinkDirection : BEQ +
JSL IncrementChestTurnCounter
+
+
REP #$20
PEA.w $7E00
PLB : PLB