Browse Source

* Added missing fields to guild belong info packet 0x16c (ZC_UPDATE_GDID).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14925 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 years ago
parent
commit
367ab9727d
3 changed files with 14 additions and 9 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 11 8
      src/map/clif.c
  3. 1 1
      src/map/clif.h

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 Date	Added
 
 
+2011/08/06
+	* Added missing fields to guild belong info packet 0x16c (ZC_UPDATE_GDID). [Ai4rei]
 2011/07/31
 2011/07/31
 	* Fixed quest saving checking only the first 3 objectives for changes regardless of MAX_QUEST_OBJECTIVES (follow up to r14800, since r13973). [Ai4rei]
 	* Fixed quest saving checking only the first 3 objectives for changes regardless of MAX_QUEST_OBJECTIVES (follow up to r14800, since r13973). [Ai4rei]
 2011/07/22
 2011/07/22

+ 11 - 8
src/map/clif.c

@@ -6571,27 +6571,30 @@ int clif_guild_created(struct map_session_data *sd,int flag)
 	WFIFOSET(fd,packet_len(0x167));
 	WFIFOSET(fd,packet_len(0x167));
 	return 0;
 	return 0;
 }
 }
-/*==========================================
- * ギルド所属通知
- *------------------------------------------*/
-int clif_guild_belonginfo(struct map_session_data *sd, struct guild *g)
+
+
+/// Notifies the client that it is belonging to a guild (ZC_UPDATE_GDID)
+/// 016c <guild id>.L <emblem id>.L <mode>.L <ismaster>.B <inter sid>.L <guild name>.24B
+void clif_guild_belonginfo(struct map_session_data *sd, struct guild *g)
 {
 {
 	int ps,fd;
 	int ps,fd;
-	nullpo_ret(sd);
-	nullpo_ret(g);
+	nullpo_retv(sd);
+	nullpo_retv(g);
 
 
 	fd=sd->fd;
 	fd=sd->fd;
 	ps=guild_getposition(g,sd);
 	ps=guild_getposition(g,sd);
 	WFIFOHEAD(fd,packet_len(0x16c));
 	WFIFOHEAD(fd,packet_len(0x16c));
-	memset(WFIFOP(fd,0),0,packet_len(0x16c));
 	WFIFOW(fd,0)=0x16c;
 	WFIFOW(fd,0)=0x16c;
 	WFIFOL(fd,2)=g->guild_id;
 	WFIFOL(fd,2)=g->guild_id;
 	WFIFOL(fd,6)=g->emblem_id;
 	WFIFOL(fd,6)=g->emblem_id;
 	WFIFOL(fd,10)=g->position[ps].mode;
 	WFIFOL(fd,10)=g->position[ps].mode;
+	WFIFOB(fd,14)=(bool)(sd->state.gmaster_flag==g);
+	WFIFOL(fd,15)=0;  // InterSID (unknown purpose)
 	memcpy(WFIFOP(fd,19),g->name,NAME_LENGTH);
 	memcpy(WFIFOP(fd,19),g->name,NAME_LENGTH);
 	WFIFOSET(fd,packet_len(0x16c));
 	WFIFOSET(fd,packet_len(0x16c));
-	return 0;
 }
 }
+
+
 /*==========================================
 /*==========================================
  * ギルドメンバログイン通知
  * ギルドメンバログイン通知
  *------------------------------------------*/
  *------------------------------------------*/

+ 1 - 1
src/map/clif.h

@@ -419,7 +419,7 @@ int clif_hpmeter_sub(struct block_list *bl, va_list ap);
 
 
 // guild
 // guild
 int clif_guild_created(struct map_session_data *sd,int flag);
 int clif_guild_created(struct map_session_data *sd,int flag);
-int clif_guild_belonginfo(struct map_session_data *sd,struct guild *g);
+void clif_guild_belonginfo(struct map_session_data *sd,struct guild *g);
 int clif_guild_masterormember(struct map_session_data *sd);
 int clif_guild_masterormember(struct map_session_data *sd);
 int clif_guild_basicinfo(struct map_session_data *sd);
 int clif_guild_basicinfo(struct map_session_data *sd);
 int clif_guild_allianceinfo(struct map_session_data *sd);
 int clif_guild_allianceinfo(struct map_session_data *sd);