summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt7
-rw-r--r--src/char/int_guild.c9
-rw-r--r--src/char_sql/int_guild.c9
-rw-r--r--src/common/cbasetypes.h3
-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
8 files changed, 36 insertions, 18 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 7eeef7f10..5a6a646ad 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,13 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/03/12
+ * 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. [Skotlex]
2007/03/09
* Mapcache can run on system with any endianness.
The generated file contains data in little endian.
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 6886287e2..84c5839d1 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -877,13 +877,14 @@ int mapif_guild_emblem(struct guild *g) {
return 0;
}
-int mapif_guild_master_changed(struct guild *g, int position)
+int mapif_guild_master_changed(struct guild *g, int aid, int cid)
{
unsigned char buf[12];
WBUFW(buf,0)=0x3843;
WBUFL(buf,2)=g->guild_id;
- WBUFL(buf,6)=position;
- mapif_sendall(buf,10);
+ WBUFL(buf,6)=aid;
+ WBUFL(buf,10)=cid;
+ mapif_sendall(buf,14);
return 0;
}
@@ -1517,7 +1518,7 @@ int mapif_parse_GuildMasterChange(int fd, int guild_id, const char* name, int le
g->master[len] = '\0';
ShowInfo("int_guild: Guildmaster Changed to %s (Guild %d - %s)\n",name, guild_id, g->name);
- return mapif_guild_master_changed(g, pos);
+ return mapif_guild_master_changed(g, g->member[0].account_id, g->member[0].char_id);
}
// map server からの通信
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 8232608c1..4ad3ea070 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -1199,13 +1199,14 @@ int mapif_guild_emblem(struct guild *g)
return 0;
}
-int mapif_guild_master_changed(struct guild *g, int position)
+int mapif_guild_master_changed(struct guild *g, int aid, int cid)
{
unsigned char buf[10];
WBUFW(buf,0)=0x3843;
WBUFL(buf,2)=g->guild_id;
- WBUFL(buf,6)=position;
- mapif_sendall(buf,10);
+ WBUFL(buf,6)=aid;
+ WBUFL(buf,10)=cid;
+ mapif_sendall(buf,14);
return 0;
}
@@ -2043,7 +2044,7 @@ int mapif_parse_GuildMasterChange(int fd, int guild_id, const char* name, int le
ShowInfo("int_guild: Guildmaster Changed to %s (Guild %d - %s)\n",g->master, guild_id, g->name);
g->save_flag |= (GS_BASIC|GS_MEMBER); //Save main data and member data.
- return mapif_guild_master_changed(g, pos);
+ return mapif_guild_master_changed(g, g->member[0].account_id, g->member[0].char_id);
}
// ギルドチェック要求
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 1eea1c465..eca0d056c 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -153,7 +153,8 @@ typedef unsigned long int ppuint32;
// integer with exact processor width (and best speed)
// size_t already defined in stdio.h
//////////////////////////////
-#ifdef WIN32 // does not have a signed size_t
+//
+#if defined(WIN32) && !defined(MINGW) // does not have a signed size_t
//////////////////////////////
#if defined(_WIN64) // naive 64bit windows platform
typedef __int64 ssize_t;
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;