summaryrefslogtreecommitdiff
path: root/src/npc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/npc.cpp')
-rw-r--r--src/npc.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index 5132e0dc..7ba25c08 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -32,10 +32,8 @@
#include "resources/npcdb.h"
-extern NpcTextDialog *npcTextDialog;
-
-int current_npc = 0;
bool NPC::isTalking = false;
+int current_npc = 0;
static const int NAME_X_OFFSET = 15;
static const int NAME_Y_OFFSET = 30;
@@ -51,7 +49,8 @@ NPC::NPC(Uint32 id, Uint16 job, Map *map, Network *network):
i != info.sprites.end();
i++)
{
- if (c == VECTOREND_SPRITE) break;
+ if (c == VECTOREND_SPRITE)
+ break;
std::string file = "graphics/sprites/" + (*i)->sprite;
int variant = (*i)->variant;
@@ -108,7 +107,7 @@ Being::Type NPC::getType() const
void NPC::talk()
{
- if (isTalking || !this || !mNetwork) return;
+ if (isTalking || !mNetwork) return;
isTalking = true;
MessageOut outMsg(mNetwork);
@@ -120,7 +119,5 @@ void NPC::talk()
void NPC::updateCoords()
{
if (mName)
- {
mName->adviseXY(mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET);
- }
}