feat(PlayerMethods): Add Today/Yesterday Kills and Honor Points methods (#364)
This commit is contained in:
@@ -489,7 +489,11 @@ ALERegister<Player> PlayerMethods[] =
|
||||
{ "GetCompletedQuestsCount", &LuaPlayer::GetCompletedQuestsCount },
|
||||
{ "GetArenaPoints", &LuaPlayer::GetArenaPoints },
|
||||
{ "GetHonorPoints", &LuaPlayer::GetHonorPoints },
|
||||
{ "GetTodayHonorPoints", &LuaPlayer::GetTodayHonorPoints },
|
||||
{ "GetYesterdayHonorPoints", &LuaPlayer::GetYesterdayHonorPoints },
|
||||
{ "GetLifetimeKills", &LuaPlayer::GetLifetimeKills },
|
||||
{ "GetTodayKills", &LuaPlayer::GetTodayKills },
|
||||
{ "GetYesterdayKills", &LuaPlayer::GetYesterdayKills },
|
||||
{ "GetPlayerIP", &LuaPlayer::GetPlayerIP },
|
||||
{ "GetLevelPlayedTime", &LuaPlayer::GetLevelPlayedTime },
|
||||
{ "GetTotalPlayedTime", &LuaPlayer::GetTotalPlayedTime },
|
||||
|
||||
@@ -811,6 +811,28 @@ namespace LuaPlayer
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Player]s today Honor points.
|
||||
*
|
||||
* @return uint32 todayHonorPoints
|
||||
*/
|
||||
int GetTodayHonorPoints(lua_State* L, Player* player)
|
||||
{
|
||||
ALE::Push(L, player->GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Player]s yesterday Honor points.
|
||||
*
|
||||
* @return uint32 yesterdayHonorPoints
|
||||
*/
|
||||
int GetYesterdayHonorPoints(lua_State* L, Player* player)
|
||||
{
|
||||
ALE::Push(L, player->GetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Player]s current shield block value
|
||||
*
|
||||
@@ -1494,6 +1516,28 @@ namespace LuaPlayer
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Player]s today Honorable Kills
|
||||
*
|
||||
* @return uint32 todayKills
|
||||
*/
|
||||
int GetTodayKills(lua_State* L, Player* player)
|
||||
{
|
||||
ALE::Push(L, uint32(player->GetUInt16Value(PLAYER_FIELD_KILLS, 0)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Player]s yesterday Honorable Kills
|
||||
*
|
||||
* @return uint32 yesterdayKills
|
||||
*/
|
||||
int GetYesterdayKills(lua_State* L, Player* player)
|
||||
{
|
||||
ALE::Push(L, uint32(player->GetUInt16Value(PLAYER_FIELD_KILLS, 1)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the [Player]s IP address
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user