Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Specialization Check Methods to Player #163

Merged
merged 2 commits into from
Jan 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update PlayerMethods.h
iThorgrim authored Jan 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f21ffd4d043bf1e74681915d5d3c8a4a2318b258
44 changes: 44 additions & 0 deletions src/LuaEngine/PlayerMethods.h
Original file line number Diff line number Diff line change
@@ -405,6 +405,50 @@ namespace LuaPlayer
}
#endif

/**
* Returns `true` if the [Player] has a Tank Specialization, `false` otherwise.
*
* @return bool HasTankSpec
*/
int HasTankSpec(lua_State* L, Player* player)
{
Eluna::Push(L, player->HasTankSpec());
return 1;
}

/**
* Returns `true` if the [Player] has a Melee Specialization, `false` otherwise.
*
* @return bool HasMeleeSpec
*/
int HasMeleeSpec(lua_State* L, Player* player)
{
Eluna::Push(L, player->HasMeleeSpec());
return 1;
}

/**
* Returns `true` if the [Player] has a Caster Specialization, `false` otherwise.
*
* @return bool HasCasterSpec
*/
int HasCasterSpec(lua_State* L, Player* player)
{
Eluna::Push(L, player->HasCasterSpec());
return 1;
}

/**
* Returns `true` if the [Player] has a Heal Specialization, `false` otherwise.
*
* @return bool HasHealSpec
*/
int HasHealSpec(lua_State* L, Player* player)
{
Eluna::Push(L, player->HasHealSpec());
return 1;
}

/**
* Returns `true` if the [Player] is in a [Group], `false` otherwise.
*