feat(PlayerMethods): expose GetMItem (#5)

This commit is contained in:
Axel Cocat
2021-11-04 11:23:07 +01:00
committed by GitHub
parent 437ab62996
commit df8b3efbbe
2 changed files with 15 additions and 0 deletions

View File

@@ -1381,6 +1381,20 @@ namespace LuaPlayer
return 1;
}
/**
* Returns a mailed [Item] by guid.
*
* @param ObjectGuid guid : an item guid
* @return [Item] item
*/
int GetMailItem(lua_State* L, Player* player)
{
ObjectGuid guid = Eluna::CHECKVAL<ObjectGuid>(L, 2);
Eluna::Push(L, player->GetMItem(guid.GetCounter()));
return 1;
}
/**
* Returns an [Item] from the player by entry.
*