Fix non-battle trainer script not running properly (#8056)
This commit is contained in:
parent
3a3b947622
commit
0b005d4b6f
@ -380,6 +380,7 @@ bool8 CheckForTrainersWantingBattle(void)
|
|||||||
if (numTrainers == 0xFF) // non-trainerbatle script
|
if (numTrainers == 0xFF) // non-trainerbatle script
|
||||||
{
|
{
|
||||||
u32 objectEventId = gApproachingTrainers[gNoOfApproachingTrainers - 1].objectEventId;
|
u32 objectEventId = gApproachingTrainers[gNoOfApproachingTrainers - 1].objectEventId;
|
||||||
|
gApproachingTrainers[gNoOfApproachingTrainers - 1].trainerScriptPtr = GetObjectEventScriptPointerByObjectEventId(objectEventId);
|
||||||
gSelectedObjectEvent = objectEventId;
|
gSelectedObjectEvent = objectEventId;
|
||||||
gSpecialVar_LastTalked = gObjectEvents[objectEventId].localId;
|
gSpecialVar_LastTalked = gObjectEvents[objectEventId].localId;
|
||||||
ScriptContext_SetupScript(EventScript_ObjectApproachPlayer);
|
ScriptContext_SetupScript(EventScript_ObjectApproachPlayer);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user