forked from teamnwah/openmw-tes3coop
[Server] Make spacing in CharClass consistent with other categories
This commit is contained in:
parent
e8ce009521
commit
934e592bdb
1 changed files with 19 additions and 0 deletions
|
@ -16,6 +16,7 @@ const char *CharClassFunctions::GetDefaultClass(unsigned short pid) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, "");
|
GET_PLAYER(pid, player, "");
|
||||||
|
|
||||||
return player->charClass.mId.c_str();
|
return player->charClass.mId.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +24,7 @@ const char *CharClassFunctions::GetClassName(unsigned short pid) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, "");
|
GET_PLAYER(pid, player, "");
|
||||||
|
|
||||||
return player->charClass.mName.c_str();
|
return player->charClass.mName.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +32,7 @@ const char *CharClassFunctions::GetClassDesc(unsigned short pid) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, "");
|
GET_PLAYER(pid, player, "");
|
||||||
|
|
||||||
return player->charClass.mDescription.c_str();
|
return player->charClass.mDescription.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,8 +40,10 @@ int CharClassFunctions::GetClassMajorAttribute(unsigned short pid, unsigned char
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
|
|
||||||
if (slot > 1)
|
if (slot > 1)
|
||||||
throw invalid_argument("Incorrect attribute slot id");
|
throw invalid_argument("Incorrect attribute slot id");
|
||||||
|
|
||||||
return player->charClass.mData.mAttribute[slot];
|
return player->charClass.mData.mAttribute[slot];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +51,7 @@ int CharClassFunctions::GetClassSpecialization(unsigned short pid) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
|
|
||||||
return player->charClass.mData.mSpecialization;
|
return player->charClass.mData.mSpecialization;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,8 +59,10 @@ int CharClassFunctions::GetClassMajorSkill(unsigned short pid, unsigned char slo
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
|
|
||||||
if (slot > 4)
|
if (slot > 4)
|
||||||
throw invalid_argument("Incorrect skill slot id");
|
throw invalid_argument("Incorrect skill slot id");
|
||||||
|
|
||||||
return player->charClass.mData.mSkills[slot][1];
|
return player->charClass.mData.mSkills[slot][1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +70,10 @@ int CharClassFunctions::GetClassMinorSkill(unsigned short pid, unsigned char slo
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
|
|
||||||
if (slot > 4)
|
if (slot > 4)
|
||||||
throw invalid_argument("Incorrect skill slot id");
|
throw invalid_argument("Incorrect skill slot id");
|
||||||
|
|
||||||
return player->charClass.mData.mSkills[slot][0];
|
return player->charClass.mData.mSkills[slot][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,6 +81,7 @@ int CharClassFunctions::IsClassDefault(unsigned short pid) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
|
|
||||||
return !player->charClass.mId.empty(); // true if default
|
return !player->charClass.mId.empty(); // true if default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,12 +89,14 @@ void CharClassFunctions::SetDefaultClass(unsigned short pid, const char *id) noe
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
|
|
||||||
player->charClass.mId = id;
|
player->charClass.mId = id;
|
||||||
}
|
}
|
||||||
void CharClassFunctions::SetClassName(unsigned short pid, const char *name) noexcept
|
void CharClassFunctions::SetClassName(unsigned short pid, const char *name) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
|
|
||||||
player->charClass.mName = name;
|
player->charClass.mName = name;
|
||||||
player->charClass.mId = "";
|
player->charClass.mId = "";
|
||||||
}
|
}
|
||||||
|
@ -91,6 +104,7 @@ void CharClassFunctions::SetClassDesc(unsigned short pid, const char *desc) noex
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
|
|
||||||
player->charClass.mDescription = desc;
|
player->charClass.mDescription = desc;
|
||||||
}
|
}
|
||||||
void CharClassFunctions::SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept
|
void CharClassFunctions::SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept
|
||||||
|
@ -108,22 +122,27 @@ void CharClassFunctions::SetClassSpecialization(unsigned short pid, int spec) no
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
|
|
||||||
player->charClass.mData.mSpecialization = spec;
|
player->charClass.mData.mSpecialization = spec;
|
||||||
}
|
}
|
||||||
void CharClassFunctions::SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept
|
void CharClassFunctions::SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
|
|
||||||
if (slot > 4)
|
if (slot > 4)
|
||||||
throw invalid_argument("Incorrect skill slot id");
|
throw invalid_argument("Incorrect skill slot id");
|
||||||
|
|
||||||
player->charClass.mData.mSkills[slot][1] = skillId;
|
player->charClass.mData.mSkills[slot][1] = skillId;
|
||||||
}
|
}
|
||||||
void CharClassFunctions::SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept
|
void CharClassFunctions::SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player,);
|
GET_PLAYER(pid, player,);
|
||||||
|
|
||||||
if (slot > 4)
|
if (slot > 4)
|
||||||
throw invalid_argument("Incorrect skill slot id");
|
throw invalid_argument("Incorrect skill slot id");
|
||||||
|
|
||||||
player->charClass.mData.mSkills[slot][0] = skillId;
|
player->charClass.mData.mSkills[slot][0] = skillId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue