summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-16 16:06:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-16 16:06:17 +0300
commit1b28203031aec74f7a11a46fb5267f642ae5fab2 (patch)
treeef907d1a54132db7704e10a633925182edbe2fb5
parent0977134ffdad9ea0e79106fc633ebafd18209765 (diff)
downloadplus-1b28203031aec74f7a11a46fb5267f642ae5fab2.tar.gz
plus-1b28203031aec74f7a11a46fb5267f642ae5fab2.tar.bz2
plus-1b28203031aec74f7a11a46fb5267f642ae5fab2.tar.xz
plus-1b28203031aec74f7a11a46fb5267f642ae5fab2.zip
Fix code style.
-rw-r--r--src/being/being.cpp23
-rw-r--r--src/being/localplayer.cpp1
-rw-r--r--src/effectmanager.cpp3
-rw-r--r--src/enums/being/actortype.h2
-rw-r--r--src/gui/popups/popupmenu.cpp3
-rw-r--r--src/gui/viewport.cpp1
-rw-r--r--src/gui/widgets/skilllistbox.h1
-rw-r--r--src/gui/widgets/statuswindowattrs.h1
-rw-r--r--src/gui/windows/charselectdialog.cpp1
-rw-r--r--src/gui/windows/ministatuswindow.cpp4
-rw-r--r--src/gui/windows/skilldialog.cpp1
-rw-r--r--src/gui/windows/statuswindow.cpp1
-rw-r--r--src/listeners/textskilllistener.h2
-rw-r--r--src/net/eathena/playerhandler.cpp1
-rw-r--r--src/net/tmwa/playerhandler.cpp1
-rw-r--r--src/resources/db/npcdialogdb.h2
-rw-r--r--src/resources/db/skillunitdb.cpp3
-rw-r--r--src/shopitem.cpp3
18 files changed, 40 insertions, 14 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 31b0ddcc9..bca500fe8 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -270,8 +270,12 @@ Being::Being(const BeingId id,
mGotComment = true;
}
+#ifdef EATHENA_SUPPORT
if (mType == ActorType::Portal ||
mType == ActorType::SkillUnit)
+#else
+ if (mType == ActorType::Portal)
+#endif
{
mShowName = false;
}
@@ -1486,9 +1490,14 @@ void Being::setAction(const BeingActionT &action, const int attackId)
this,
false,
mX, mY);
+#ifdef EATHENA_SUPPORT
if (mType == ActorType::Monster ||
mType == ActorType::Npc ||
mType == ActorType::SkillUnit)
+#else
+ if (mType == ActorType::Monster ||
+ mType == ActorType::Npc)
+#endif
{
mYDiff = mInfo->getDeadSortOffsetY();
}
@@ -1723,6 +1732,7 @@ void Being::logic()
case BeingAction::DEAD:
case BeingAction::HURT:
case BeingAction::SPAWN:
+ case BeingAction::CAST:
default:
break;
@@ -1944,6 +1954,7 @@ void Being::petLogic()
case BeingAction::MOVE:
case BeingAction::HURT:
case BeingAction::SPAWN:
+ case BeingAction::CAST:
case BeingAction::PRESTAND:
default:
directionType = mInfo->getDirectionType();
@@ -2299,6 +2310,7 @@ void Being::updateColors()
setDefaultNameColor(UserColorId::NPC);
mTextColor = &userPalette->getColor(UserColorId::NPC);
}
+#ifdef EATHENA_SUPPORT
else if (mType == ActorType::Pet)
{
setDefaultNameColor(UserColorId::PET);
@@ -2314,6 +2326,14 @@ void Being::updateColors()
setDefaultNameColor(UserColorId::SKILLUNIT);
mTextColor = &userPalette->getColor(UserColorId::SKILLUNIT);
}
+#endif
+#ifdef TMWA_SUPPORT
+ else if (mType == ActorType::LocalPet)
+ {
+ setDefaultNameColor(UserColorId::PET);
+ mTextColor = &userPalette->getColor(UserColorId::PET);
+ }
+#endif
else if (this == localPlayer)
{
mNameColor = &userPalette->getColor(UserColorId::SELF);
@@ -3432,6 +3452,7 @@ std::string Being::loadComment(const std::string &name,
case ActorType::Mercenary:
case ActorType::Homunculus:
case ActorType::Pet:
+ case ActorType::SkillUnit:
#endif
default:
return "";
@@ -3471,6 +3492,7 @@ void Being::saveComment(const std::string &restrict name,
case ActorType::Pet:
case ActorType::Mercenary:
case ActorType::Homunculus:
+ case ActorType::SkillUnit:
#endif
default:
return;
@@ -3792,6 +3814,7 @@ void Being::fixPetSpawnPos(int &dstX, int &dstY) const
case BeingAction::HURT:
case BeingAction::STAND:
case BeingAction::PRESTAND:
+ case BeingAction::CAST:
default:
offsetX1 = mInfo->getTargetOffsetX();
offsetY1 = mInfo->getTargetOffsetY();
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 5153a57ed..d20c7b7e0 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -719,6 +719,7 @@ bool LocalPlayer::toggleSit() const
case BeingAction::ATTACK:
case BeingAction::DEAD:
case BeingAction::HURT:
+ case BeingAction::CAST:
default:
return true;
}
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp
index 3a76f3e6d..dafe977d7 100644
--- a/src/effectmanager.cpp
+++ b/src/effectmanager.cpp
@@ -190,7 +190,8 @@ bool EffectManager::trigger(const int id,
rValue = true;
if (!effect.gfx.empty())
{
- Particle *const particle = particleEngine->addEffect(effect.gfx,
+ Particle *const particle = particleEngine->addEffect(
+ effect.gfx,
x, y,
rotation);
if (particle)
diff --git a/src/enums/being/actortype.h b/src/enums/being/actortype.h
index 1062df256..2ec7bb4bc 100644
--- a/src/enums/being/actortype.h
+++ b/src/enums/being/actortype.h
@@ -38,7 +38,7 @@ enumStart(ActorType)
Pet,
Mercenary,
Homunculus,
- SkillUnit,
+ SkillUnit
#else
Avatar
#endif
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index d183dcdca..2cb0cc221 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -366,6 +366,9 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
mBrowserBox->addRow("##3---");
}
break;
+ case ActorType::SkillUnit:
+ // +++ need impliment menu
+ break;
#endif
case ActorType::Avatar:
case ActorType::Unknown:
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 69a7dd1e8..630696e72 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -891,6 +891,7 @@ void Viewport::mouseMoved(MouseEvent &event)
case ActorType::Pet:
case ActorType::Mercenary:
case ActorType::Homunculus:
+ case ActorType::SkillUnit:
#endif
gui->setCursorType(mHoverBeing->getHoverCursor());
break;
diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h
index 94485f5cf..74057ff32 100644
--- a/src/gui/widgets/skilllistbox.h
+++ b/src/gui/widgets/skilllistbox.h
@@ -28,7 +28,6 @@
#include "gui/skin.h"
#include "gui/viewport.h"
-#include "gui/widgets/createwidget.h"
#include "gui/widgets/listbox.h"
#include "gui/fonts/font.h"
diff --git a/src/gui/widgets/statuswindowattrs.h b/src/gui/widgets/statuswindowattrs.h
index 7359a1a86..e4406d67a 100644
--- a/src/gui/widgets/statuswindowattrs.h
+++ b/src/gui/widgets/statuswindowattrs.h
@@ -119,7 +119,6 @@ class ChangeDisplay final : public AttrDisplay,
int mNeeded;
Label *mPoints;
- Button *mDec;
Button *mInc;
};
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 65d7d19f6..ca15caf97 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -48,7 +48,6 @@
#include "net/character.h"
#include "net/charserverhandler.h"
#include "net/logindata.h"
-#include "net/loginhandler.h"
#include "net/serverfeatures.h"
#include "debug.h"
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 09754420f..37e6bccc9 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -42,7 +42,6 @@
#include "gui/widgets/progressbar.h"
#include "net/playerhandler.h"
-#include "net/gamehandler.h"
#include "utils/delete2.h"
#include "utils/dtor.h"
@@ -79,7 +78,8 @@ MiniStatusWindow::MiniStatusWindow() :
? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml",
// TRANSLATORS: status bar name
"mp bar", _("mana bar"))),
- mXpBar(createBar(0, 100, 0, ThemeColorId::XP_BAR, ProgressColorId::PROG_EXP,
+ mXpBar(createBar(0, 100, 0,
+ ThemeColorId::XP_BAR, ProgressColorId::PROG_EXP,
"xpprogressbar.xml", "xpprogressbar_fill.xml",
// TRANSLATORS: status bar name
"xp bar", _("experience bar"))),
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 7a46cf313..36b72d051 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -34,6 +34,7 @@
#include "gui/windows/shortcutwindow.h"
#include "gui/widgets/button.h"
+#include "gui/widgets/createwidget.h"
#include "gui/widgets/label.h"
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/tabbedarea.h"
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 7a2a2c206..6ac5b34dc 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -46,7 +46,6 @@
#include "gui/widgets/vertcontainer.h"
#include "gui/widgets/windowcontainer.h"
-#include "net/gamehandler.h"
#include "net/inventoryhandler.h"
#include "net/playerhandler.h"
diff --git a/src/listeners/textskilllistener.h b/src/listeners/textskilllistener.h
index 23bff2582..ae3abf6a2 100644
--- a/src/listeners/textskilllistener.h
+++ b/src/listeners/textskilllistener.h
@@ -27,8 +27,6 @@
class TextDialog;
-struct SkillInfo;
-
class TextSkillListener final : public ActionListener
{
public:
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 59184c415..8612615cf 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -131,6 +131,7 @@ void PlayerHandler::changeAction(const BeingActionT &action) const
case BeingAction::DEAD:
case BeingAction::HURT:
case BeingAction::SPAWN:
+ case BeingAction::CAST:
return;
}
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index d4adfec57..4f5d7a468 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -131,6 +131,7 @@ void PlayerHandler::changeAction(const BeingActionT &action) const
case BeingAction::DEAD:
case BeingAction::HURT:
case BeingAction::SPAWN:
+ case BeingAction::CAST:
return;
}
diff --git a/src/resources/db/npcdialogdb.h b/src/resources/db/npcdialogdb.h
index 42de958e8..f0c190021 100644
--- a/src/resources/db/npcdialogdb.h
+++ b/src/resources/db/npcdialogdb.h
@@ -26,8 +26,6 @@
#include "localconsts.h"
-class Widget;
-
struct NpcDialogInfo;
/**
diff --git a/src/resources/db/skillunitdb.cpp b/src/resources/db/skillunitdb.cpp
index c2131eca4..a92748f45 100644
--- a/src/resources/db/skillunitdb.cpp
+++ b/src/resources/db/skillunitdb.cpp
@@ -69,7 +69,8 @@ void SkillUnitDb::loadXmlFile(const std::string &fileName)
{
if (xmlNameEqual(skillUnitNode, "include"))
{
- const std::string name = XML::getProperty(skillUnitNode, "name", "");
+ const std::string name = XML::getProperty(skillUnitNode,
+ "name", "");
if (!name.empty())
loadXmlFile(name);
continue;
diff --git a/src/shopitem.cpp b/src/shopitem.cpp
index db60e35f8..e31179772 100644
--- a/src/shopitem.cpp
+++ b/src/shopitem.cpp
@@ -72,7 +72,8 @@ ShopItem::ShopItem(const int id,
mPrice(price),
mUsedQuantity(0),
mShowQuantity(false),
- mVisible(true)
+ mVisible(true),
+ mDisabled(false)
{
updateDisplayName(0);
setInvIndex(-1);