diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-09 20:30:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-09 20:30:47 +0300 |
commit | 407de0a8d0898b28a587962e997df816cb17b6a9 (patch) | |
tree | 99a0184bb44950a900a9f093afb8887bdd148548 /src/being | |
parent | 972fdcbd1ed61e2528c8b4c733f21a70d7f674b1 (diff) | |
download | mv-407de0a8d0898b28a587962e997df816cb17b6a9.tar.gz mv-407de0a8d0898b28a587962e997df816cb17b6a9.tar.bz2 mv-407de0a8d0898b28a587962e997df816cb17b6a9.tar.xz mv-407de0a8d0898b28a587962e997df816cb17b6a9.zip |
Fix code style.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 10 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 3 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index fb19b2f61..deac96e2c 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -652,7 +652,7 @@ void Being::takeDamage(Being *restrict const attacker, const int attackId, const int level) restrict2 { - if ((userPalette == nullptr) || (attacker == nullptr)) + if (userPalette == nullptr || attacker == nullptr) return; BLOCK_START("Being::takeDamage1") @@ -726,7 +726,7 @@ void Being::takeDamage(Being *restrict const attacker, color = &userPalette->getColor(UserColorId::HIT_MONSTER_PLAYER); } - if ((chatWindow != nullptr) && mShowBattleEvents) + if (chatWindow != nullptr && mShowBattleEvents) { if (this == localPlayer) { @@ -746,7 +746,7 @@ void Being::takeDamage(Being *restrict const attacker, ChatMsgType::BY_PLAYER); } } - if ((font != nullptr) && (particleEngine != nullptr) && (color != nullptr)) + if (font != nullptr && particleEngine != nullptr) { // Show damage number particleEngine->addTextSplashEffect(damage, @@ -2260,13 +2260,13 @@ void Being::drawEmotion(Graphics *restrict const graphics, { int x; int y; - if (mShowBadges == 2 && (mDispName != nullptr) && (gui != nullptr)) + if (mShowBadges == 2 && mDispName != nullptr && gui != nullptr) { const Font *restrict const font = gui->getFont(); x = mDispName->getX() - offsetX + mDispName->getWidth(); y = mDispName->getY() - offsetY - font->getHeight(); } - else if (mShowBadges == 3 && (mDispName != nullptr) && (gui != nullptr)) + else if (mShowBadges == 3 && mDispName != nullptr && gui != nullptr) { x = px + 8 - mBadgesCount * 8; y = mDispName->getY() - offsetY; diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index c0f4caa80..5c275b3f6 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -106,12 +106,9 @@ typedef std::map<int, Guild*>::const_iterator GuildMapCIter; LocalPlayer *localPlayer = nullptr; -class SkillDialog; - extern OkDialog *weightNotice; extern time_t weightNoticeTime; - LocalPlayer::LocalPlayer(const BeingId id, const BeingTypeId subtype) : Being(id, ActorType::Player, subtype, nullptr), |