mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feat(PlayerMethods): expose GetMItem (#5)
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user