mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feat: add Player:GetTrader (#126)
This commit is contained in:
@@ -96,6 +96,7 @@ Eluna API for AC:
|
||||
- Added `Player:GetAchievementCriteriaProgress()`: https://github.com/azerothcore/mod-eluna/pull/78
|
||||
- Added vendor entry as argument to `Player:SendListInventory(object, vendorentry)`: https://github.com/azerothcore/mod-eluna/pull/48
|
||||
- Added `Player:GetPlayerSettingValue()` and `Player:UpdatePlayerSetting()`: https://github.com/azerothcore/mod-eluna/pull/125
|
||||
- Added `Player:GetTrader()`: https://github.com/azerothcore/mod-eluna/pull/126
|
||||
|
||||
### Group
|
||||
- Added `Group:GetGroupType()`: https://github.com/azerothcore/mod-eluna/pull/82
|
||||
|
||||
@@ -544,6 +544,7 @@ ElunaRegister<Player> PlayerMethods[] =
|
||||
{ "GetHonorLastWeekStandingPos", &LuaPlayer::GetHonorLastWeekStandingPos },
|
||||
#endif
|
||||
{ "GetPlayerSettingValue", &LuaPlayer::GetPlayerSettingValue },
|
||||
{ "GetTrader", &LuaPlayer::GetTrader },
|
||||
|
||||
// Setters
|
||||
{ "AdvanceSkillsToMax", &LuaPlayer::AdvanceSkillsToMax },
|
||||
|
||||
@@ -4199,6 +4199,17 @@ namespace LuaPlayer
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Player] that is currently trading with this [Player]
|
||||
*
|
||||
* @return [Player] trader : the player trading, or nil
|
||||
*/
|
||||
int GetTrader(lua_State* L, Player* player)
|
||||
{
|
||||
Eluna::Push(L, player->GetTrader());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*int BindToInstance(lua_State* L, Player* player)
|
||||
{
|
||||
player->BindToInstance();
|
||||
|
||||
Reference in New Issue
Block a user