summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorJan-Fabian Humann <malastare@gmx.net>2005-04-06 14:46:50 +0000
committerJan-Fabian Humann <malastare@gmx.net>2005-04-06 14:46:50 +0000
commitccf84aa701dc938e7e390339c8ca5c2c7e5a21c5 (patch)
tree53c4f5ff30a981f0f946ab66f4b3c90dc730dd28 /src/being.cpp
parentc74357ef532d9c90ec1605048b9602da78e7928c (diff)
downloadmana-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.cpp12
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++) {