diff options
author | Jan-Fabian Humann <malastare@gmx.net> | 2005-04-06 14:46:50 +0000 |
---|---|---|
committer | Jan-Fabian Humann <malastare@gmx.net> | 2005-04-06 14:46:50 +0000 |
commit | ccf84aa701dc938e7e390339c8ca5c2c7e5a21c5 (patch) | |
tree | 53c4f5ff30a981f0f946ab66f4b3c90dc730dd28 /src/being.cpp | |
parent | c74357ef532d9c90ec1605048b9602da78e7928c (diff) | |
download | mana-ccf84aa701dc938e7e390339c8ca5c2c7e5a21c5.tar.gz mana-ccf84aa701dc938e7e390339c8ca5c2c7e5a21c5.tar.bz2 mana-ccf84aa701dc938e7e390339c8ca5c2c7e5a21c5.tar.xz mana-ccf84aa701dc938e7e390339c8ca5c2c7e5a21c5.zip |
update for trade: now on right click
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++) { |