diff options
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp index 687cd5a3..1f8cbd40 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -63,6 +63,18 @@ unsigned int find_npc(unsigned short x, unsigned short y) { return 0; } +unsigned int find_pc(unsigned short x, unsigned short y) { + std::list<Being *>::iterator i; + for (i = beings.begin(); i != beings.end(); i++) { + Being *being = (*i); + // Check if is a player + if (being->job < 10 && being->x == x && being->y == y) { + return being->id; + } + } + return 0; +} + unsigned int find_monster(unsigned short x, unsigned short y) { std::list<Being*>::iterator i; for (i = beings.begin(); i != beings.end(); i++) { |