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.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 32340f9..205c222 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8647,7 +8647,19 @@ void clif_parse_GuildReqeustInfo (int fd, struct map_session_data *sd)
*/
void clif_parse_GuildChangePositionInfo (int fd, struct map_session_data *sd)
{
- int i;
+ struct guild *g;
+ int i, ps;
+
+ nullpo_retv (sd);
+
+ g = guild_search (sd->status.guild_id);
+
+ if (g == NULL)
+ return;
+
+ if ((ps = guild_getposition (sd, g)) < 0
+ || (!(g->position[ps].mode & 0x0010) && strcmp (g->master, sd->status.name)))
+ return;
for (i = 4; i < RFIFOW (fd, 2); i += 40)
{
@@ -8663,10 +8675,20 @@ void clif_parse_GuildChangePositionInfo (int fd, struct map_session_data *sd)
void clif_parse_GuildChangeMemberPosition (int fd,
struct map_session_data *sd)
{
- int i;
+ struct guild *g;
+ int i, ps;
nullpo_retv (sd);
+ g = guild_search (sd->status.guild_id);
+
+ if (g == NULL)
+ return;
+
+ if ((ps = guild_getposition (sd, g)) < 0
+ || (!(g->position[ps].mode & 0x0010) && strcmp (g->master, sd->status.name)))
+ return;
+
for (i = 4; i < RFIFOW (fd, 2); i += 12)
{
guild_change_memberposition (sd->status.guild_id,