Add method GetItemByGUID
This commit is contained in:
@@ -1126,20 +1126,6 @@ namespace LuaPlayer
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Player]s [Item] object by entry ID specified
|
||||
*
|
||||
* @param uint32 entryId
|
||||
* @return [Item] item
|
||||
*/
|
||||
int GetItemByEntry(Eluna* /*E*/, lua_State* L, Player* player)
|
||||
{
|
||||
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2);
|
||||
|
||||
Eluna::Push(L, player->GetItemByEntry(entry));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Player]s [Item] object by gear slot specified
|
||||
*
|
||||
@@ -1232,6 +1218,38 @@ namespace LuaPlayer
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [Item] from the player by guid.
|
||||
*
|
||||
* The item can be equipped, in bags or in bank.
|
||||
*
|
||||
* @param uint64 guid : an item guid
|
||||
* @return [Item] item
|
||||
*/
|
||||
int GetItemByGUID(Eluna* /*E*/, lua_State* L, Player* player)
|
||||
{
|
||||
uint64 guid = Eluna::CHECKVAL<uint64>(L, 2);
|
||||
|
||||
Eluna::Push(L, player->GetItemByGuid(ObjectGuid(guid)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [Item] from the player by entry.
|
||||
*
|
||||
* The item can be equipped, in bags or in bank.
|
||||
*
|
||||
* @param uint32 entryId
|
||||
* @return [Item] item
|
||||
*/
|
||||
int GetItemByEntry(Eluna* /*E*/, lua_State* L, Player* player)
|
||||
{
|
||||
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2);
|
||||
|
||||
Eluna::Push(L, player->GetItemByEntry(entry));
|
||||
return 1;
|
||||
}
|
||||
|
||||
int GetGossipTextId(Eluna* /*E*/, lua_State* L, Player* player)
|
||||
{
|
||||
WorldObject* obj = Eluna::CHECKOBJ<WorldObject>(L, 2);
|
||||
|
||||
Reference in New Issue
Block a user