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:
@@ -467,6 +467,7 @@ ElunaRegister<Player> PlayerMethods[] =
|
|||||||
{ "GetItemByPos", &LuaPlayer::GetItemByPos },
|
{ "GetItemByPos", &LuaPlayer::GetItemByPos },
|
||||||
{ "GetItemByEntry", &LuaPlayer::GetItemByEntry },
|
{ "GetItemByEntry", &LuaPlayer::GetItemByEntry },
|
||||||
{ "GetItemByGUID", &LuaPlayer::GetItemByGUID },
|
{ "GetItemByGUID", &LuaPlayer::GetItemByGUID },
|
||||||
|
{ "GetMailItem", &LuaPlayer::GetMailItem },
|
||||||
{ "GetReputation", &LuaPlayer::GetReputation },
|
{ "GetReputation", &LuaPlayer::GetReputation },
|
||||||
{ "GetEquippedItemBySlot", &LuaPlayer::GetEquippedItemBySlot },
|
{ "GetEquippedItemBySlot", &LuaPlayer::GetEquippedItemBySlot },
|
||||||
{ "GetQuestLevel", &LuaPlayer::GetQuestLevel },
|
{ "GetQuestLevel", &LuaPlayer::GetQuestLevel },
|
||||||
|
|||||||
@@ -1381,6 +1381,20 @@ namespace LuaPlayer
|
|||||||
return 1;
|
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.
|
* Returns an [Item] from the player by entry.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user