add ifndef to MEScrCmd_addtrainer

This commit is contained in:
ghoulslash 2021-04-02 09:23:19 -06:00
parent ef6c4ddbb1
commit 3f98ee25f2

View File

@ -350,11 +350,13 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
bool8 MEScrCmd_addtrainer(struct ScriptContext *ctx)
{
#ifndef FREE_BATTLE_TOWER_E_READER
u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0];
memcpy(&gSaveBlock2Ptr->frontier.ereaderTrainer, (void *)data, sizeof(gSaveBlock2Ptr->frontier.ereaderTrainer));
ValidateEReaderTrainer();
StringExpandPlaceholders(gStringVar4, gText_MysteryGiftNewTrainer);
ctx->data[2] = 2;
#endif
return FALSE;
}