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
|
||||
{
|
||||
u32 objectEventId = gApproachingTrainers[gNoOfApproachingTrainers - 1].objectEventId;
|
||||
gApproachingTrainers[gNoOfApproachingTrainers - 1].trainerScriptPtr = GetObjectEventScriptPointerByObjectEventId(objectEventId);
|
||||
gSelectedObjectEvent = objectEventId;
|
||||
gSpecialVar_LastTalked = gObjectEvents[objectEventId].localId;
|
||||
ScriptContext_SetupScript(EventScript_ObjectApproachPlayer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user