summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-08 15:54:52 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-08 15:54:52 +0000
commit7410adee2a636b1fab6adcd5a581048146d2a9a5 (patch)
tree07b55588a54f6e684ff187fbf2e9641ba032d9ca /src/map/clif.c
parent87ac3c6f8367ba972124231ff1306ed890abc6b8 (diff)
downloadhercules-7410adee2a636b1fab6adcd5a581048146d2a9a5.tar.gz
hercules-7410adee2a636b1fab6adcd5a581048146d2a9a5.tar.bz2
hercules-7410adee2a636b1fab6adcd5a581048146d2a9a5.tar.xz
hercules-7410adee2a636b1fab6adcd5a581048146d2a9a5.zip
Small party/guild creation cleanup. Added packet comments. Removed fake reply packet usage.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12538 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 12c43972f..a5b66d56e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5980,7 +5980,12 @@ int clif_mvp_exp(struct map_session_data *sd, unsigned int exp)
}
/*==========================================
- * ギルド作成可否通知
+ * Guild creation result
+ * R 0167 <flag>.B
+ * flag = 0 -> "Guild has been created."
+ * flag = 1 -> "You are already in a Guild."
+ * flag = 2 -> "That Guild Name already exists."
+ * flag = 3 -> "You need the neccessary item to create a Guild."
*------------------------------------------*/
int clif_guild_created(struct map_session_data *sd,int flag)
{
@@ -9696,7 +9701,10 @@ void clif_parse_StoragePassword(int fd, struct map_session_data *sd)
*------------------------------------------*/
void clif_parse_CreateParty(int fd, struct map_session_data *sd)
{
- if(map[sd->bl.m].flag.partylock)
+ char* name = (char*)RFIFOP(fd,2);
+ name[NAME_LENGTH-1] = '\0';
+
+ if( map[sd->bl.m].flag.partylock )
{// Party locked.
clif_displaymessage(fd, msg_txt(227));
return;
@@ -9707,15 +9715,17 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd)
return;
}
- party_create(sd,(char*)RFIFOP(fd,2),0,0);
+ party_create(sd,name,0,0);
}
-/*==========================================
- * パーティを作る
- *------------------------------------------*/
void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
{
- if(map[sd->bl.m].flag.partylock)
+ char* name = (char*)RFIFOP(fd,2);
+ int item1 = RFIFOB(fd,26);
+ int item2 = RFIFOB(fd,27);
+ name[NAME_LENGTH-1] = '\0';
+
+ if( map[sd->bl.m].flag.partylock )
{// Party locked.
clif_displaymessage(fd, msg_txt(227));
return;
@@ -9726,7 +9736,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
return;
}
- party_create(sd,(char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27));
+ party_create(sd,name,item1,item2);
}
/*==========================================
@@ -9951,16 +9961,21 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd)
}
/*==========================================
- * ギルドを作る
+ * Guild creation request
+ * S 0165 <account id>.L <guild name>.24S
*------------------------------------------*/
void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
{
+ char* name = (char*)RFIFOP(fd,6);
+ name[NAME_LENGTH-1] = '\0';
+
if(map[sd->bl.m].flag.guildlock)
{ //Guild locked.
clif_displaymessage(fd, msg_txt(228));
return;
}
- guild_create(sd, (char*)RFIFOP(fd,6));
+
+ guild_create(sd, name);
}
/*==========================================