mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feat: add Player:GetXP() (#77)
This commit is contained in:
@@ -507,6 +507,7 @@ ElunaRegister<Player> PlayerMethods[] =
|
|||||||
{ "GetDrunkValue", &LuaPlayer::GetDrunkValue },
|
{ "GetDrunkValue", &LuaPlayer::GetDrunkValue },
|
||||||
{ "GetBattlegroundId", &LuaPlayer::GetBattlegroundId },
|
{ "GetBattlegroundId", &LuaPlayer::GetBattlegroundId },
|
||||||
{ "GetBattlegroundTypeId", &LuaPlayer::GetBattlegroundTypeId },
|
{ "GetBattlegroundTypeId", &LuaPlayer::GetBattlegroundTypeId },
|
||||||
|
{ "GetXP", &LuaPlayer::GetXP },
|
||||||
{ "GetXPRestBonus", &LuaPlayer::GetXPRestBonus },
|
{ "GetXPRestBonus", &LuaPlayer::GetXPRestBonus },
|
||||||
{ "GetGroupInvite", &LuaPlayer::GetGroupInvite },
|
{ "GetGroupInvite", &LuaPlayer::GetGroupInvite },
|
||||||
{ "GetSubGroup", &LuaPlayer::GetSubGroup },
|
{ "GetSubGroup", &LuaPlayer::GetSubGroup },
|
||||||
|
|||||||
@@ -960,6 +960,17 @@ namespace LuaPlayer
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the [Player]'s experience points
|
||||||
|
*
|
||||||
|
* @return uint32 xp
|
||||||
|
*/
|
||||||
|
int GetXP(lua_State* L, Player* player)
|
||||||
|
{
|
||||||
|
Eluna::Push(L, player->GetUInt32Value(PLAYER_XP));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns rested experience bonus
|
* Returns rested experience bonus
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user