diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp index 3e32f95..2ff786d 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp @@ -4,7 +4,6 @@ void RegisterExecutingAttack::Register(asIScriptEngine* engine) { RegisterHitData(engine); - RegisterTargetData(engine); RegisterExecutingAttackType(engine); } void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) { @@ -31,28 +30,11 @@ void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) { asCALL_THISCALL); assert(r >= 0); } -void RegisterExecutingAttack::RegisterTargetData(asIScriptEngine* engine) { - [[maybe_unused]] int r = engine->RegisterObjectType("TargetData", 0, asOBJ_REF | asOBJ_NOCOUNT); - assert(r >= 0); - r = engine->RegisterObjectMethod("TargetData", "uint8 get_NumberOfHits() const property", - asMETHOD(CreatureLib::Battling::ExecutingAttack::TargetData, GetNumberOfHits), - asCALL_THISCALL); - assert(r >= 0); - r = engine->RegisterObjectMethod("TargetData", "bool get_IsHit() const property", - asMETHOD(CreatureLib::Battling::ExecutingAttack::TargetData, IsHit), - asCALL_THISCALL); - assert(r >= 0); - r = engine->RegisterObjectMethod("TargetData", "HitData@ GetHit(uint8 index) const", - asMETHOD(CreatureLib::Battling::ExecutingAttack::TargetData, GetHit), - asCALL_THISCALL); - assert(r >= 0); - -} void RegisterExecutingAttack::RegisterExecutingAttackType(asIScriptEngine* engine) { [[maybe_unused]] int r = engine->RegisterObjectType("ExecutingMove", 0, asOBJ_REF | asOBJ_NOCOUNT); assert(r >= 0); - r = engine->RegisterObjectMethod("ExecutingMove", "TargetData@ GetAttackDataForTarget(Pokemon@ pkmn) const", - asMETHOD(CreatureLib::Battling::ExecutingAttack, GetAttackDataForTarget), + r = engine->RegisterObjectMethod("ExecutingMove", "HitData@ GetHitData(Pokemon@ target, uint8 hit) const", + asMETHOD(CreatureLib::Battling::ExecutingAttack, GetHitData), asCALL_THISCALL); assert(r >= 0); r = engine->RegisterObjectMethod("ExecutingMove", "bool IsPokemonTarget(Pokemon@ pkmn) const", diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp index f4b2383..90409f8 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.hpp @@ -5,7 +5,6 @@ class RegisterExecutingAttack { static void RegisterHitData(asIScriptEngine* engine); - static void RegisterTargetData(asIScriptEngine* engine); static void RegisterExecutingAttackType(asIScriptEngine* engine); public: static void Register(asIScriptEngine* engine);