Use unique pointers in scriptset.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-06-02 15:03:31 +02:00
parent 23e2bc73bc
commit 1ef50fd3a6
7 changed files with 22 additions and 25 deletions

View File

@@ -56,7 +56,7 @@ export BattleParty* const* CreatureLib_Battle_GetParties(const Battle* p) {
}
export Script* CreatureLib_Battle_GetVolatileScript(Battle* p, const char* key) {
return p->GetVolatileScript(ConstString::GetHash(key));
return p->GetVolatileScript(ConstString::GetHash(key)).GetRaw();
}
export uint8_t CreatureLib_Battle_AddVolatileScriptByName(Battle* p, const char* key) {
Try(p->AddVolatileScript(ConstString(key));)