summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-26 13:01:10 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-26 13:01:10 +0000
commit2ea1a0100b05dcf1f8001159485c57c76e4a5ae6 (patch)
treeb5e2155521f5b1487ad536d543e403862f7b6c4b
parent54385260051f2b09138aed6c57b1f889ce766c7a (diff)
downloadhercules-2ea1a0100b05dcf1f8001159485c57c76e4a5ae6.tar.gz
hercules-2ea1a0100b05dcf1f8001159485c57c76e4a5ae6.tar.bz2
hercules-2ea1a0100b05dcf1f8001159485c57c76e4a5ae6.tar.xz
hercules-2ea1a0100b05dcf1f8001159485c57c76e4a5ae6.zip
- Fixed guild emblem not showing when you log in (caused by r5359)
- Fixed server not sending party/guild info when you enter a map - Fixed server not removing member minimap dot when you leave a guild git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10624 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/map/clif.c18
-rw-r--r--src/map/guild.c90
-rw-r--r--src/map/party.c8
4 files changed, 68 insertions, 53 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 92c92e0b0..4c9a041cd 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,11 @@ 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/05/26
+ * Identified several more glitches, too tired to fix these...
+ * Fixed server not removing member minimap dot when you leave a guild
+ * Fixed server not sending party/guild info when you enter a map
+ * Fixed guild emblem not showing when you log in (caused by r5359)
2007/05/25
* Fixed @statall giving you +99 stats instead of setting them to 99
* Fixed npctalk and @npctalk displaying the # part of the name
diff --git a/src/map/clif.c b/src/map/clif.c
index 80e863483..456667a32 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8012,15 +8012,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
clif_updatestatus(sd,SP_MAXWEIGHT);
clif_updatestatus(sd,SP_WEIGHT);
- if(battle_config.pc_invincible_time > 0) {
- if(map_flag_gvg(sd->bl.m))
- pc_setinvincibletimer(sd,battle_config.pc_invincible_time<<1);
- else
- pc_setinvincibletimer(sd,battle_config.pc_invincible_time);
- }
- map_addblock(&sd->bl); // ƒuƒƒbƒN“o˜^
- clif_spawn(&sd->bl); // spawn
-
// Party
if(sd->status.party_id) {
party_send_movemap(sd);
@@ -8031,6 +8022,15 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if(sd->status.guild_id)
guild_send_memberinfoshort(sd,1);
+ if(battle_config.pc_invincible_time > 0) {
+ if(map_flag_gvg(sd->bl.m))
+ pc_setinvincibletimer(sd,battle_config.pc_invincible_time<<1);
+ else
+ pc_setinvincibletimer(sd,battle_config.pc_invincible_time);
+ }
+ map_addblock(&sd->bl); // ƒuƒƒbƒN“o˜^
+ clif_spawn(&sd->bl); // spawn
+
if(map[sd->bl.m].flag.pvp) {
if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
if (!map[sd->bl.m].flag.pvp_nocalcrank)
diff --git a/src/map/guild.c b/src/map/guild.c
index c6dbe7515..57582b470 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -715,10 +715,10 @@ int guild_reply_invite(struct map_session_data *sd,int guild_id,int flag)
return 0;
}
-
//interŽI‚Φ’Η‰Α—v‹
guild_makemember(&m,sd);
intif_guild_addmember( sd->guild_invite, &m );
+ //TODO: send a minimap update to this player
return 0;
}else{ // ‹‘”Ϋ
sd->guild_invite=0;
@@ -756,8 +756,10 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
}
// ¬Œχ
- sd->state.guild_sent=0;
- sd->status.guild_id=guild_id;
+ sd->state.guild_sent = 0;
+ sd->status.guild_id = g->guild_id;
+ sd->guild_emblem_id = g->emblem_id;
+ //TODO: send new emblem info to others
if( sd2!=NULL )
clif_guild_inviteack(sd2,2);
@@ -770,8 +772,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
}
// ƒMƒ‹ƒh’E‘ή—v‹
-int guild_leave(struct map_session_data *sd,int guild_id,
- int account_id,int char_id,const char *mes)
+int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes)
{
struct guild *g;
@@ -790,9 +791,9 @@ int guild_leave(struct map_session_data *sd,int guild_id,
intif_guild_leave(sd->status.guild_id, sd->status.account_id, sd->status.char_id,0,mes);
return 0;
}
+
// ƒMƒ‹ƒh’Η•ϊ—v‹
-int guild_expulsion(struct map_session_data *sd,int guild_id,
- int account_id,int char_id,const char *mes)
+int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes)
{
struct map_session_data *tsd;
struct guild *g;
@@ -829,47 +830,51 @@ int guild_expulsion(struct map_session_data *sd,int guild_id,
return 0;
}
-int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
- const char *name,const char *mes) // rewrote [LuzZza]
+int guild_member_leaved(int guild_id, int account_id, int char_id, int flag, const char* name, const char* mes)
{
int i;
- struct guild *g = guild_search(guild_id);
- struct map_session_data *sd = map_charid2sd(char_id);
- struct map_session_data *online_member_sd;
+ struct guild* g = guild_search(guild_id);
+ struct map_session_data* sd = map_charid2sd(char_id);
+ struct map_session_data* online_member_sd;
if(g == NULL)
- return 0;
+ return 0; // no such guild (error!)
- for(i=0;i<g->max_member;i++) {
- if( g->member[i].account_id == account_id &&
- g->member[i].char_id == char_id ){
-
- if((online_member_sd = guild_getavailablesd(g)) == NULL)
- return 0;
-
- if(!flag)
- clif_guild_leave(online_member_sd, name, mes);
- else
- clif_guild_expulsion(online_member_sd, name, mes, account_id);
-
- memset(&g->member[i],0,sizeof(struct guild_member));
- clif_guild_memberlist(online_member_sd);
-
- if(sd != NULL && sd->status.guild_id == guild_id) {
- if (sd->state.storage_flag == 2) //Close the guild storage.
- storage_guild_storageclose(sd);
- sd->status.guild_id=0;
- sd->guild_emblem_id=0;
- sd->state.guild_sent=0;
-
- guild_send_dot_remove(sd);
- clif_charnameupdate(sd); //Update display name [Skotlex]
- }
- return 0;
- }
-
- }
+ for(i = 0; i < g->max_member; i++)
+ if( g->member[i].account_id == account_id && g->member[i].char_id == char_id )
+ break;
+
+ if (i == g->max_member)
+ return 0; // not a member (inconsistency!)
+
+ online_member_sd = guild_getavailablesd(g);
+ if(online_member_sd == NULL)
+ return 0; // noone online to inform
+
+ if(!flag)
+ clif_guild_leave(online_member_sd, name, mes);
+ else
+ clif_guild_expulsion(online_member_sd, name, mes, account_id);
+
+ // remove member from guild
+ memset(&g->member[i],0,sizeof(struct guild_member));
+ clif_guild_memberlist(online_member_sd);
+ // update char, if online
+ if(sd != NULL && sd->status.guild_id == guild_id)
+ {
+ // do stuff that needs the guild_id first, BEFORE we wipe it
+ if (sd->state.storage_flag == 2) //Close the guild storage.
+ storage_guild_storageclose(sd);
+ guild_send_dot_remove(sd);
+
+ sd->status.guild_id = 0;
+ sd->guild_emblem_id = 0;
+ sd->state.guild_sent = 0;
+
+ clif_charnameupdate(sd); //Update display name [Skotlex]
+ //TODO: send emblem update to self and people around
+ }
return 0;
}
@@ -975,6 +980,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
continue;
clif_guild_xy_single(g->member[idx].sd->fd, g->member[i].sd);
+ clif_guild_xy_single(g->member[i].sd->fd, g->member[idx].sd);
}
return 0;
diff --git a/src/map/party.c b/src/map/party.c
index 4c1f512cd..cac59d2c2 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -427,6 +427,7 @@ int party_member_leaved(int party_id,int account_id,int char_id)
sd->status.party_id=0;
sd->state.party_sent=0;
clif_charnameupdate(sd); //Update name display [Skotlex]
+ //TODO: hp bars should be cleared too
}
return 0;
}
@@ -532,12 +533,15 @@ void party_send_movemap(struct map_session_data *sd)
}
}
- if (sd->fd) { //Send dots of other party members to this char. [Skotlex]
+ if (sd->fd) { // synchronize minimap positions with the rest of the party
for(i=0; i < MAX_PARTY; i++) {
- if (p->data[i].sd &&
+ if (p->data[i].sd &&
p->data[i].sd != sd &&
p->data[i].sd->bl.m == sd->bl.m)
+ {
clif_party_xy_single(sd->fd, p->data[i].sd);
+ clif_party_xy_single(p->data[i].sd->fd, sd);
+ }
}
}
return;