Fix formatting

coverity_scan^2
David Cernat 8 years ago
parent f562215d9a
commit a20e7890a2

@ -42,7 +42,7 @@ void CharClassFunctions::SetClassMajorAttribute(unsigned short pid, unsigned cha
Player *player;
GET_PLAYER(pid, player,);
if(slot > 1)
if (slot > 1)
throw invalid_argument("Incorrect attribute slot id");
player->klass.mData.mAttribute[slot] = attrId;
@ -58,7 +58,7 @@ void CharClassFunctions::SetClassMajorSkill(unsigned short pid, unsigned char sl
{
Player *player;
GET_PLAYER(pid, player,);
if(slot > 4)
if (slot > 4)
throw invalid_argument("Incorrect skill slot id");
player->klass.mData.mSkills[slot][1] = skillId;
}
@ -66,7 +66,7 @@ void CharClassFunctions::SetClassMinorSkill(unsigned short pid, unsigned char sl
{
Player *player;
GET_PLAYER(pid, player,);
if(slot > 4)
if (slot > 4)
throw invalid_argument("Incorrect skill slot id");
player->klass.mData.mSkills[slot][0] = skillId;
}
@ -103,7 +103,7 @@ int CharClassFunctions::GetClassMajorAttribute(unsigned short pid, unsigned char
{
Player *player;
GET_PLAYER(pid, player,0);
if(slot > 1)
if (slot > 1)
throw invalid_argument("Incorrect attribute slot id");
return player->klass.mData.mAttribute[slot];
}
@ -119,7 +119,7 @@ int CharClassFunctions::GetClassMajorSkill(unsigned short pid, unsigned char slo
{
Player *player;
GET_PLAYER(pid, player,0);
if(slot > 4)
if (slot > 4)
throw invalid_argument("Incorrect skill slot id");
return player->klass.mData.mSkills[slot][1];
}
@ -128,7 +128,7 @@ int CharClassFunctions::GetClassMinorSkill(unsigned short pid, unsigned char slo
{
Player *player;
GET_PLAYER(pid, player,0);
if(slot > 4)
if (slot > 4)
throw invalid_argument("Incorrect skill slot id");
return player->klass.mData.mSkills[slot][0];
}

@ -586,7 +586,7 @@ void LocalPlayer::updateChar()
void LocalPlayer::SetClass()
{
if(klass.mId.empty()) // custom class
if (klass.mId.empty()) // custom class
{
klass.mData.mIsPlayable = 0x1;
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(klass);
@ -607,7 +607,7 @@ void LocalPlayer::SendClass()
const ESM::NPC *cpl = world->getPlayerPtr().get<ESM::NPC>()->mBase;
const ESM::Class *cls = world->getStore().get<ESM::Class>().find(cpl->mClass);
if(cpl->mClass.find("$dynamic") != string::npos) // custom class
if (cpl->mClass.find("$dynamic") != string::npos) // custom class
{
klass.mId = "";
klass.mName = cls->mName;

@ -577,7 +577,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
{
if (id == myid)
{
if(packet->length == myPacket->headerSize())
if (packet->length == myPacket->headerSize())
getLocalPlayer()->SendClass();
else
{
@ -589,15 +589,15 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
}
case ID_GAME_TIME:
{
if(id == myid)
if (id == myid)
{
myPacket->Packet(&bsIn, getLocalPlayer(), false);
MWBase::World *world = MWBase::Environment::get().getWorld();
if(getLocalPlayer()->hour != -1)
if (getLocalPlayer()->hour != -1)
world->setHour(getLocalPlayer()->hour);
else if(getLocalPlayer()->day != -1)
else if (getLocalPlayer()->day != -1)
world->setDay(getLocalPlayer()->day);
else if(getLocalPlayer()->month != -1)
else if (getLocalPlayer()->month != -1)
world->setMonth(getLocalPlayer()->month);
}
}

@ -15,7 +15,7 @@ void mwmp::PacketClass::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player,
BasePacket::Packet(bs, player, send);
RW(player->klass.mId, send);
if(player->klass.mId.empty()) // custom class
if (player->klass.mId.empty()) // custom class
{
RW(player->klass.mName, send);
RW(player->klass.mDescription, send);

Loading…
Cancel
Save