From 6c40f4291df0102cdc87b50c22a4f3568d16abc5 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 20 May 2020 15:02:53 +0200 Subject: [PATCH] Fixed C Interface for DamageLibrary returning floats instead of expected bytes. --- CInterface/Battling/DamageLibrary.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CInterface/Battling/DamageLibrary.cpp b/CInterface/Battling/DamageLibrary.cpp index 8f516bc..f4efb76 100644 --- a/CInterface/Battling/DamageLibrary.cpp +++ b/CInterface/Battling/DamageLibrary.cpp @@ -17,13 +17,13 @@ export uint8_t CreatureLib_DamageLibrary_GetBasePower(uint8_t& out, const Damage ExecutingAttack::HitData* hitData) { Try(out = p->GetBasePower(attack, target, hitIndex, *hitData);) } -export float CreatureLib_DamageLibrary_GetStatModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack, - Creature* target, uint8_t hitIndex, - ExecutingAttack::HitData* hitData) { - Try(out = p->GetStatModifier(attack, target, hitIndex, *hitData);) -} -export float CreatureLib_DamageLibrary_GetDamageModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack, +export uint8_t CreatureLib_DamageLibrary_GetStatModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack, Creature* target, uint8_t hitIndex, ExecutingAttack::HitData* hitData) { + Try(out = p->GetStatModifier(attack, target, hitIndex, *hitData);) +} +export uint8_t CreatureLib_DamageLibrary_GetDamageModifier(float& out, const DamageLibrary* p, ExecutingAttack* attack, + Creature* target, uint8_t hitIndex, + ExecutingAttack::HitData* hitData) { Try(out = p->GetDamageModifier(attack, target, hitIndex, *hitData);) }