diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-25 03:56:27 +0100 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-25 03:56:27 +0100 |
commit | 17d2756975a8ff22ecba92c055fa7a7f77d425c6 (patch) | |
tree | 76aaa104da3ee97b07aec7f2d972f8b8d6239d9a /src/monster.cpp | |
parent | 7e928fc6559e89b64f49aea30d796dbfe75c4912 (diff) | |
parent | 61040888a373b03cc599750c33186848cae37ef4 (diff) | |
download | mana-client-17d2756975a8ff22ecba92c055fa7a7f77d425c6.tar.gz mana-client-17d2756975a8ff22ecba92c055fa7a7f77d425c6.tar.bz2 mana-client-17d2756975a8ff22ecba92c055fa7a7f77d425c6.tar.xz mana-client-17d2756975a8ff22ecba92c055fa7a7f77d425c6.zip |
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/monster.cpp')
-rw-r--r-- | src/monster.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/monster.cpp b/src/monster.cpp index 65049c9e..f50855ca 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -28,8 +28,6 @@ #include "text.h" #include "localplayer.h" -#include "gui/gui.h" - #include "resources/monsterdb.h" #include "utils/tostring.h" @@ -81,8 +79,7 @@ Monster::~Monster() } } -void -Monster::logic() +void Monster::logic() { if (mAction != STAND) { @@ -97,14 +94,12 @@ Monster::logic() Being::logic(); } -Being::Type -Monster::getType() const +Being::Type Monster::getType() const { return MONSTER; } -void -Monster::setAction(Uint8 action) +void Monster::setAction(Uint8 action) { SpriteAction currentAction = ACTION_INVALID; @@ -142,8 +137,7 @@ Monster::setAction(Uint8 action) } } -void -Monster::handleAttack(Being *victim, int damage) +void Monster::handleAttack(Being *victim, int damage) { Being::handleAttack(victim, damage); @@ -152,21 +146,18 @@ Monster::handleAttack(Being *victim, int damage) MONSTER_EVENT_HIT : MONSTER_EVENT_MISS)); } -void -Monster::takeDamage(int amount) +void Monster::takeDamage(int amount) { if (amount > 0) sound.playSfx(getInfo().getSound(MONSTER_EVENT_HURT)); Being::takeDamage(amount); } -Being::TargetCursorSize -Monster::getTargetCursorSize() const +Being::TargetCursorSize Monster::getTargetCursorSize() const { return getInfo().getTargetCursorSize(); } -const MonsterInfo& -Monster::getInfo() const +const MonsterInfo &Monster::getInfo() const { return MonsterDB::get(mJob - 1002); } @@ -179,7 +170,7 @@ void Monster::showName(bool show) mText = new Text(getInfo().getName(), mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET - getHeight(), gcn::Graphics::CENTER, - speechFont, gcn::Color(255, 32, 32)); + gcn::Color(255, 64, 64)); } else { |