diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2006-11-29 21:17:16 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2006-11-29 21:17:16 +0000 |
commit | 25df9c6c3b735fea87ded284665e866c39144705 (patch) | |
tree | c265eaa0560eb40b1a334b91c24fff7b9962b3d1 /src/engine.cpp | |
parent | 34baa9637d2319f52b4e1b1f3294994557151113 (diff) | |
download | mana-client-25df9c6c3b735fea87ded284665e866c39144705.tar.gz mana-client-25df9c6c3b735fea87ded284665e866c39144705.tar.bz2 mana-client-25df9c6c3b735fea87ded284665e866c39144705.tar.xz mana-client-25df9c6c3b735fea87ded284665e866c39144705.zip |
Implemented MonsterDB namespace
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index d0d37c67..a6177b30 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -46,6 +46,7 @@ #include "resources/mapreader.h" +#include "resources/monsterdb.h" #include "resources/resourcemanager.h" #include "resources/spriteset.h" @@ -281,10 +282,18 @@ void Engine::draw(Graphics *graphics) if ((target = player_node->getTarget())) { graphics->setFont(speechFont); - graphics->setColor(gcn::Color(255, 255, 255)); - int dy = (target->getType() == Being::PLAYER) ? 90 : 52; + graphics->setColor(gcn::Color(255, 32, 32)); + int dy = (target->getType() == Being::PLAYER) ? 80 : 42; - graphics->drawText("[TARGET]", target->getPixelX() - (int)view_x + 15, + std::string mobName = ""; + + if (target->mJob >= 1002 ) + { + int mobId = target->mJob - 1002; + mobName = MonsterDB::get(mobId).getName(); + } + + graphics->drawText(mobName, target->getPixelX() - (int)view_x + 15, target->getPixelY() - (int)view_y - dy, gcn::Graphics::CENTER); } |