use OBJ_EVENT_GFX_SPECIES_MASK in bufferspeciesname (#5088)

Co-authored-by: sbird <sbird@no.tld>
This commit is contained in:
Philipp AUER 2024-08-05 21:18:35 +02:00 committed by GitHub
parent fd3cb6f96b
commit 1f93c25611
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1693,7 +1693,7 @@ bool8 ScrCmd_vmessage(struct ScriptContext *ctx)
bool8 ScrCmd_bufferspeciesname(struct ScriptContext *ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
u16 species = VarGet(ScriptReadHalfword(ctx)) & ((1 << 10) - 1); // ignore possible shiny / form bits
u16 species = VarGet(ScriptReadHalfword(ctx)) & OBJ_EVENT_GFX_SPECIES_MASK; // ignore possible shiny / form bits
StringCopy(sScriptStringVars[stringVarIndex], GetSpeciesName(species));
return FALSE;