Dont allow changing weight and height of Pokemon if its const
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-10-30 17:12:39 +02:00
parent 21092eb347
commit abaee62582
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 2 additions and 2 deletions

View File

@ -108,10 +108,10 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
REGISTER_GETTER("Pokemon", "float get_Weight() const property", CreatureLib::Battling::Creature, GetWeight);
REGISTER_GETTER("Pokemon", "float get_Height() const property", CreatureLib::Battling::Creature, GetHeight);
auto r = engine->RegisterObjectMethod("Pokemon", "void set_Weight(float value) const property",
auto r = engine->RegisterObjectMethod("Pokemon", "void set_Weight(float value) property",
asMETHOD(PkmnLib::Battling::Pokemon, SetWeight), asCALL_THISCALL);
Ensure(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "void set_Height(float value) const property",
r = engine->RegisterObjectMethod("Pokemon", "void set_Height(float value) property",
asMETHOD(PkmnLib::Battling::Pokemon, SetHeight), asCALL_THISCALL);
Ensure(r >= 0);