summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ca2a80693..45c80e48b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7447,36 +7447,37 @@ void clif_guild_masterormember(struct map_session_data *sd)
/// Guild basic information (Territories [Valaris])
/// 0150 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B (ZC_GUILD_INFO)
/// 01b6 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B <zeny>.L (ZC_GUILD_INFO2)
-void clif_guild_basicinfo(struct map_session_data *sd) {
+void clif_guild_basicinfo(struct map_session_data *sd)
+{
int fd;
struct guild *g;
nullpo_retv(sd);
fd = sd->fd;
- if( (g = sd->guild) == NULL )
- return;
-
- WFIFOHEAD(fd,packet_len(0x1b6));
- WFIFOW(fd, 0)=0x1b6;//0x150;
- WFIFOL(fd, 2)=g->guild_id;
- WFIFOL(fd, 6)=g->guild_lv;
- WFIFOL(fd,10)=g->connect_member;
- WFIFOL(fd,14)=g->max_member;
- WFIFOL(fd,18)=g->average_lv;
- WFIFOL(fd,22)=(uint32)cap_value(g->exp,0,INT32_MAX);
- WFIFOL(fd,26)=g->next_exp;
- WFIFOL(fd,30)=0; // Tax Points
- WFIFOL(fd,34)=0; // Honor: (left) Vulgar [-100,100] Famed (right)
- WFIFOL(fd,38)=0; // Virtue: (down) Wicked [-100,100] Righteous (up)
- WFIFOL(fd,42)=g->emblem_id;
- memcpy(WFIFOP(fd,46),g->name, NAME_LENGTH);
- memcpy(WFIFOP(fd,70),g->master, NAME_LENGTH);
-
- safestrncpy(WFIFOP(fd,94),msg_sd(sd,300+guild->checkcastles(g)),16); // "'N' castles"
- WFIFOL(fd,110) = 0; // zeny
-
- WFIFOSET(fd,packet_len(0x1b6));
+ if ((g = sd->guild) == NULL)
+ return;
+
+ WFIFOHEAD(fd, packet_len(0x1b6));
+ WFIFOW(fd, 0) = 0x1b6; //0x150;
+ WFIFOL(fd, 2) = g->guild_id;
+ WFIFOL(fd, 6) = g->guild_lv;
+ WFIFOL(fd, 10) = g->connect_member;
+ WFIFOL(fd, 14) = g->max_member;
+ WFIFOL(fd, 18) = g->average_lv;
+ WFIFOL(fd, 22) = (uint32)cap_value(g->exp, 0, INT32_MAX);
+ WFIFOL(fd, 26) = g->next_exp;
+ WFIFOL(fd, 30) = 0; // Tax Points
+ WFIFOL(fd, 34) = 0; // Honor: (left) Vulgar [-100,100] Famed (right)
+ WFIFOL(fd, 38) = 0; // Virtue: (down) Wicked [-100,100] Righteous (up)
+ WFIFOL(fd, 42) = g->emblem_id;
+ memcpy(WFIFOP(fd, 46), g->name, NAME_LENGTH);
+ memcpy(WFIFOP(fd, 70), g->master, NAME_LENGTH);
+
+ safestrncpy(WFIFOP(fd, 94), msg_sd(sd, 300 + guild->checkcastles(g)), 16); // "'N' castles"
+ WFIFOL(fd, 110) = 0; // zeny
+
+ WFIFOSET(fd, packet_len(0x1b6));
}
/// Guild alliance and opposition list (ZC_MYGUILD_BASIC_INFO).