From aba239393ecd298e8ffd16e0b6a5d86837c594ae Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 5 Jun 2005 08:06:34 +0000 Subject: - Fixes for short sword - New NPC - Fix for npc ids --- src/being.cpp | 3 +-- src/engine.cpp | 2 +- src/game.cpp | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/being.cpp b/src/being.cpp index e6435487..80de74e1 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -87,8 +87,7 @@ unsigned int findNpc(unsigned short x, unsigned short y) for (i = beings.begin(); i != beings.end(); i++) { Being *being = (*i); // Check if is a NPC (only low job ids) - if (being->job >= 46 && being->job <= 125 && - being->x == x && being->y == y) + if (being->isNpc() && being->x == x && being->y == y) { return being->id; } diff --git a/src/engine.cpp b/src/engine.cpp index 60b547a6..3430a230 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -351,7 +351,7 @@ void Engine::draw() guiGraphics->drawRectangle(gcn::Rectangle(sx * 32, sy * 32, 32, 32)); #endif - if ((being->job >= 100) && (being->job < 110)) { // Draw a NPC + if (being->isNpc()) { // Draw a NPC npcset->spriteset[being->job - 100]->draw(screen, sx * 32 - 8 - offset_x, sy * 32 - 52 - offset_y); diff --git a/src/game.cpp b/src/game.cpp index 206da15e..07c98f7c 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1410,6 +1410,7 @@ void do_parse() switch (inventoryWindow->items->getId(RFIFOW(2))) { case 521: case 522: + case 536: case 1201: player_node->weapon = 1; break; @@ -1448,6 +1449,7 @@ void do_parse() case 521: case 522: case 530: + case 536: case 1200: case 1201: player_node->weapon = 0; -- cgit v1.2.3-70-g09d2