summaryrefslogtreecommitdiff
path: root/src/map
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
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')
-rw-r--r--src/map/guild.c18
-rw-r--r--src/map/guild.h2
-rw-r--r--src/map/intif.c4
-rw-r--r--src/map/status.c2
4 files changed, 17 insertions, 9 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));
diff --git a/src/map/guild.h b/src/map/guild.h
index e569c0d15..d5b501e3a 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -76,7 +76,7 @@ int guild_skillupack(int guild_id,int skill_num,int account_id);
int guild_break(struct map_session_data *sd,char *name);
int guild_broken(int guild_id,int flag);
int guild_gm_change(int guild_id, struct map_session_data *sd);
-int guild_gm_changed(int guild_id, int pos);
+int guild_gm_changed(int guild_id, int account_id, int char_id);
int guild_addcastleinfoevent(int castle_id,int index,const char *name);
int guild_castledataload(int castle_id,int index);
diff --git a/src/map/intif.c b/src/map/intif.c
index 1f7a0657e..8c087ea83 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -31,7 +31,7 @@ static const int packet_len_table[]={
-1, 7, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810
39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
- 9, 9,-1,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3840
+ 9, 9,-1,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3840
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1366,7 +1366,7 @@ int intif_parse_GuildCastleAllDataLoad(int fd)
int intif_parse_GuildMasterChanged(int fd)
{
RFIFOHEAD(fd);
- return guild_gm_changed(RFIFOL(fd,2),RFIFOL(fd,6));
+ return guild_gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
}
// pet
diff --git a/src/map/status.c b/src/map/status.c
index 660241cd3..1aed80716 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5174,7 +5174,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
val2 = tick>0?tick:10000; //Interval at which SP is drained.
val3 = 65+val1*5; //Speed adjustment.
if (sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_ROGUE)
- val3 += 10; //TODO: Figure out real bonus. Temp value +10%
+ val3 += 60;
val4 = 10+val1*2; //SP cost.
if (map_flag_gvg(bl->m)) val4 *= 5;
break;