diff --git a/methods/CMangos/CreatureMethods.h b/methods/CMangos/CreatureMethods.h index b62a7e36f0..fb305be08e 100644 --- a/methods/CMangos/CreatureMethods.h +++ b/methods/CMangos/CreatureMethods.h @@ -1297,6 +1297,7 @@ namespace LuaCreature { "ResetAllThreat", nullptr, METHOD_REG_NONE }, // TC/Acore { "FixateTarget", nullptr, METHOD_REG_NONE }, // TC/Acore { "ClearFixate", nullptr, METHOD_REG_NONE }, // TC/Acore + { "GetRank", nullptr, METHOD_REG_NONE }, // not implemented { NULL, NULL, METHOD_REG_NONE } }; diff --git a/methods/Mangos/CreatureMethods.h b/methods/Mangos/CreatureMethods.h index e37c30dd53..56c2973a4c 100644 --- a/methods/Mangos/CreatureMethods.h +++ b/methods/Mangos/CreatureMethods.h @@ -1206,6 +1206,7 @@ namespace LuaCreature { "ResetLootMode", nullptr, METHOD_REG_NONE }, // not implemented { "RemoveLootMode", nullptr, METHOD_REG_NONE }, // not implemented { "RemoveFromWorld", nullptr, METHOD_REG_NONE }, // not implemented + { "GetRank", nullptr, METHOD_REG_NONE }, // not implemented { NULL, NULL, METHOD_REG_NONE } }; diff --git a/methods/TrinityCore/CreatureMethods.h b/methods/TrinityCore/CreatureMethods.h index bcb701813e..4162d7cf9e 100644 --- a/methods/TrinityCore/CreatureMethods.h +++ b/methods/TrinityCore/CreatureMethods.h @@ -893,6 +893,17 @@ namespace LuaCreature return 1; } + /** + * Returns the [Creature]'s rank as defined in the creature template. + * + * @return uint32 rank + */ + int GetRank(Eluna* E, Creature* creature) + { + E->Push(creature->GetCreatureTemplate()->rank); + return 1; + } + #ifndef CATA /** * Returns the [Creature]'s shield block value. @@ -1428,6 +1439,7 @@ namespace LuaCreature { "GetLootRecipientGroup", &LuaCreature::GetLootRecipientGroup }, { "GetNPCFlags", &LuaCreature::GetNPCFlags }, { "GetExtraFlags", &LuaCreature::GetExtraFlags }, + { "GetRank", &LuaCreature::GetRank }, #ifndef CATA { "GetShieldBlockValue", &LuaCreature::GetShieldBlockValue }, #endif diff --git a/methods/VMangos/CreatureMethods.h b/methods/VMangos/CreatureMethods.h index c5ac6bc239..aad72a8189 100644 --- a/methods/VMangos/CreatureMethods.h +++ b/methods/VMangos/CreatureMethods.h @@ -1203,6 +1203,7 @@ namespace LuaCreature { "ResetLootMode", nullptr, METHOD_REG_NONE }, // not implemented { "RemoveLootMode", nullptr, METHOD_REG_NONE }, // not implemented { "RemoveFromWorld", nullptr, METHOD_REG_NONE }, // not implemented + { "GetRank", nullptr, METHOD_REG_NONE }, // not implemented { NULL, NULL } };