From f9f83f892dab1557b801d4db9d382d9283cfc3cd Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 17 Feb 2020 10:55:42 +0100 Subject: [PATCH] Fixed ModifyEffectChance function having uint16 instead of float as chance. --- src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp | 4 ++-- .../AngelScript/TypeRegistry/BasicScriptClass.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp b/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp index bf6e90d..a1be971 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp @@ -89,9 +89,9 @@ public: "void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit)"); SCRIPT_HOOK_FUNCTION(OnAfterHits, "void OnAfterHits(ExecutingMove@ attack, Pokemon@ target)"); SCRIPT_HOOK_FUNCTION(ModifyEffectChance, - "void ModifyEffectChance(ExecutingMove@ attack, Pokemon@ target, uint16& chance)"); + "void ModifyEffectChance(ExecutingMove@ attack, Pokemon@ target, float& chance)"); SCRIPT_HOOK_FUNCTION(ModifyIncomingEffectChance, - "void ModifyIncomingEffectChance(ExecutingMove@ attack, Pokemon@ target, uint16& chance)"); + "void ModifyIncomingEffectChance(ExecutingMove@ attack, Pokemon@ target, float& chance)"); }; #undef SCRIPT_HOOK_FUNCTION diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp index 454e297..e2f1b87 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp @@ -21,8 +21,8 @@ shared abstract class PkmnScript { void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit){}; void OnAfterHits(ExecutingMove@ attack, Pokemon@ target){}; - void ModifyEffectChance(ExecutingMove@ attack, Pokemon@ target, uint16& chance){}; - void ModifyIncomingEffectChance(ExecutingMove@ attack, Pokemon@ target, uint16& chance){}; + void ModifyEffectChance(ExecutingMove@ attack, Pokemon@ target, float& chance){}; + void ModifyIncomingEffectChance(ExecutingMove@ attack, Pokemon@ target, float& chance){}; } )"); assert(r >= 0);