summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-09-19 03:10:30 +0300
committerAndrei Karas <akaras@inbox.ru>2019-09-19 03:10:30 +0300
commit523f76a74a48374416065ca02520554eac4ba198 (patch)
tree02fdb32184ca9a82efc748e38a56c8bf4b4104c7
parent008706f9bd90c207f3df46bc920f5295c89124a1 (diff)
downloadhercules-523f76a74a48374416065ca02520554eac4ba198.tar.gz
hercules-523f76a74a48374416065ca02520554eac4ba198.tar.bz2
hercules-523f76a74a48374416065ca02520554eac4ba198.tar.xz
hercules-523f76a74a48374416065ca02520554eac4ba198.zip
Send clan name in name packet in position name field
-rw-r--r--src/map/clif.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 02eafe04b..8908369f2 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9298,9 +9298,6 @@ static void clif_pcname_ack(int fd, struct block_list *bl)
packet.gid = bl->id;
const struct map_session_data *ssd = BL_UCCAST(BL_PC, bl);
- const struct party_data *p = NULL;
- const struct guild *g = NULL;
- int ps = -1;
if (ssd->fakename[0] != '\0' && ssd->disguise != -1) {
packet.packet_id = reqName;
@@ -9326,9 +9323,12 @@ static void clif_pcname_ack(int fd, struct block_list *bl)
#endif
memcpy(packet.name, ssd->status.name, NAME_LENGTH);
+ const struct party_data *p = NULL;
+ int ps = -1;
if (ssd->status.party_id != 0) {
p = party->search(ssd->status.party_id);
}
+ const struct guild *g = NULL;
if (ssd->status.guild_id != 0) {
if ((g = ssd->guild) != NULL) {
int i;
@@ -9351,6 +9351,12 @@ static void clif_pcname_ack(int fd, struct block_list *bl)
memcpy(packet.guild_name, g->name,NAME_LENGTH);
memcpy(packet.position_name, g->position[ps].name, NAME_LENGTH);
}
+ else if (ssd->status.clan_id != 0) {
+ struct clan *c = clan->search(ssd->status.clan_id);
+ if (c != 0) {
+ memcpy(packet.position_name, c->name, NAME_LENGTH);
+ }
+ }
}
clif->send_selforarea(fd, bl, &packet, len);