summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-11 16:11:20 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-11 16:11:20 +0000
commit26789cc24022cf600543860c4a15dbe79aa0e1f8 (patch)
tree14ad7a134c8ef3957eb2ae6ed45e3352ae20d12c /src/map/guild.c
parentc467555b8cdf1599fe3e6eac76065e178a57d72f (diff)
downloadhercules-26789cc24022cf600543860c4a15dbe79aa0e1f8.tar.gz
hercules-26789cc24022cf600543860c4a15dbe79aa0e1f8.tar.bz2
hercules-26789cc24022cf600543860c4a15dbe79aa0e1f8.tar.xz
hercules-26789cc24022cf600543860c4a15dbe79aa0e1f8.zip
- cbasetypes now assumes that Mingwin does defines ssize_t
- Modified the guild master change ack packet to return the aid/cid of the new guild master instead of the index where it was, the previous method could cause problems in situations where the order of guild members would not match exactly between char/map servers. - Updated the Soul Linker's Rogue Spirit Stealth's speed bonus to +60%, according to forum infor from ragnagate. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9985 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 89778809f..c53343703 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1603,16 +1603,24 @@ int guild_gm_change(int guild_id, struct map_session_data *sd)
}
//Notification from Char server that a guild's master has changed. [Skotlex]
-int guild_gm_changed(int guild_id, int pos)
+int guild_gm_changed(int guild_id, int account_id, int char_id)
{
struct guild *g;
struct guild_member gm;
-
+ int pos;
+
g=guild_search(guild_id);
-
- if (!g || pos < 0 || pos > g->max_member)
+
+ if (!g)
return 0;
-
+
+ for(pos=0; pos<g->max_member && !(
+ g->member[pos].account_id==account_id &&
+ g->member[pos].char_id==char_id);
+ pos++);
+
+ if (pos == 0 || pos == g->max_member) return 0;
+
memcpy(&gm, &g->member[pos], sizeof (struct guild_member));
memcpy(&g->member[pos], &g->member[0], sizeof(struct guild_member));
memcpy(&g->member[0], &gm, sizeof(struct guild_member));