summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-14 21:24:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-25 01:43:47 +0300
commit731412b4494cc48c75fbef42d1beefd70589bfa5 (patch)
treeeef6f92e1b0271d7c89781e41a3490596a5e76dd
parentff04f6ba4d732c16cc058a73d5e7a775da6b74d5 (diff)
downloadhercules-731412b4494cc48c75fbef42d1beefd70589bfa5.tar.gz
hercules-731412b4494cc48c75fbef42d1beefd70589bfa5.tar.bz2
hercules-731412b4494cc48c75fbef42d1beefd70589bfa5.tar.xz
hercules-731412b4494cc48c75fbef42d1beefd70589bfa5.zip
Fix style in function clif_guild_basicinfo.
-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).