Skip to content

Commit

Permalink
Cast GetAITargetsCount to double
Browse files Browse the repository at this point in the history
This should fix having to cast the return value manually in scripts
  • Loading branch information
Foereaper committed Oct 14, 2023
1 parent 3d9603b commit 248a4bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TrinityCore/CreatureMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -758,11 +758,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().GetThreatListSize());
Eluna::Push(L, (double)creature->GetThreatManager().GetThreatListSize());
return 1;
}

Expand Down

0 comments on commit 248a4bf

Please sign in to comment.