From 41be34faf7f0af2b5a708cae13e6d5bd71274832 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Sun, 15 Oct 2023 00:57:42 +0200 Subject: [PATCH] Update GetAITargetsCount for all cores --- CMangos/CreatureMethods.h | 4 ++-- Mangos/CreatureMethods.h | 4 ++-- VMangos/CreatureMethods.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMangos/CreatureMethods.h b/CMangos/CreatureMethods.h index 970fbcee5e..2fbc344808 100644 --- a/CMangos/CreatureMethods.h +++ b/CMangos/CreatureMethods.h @@ -668,11 +668,11 @@ namespace LuaCreature /** * Returns the number of [Unit]s in this [Creature]'s threat list. * - * @return int targetsCount + * @return double targetsCount */ int GetAITargetsCount(lua_State* L, Creature* creature) { - Eluna::Push(L, creature->getThreatManager().getThreatList().size()); + Eluna::Push(L, (double)creature->getThreatManager().getThreatList().size()); return 1; } diff --git a/Mangos/CreatureMethods.h b/Mangos/CreatureMethods.h index 72f74f8114..63e3126da7 100644 --- a/Mangos/CreatureMethods.h +++ b/Mangos/CreatureMethods.h @@ -902,7 +902,7 @@ namespace LuaCreature /** * Returns the number of [Unit]s in this [Creature]'s threat list. * - * @return int targetsCount + * @return double targetsCount */ int GetAITargetsCount(lua_State* L, Creature* creature) { @@ -913,7 +913,7 @@ namespace LuaCreature #elif defined(CMANGOS) Eluna::Push(L, creature->getThreatManager().getThreatList().size()); #else - Eluna::Push(L, creature->GetThreatManager().getThreatList().size()); + Eluna::Push(L, (double)creature->GetThreatManager().getThreatList().size()); #endif return 1; } diff --git a/VMangos/CreatureMethods.h b/VMangos/CreatureMethods.h index 9636d207a4..3334fad928 100644 --- a/VMangos/CreatureMethods.h +++ b/VMangos/CreatureMethods.h @@ -843,7 +843,7 @@ namespace LuaCreature /** * Returns the number of [Unit]s in this [Creature]'s threat list. * - * @return int targetsCount + * @return double targetsCount */ int GetAITargetsCount(lua_State* L, Creature* creature) { @@ -854,7 +854,7 @@ namespace LuaCreature #elif defined(CMANGOS) Eluna::Push(L, creature->getThreatManager().getThreatList().size()); #else - Eluna::Push(L, creature->GetThreatManager().getThreatList().size()); + Eluna::Push(L, (double)creature->GetThreatManager().getThreatList().size()); #endif return 1; }