summaryrefslogtreecommitdiff
path: root/src/npc.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-05 22:15:16 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-05 22:15:16 -0600
commit61f7c4269472c806e63b1061cd4e4b8c831c3b59 (patch)
tree052606a21908545b494b5c36e3edc93ce10eaef1 /src/npc.cpp
parent99dbfa9e84ea30993d44d2a39bd5d06ae553c849 (diff)
downloadmana-client-61f7c4269472c806e63b1061cd4e4b8c831c3b59.tar.gz
mana-client-61f7c4269472c806e63b1061cd4e4b8c831c3b59.tar.bz2
mana-client-61f7c4269472c806e63b1061cd4e4b8c831c3b59.tar.xz
mana-client-61f7c4269472c806e63b1061cd4e4b8c831c3b59.zip
Remove extra check on player target
~Being does this too, so let's leave it there.
Diffstat (limited to 'src/npc.cpp')
-rw-r--r--src/npc.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index a49ef406..89b92ffe 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -52,6 +52,10 @@ NPC::NPC(int id, int job, Map *map):
std::string file = "graphics/sprites/" + (*i)->sprite;
int variant = (*i)->variant;
mSprites[c] = AnimatedSprite::load(file, variant);
+ if (mSprites[c])
+ printf("Placed sprite '%s'(%d) at %d\n", file.c_str(), variant, c);
+ else
+ printf("Placed nonsprite '%s'(%d) at %d\n", file.c_str(), variant, c);
c++;
}
@@ -69,6 +73,14 @@ NPC::NPC(int id, int job, Map *map):
mName = 0;
mNameColor = &guiPalette->getColor(Palette::NPC);
+
+ for (int i = 0; i < VECTOREND_SPRITE; i++)
+ {
+ if (mSprites[i])
+ printf("Has sprite %d\n", i);
+ else
+ printf("Has not sprite %d\n", i);
+ }
}
NPC::~NPC()
@@ -112,6 +124,8 @@ void NPC::talk()
isTalking = true;
+ checkSprites();
+
Net::getNpcHandler()->talk(mId);
}
@@ -122,3 +136,14 @@ void NPC::updateCoords()
mName->adviseXY(getPixelX(), getPixelY());
}
}
+
+void NPC::checkSprites()
+{
+ for (int i = 0; i < VECTOREND_SPRITE; i++)
+ {
+ if (mSprites[i])
+ printf("Has sprite %d\n", i);
+ else
+ printf("Has not sprite %d\n", i);
+ }
+}