summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-10 20:59:34 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-10 20:59:34 +0000
commitbb9810d704a2f81da41e99cd9a1b03593dbe3a1c (patch)
tree237a6a184397994f4f4d93db63100d4b4f1bbe18 /src/being.cpp
parent4b376c30487ba98ede708c5e219f4bc9d6a72951 (diff)
downloadmana-client-bb9810d704a2f81da41e99cd9a1b03593dbe3a1c.tar.gz
mana-client-bb9810d704a2f81da41e99cd9a1b03593dbe3a1c.tar.bz2
mana-client-bb9810d704a2f81da41e99cd9a1b03593dbe3a1c.tar.xz
mana-client-bb9810d704a2f81da41e99cd9a1b03593dbe3a1c.zip
Adding player names and fixing emoticon position
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index ed2a62f5..51728f80 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -24,6 +24,7 @@
#include "being.h"
#include "game.h"
#include "net/protocol.h"
+#include "net/network.h"
Being *player_node = NULL;
@@ -36,6 +37,13 @@ PATH_NODE::PATH_NODE(unsigned short x, unsigned short y):
void add_node(Being *being) {
beings.push_back(being);
+ // If the being is a player, request the name
+ //if (being-> job < 10) {
+ WFIFOW(0) = net_w_value(0x0094);
+ WFIFOL(2) = net_l_value(RFIFOL(2));
+ WFIFOSET(6);
+ // }
+
}
void remove_node(unsigned int id) {
@@ -166,6 +174,11 @@ void Being::setDamage(const std::string &text, int time)
damage_y = 0;
}
+void Being::setName(char *text)
+{
+ strcpy(name, text);
+}
+
void Being::nextStep()
{
if (!path.empty())