- ES magic will now put the caster on stun for 0.5 secs regardless of whether the skill-target is a mob or not.

- Added function clif_party_join_info which sends packet 0x1e9 each time a party-member joins. This packet (as redundant info as it has) should also contain the field for "adoptability", but that needs to be coded in yet.
- Added clif_ParseAdoptRequest which does the basic adoption handling. More checks and the reply packets still need to be coded in.
- Happy State and TK stances won't dispel on death now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6521 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-05-08 20:53:46 +00:00
parent 3dc2f37e5f
commit e78ae404f9
6 changed files with 96 additions and 43 deletions

View File

@ -4,6 +4,15 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/08 2006/05/08
* ES magic will now put the caster on stun for 0.5 secs regardless of
whether the skill-target is a mob or not. [Skotlex]
* Added function clif_party_join_info which sends packet 0x1e9 each time a
party-member joins. This packet (as redundant info as it has) should also
contain the field for "adoptability", but that needs to be coded in yet.
[Skotlex]
* Added clif_ParseAdoptRequest which does the basic adoption handling. More
checks and the reply packets still need to be coded in. [Skotlex]
* Happy State and TK stances won't dispel on death now. [Skotlex]
* Cleaned up combo-skill implementation, SC_COMBO is automatically ended in * Cleaned up combo-skill implementation, SC_COMBO is automatically ended in
skill_check_condition now. [Skotlex] skill_check_condition now. [Skotlex]
* Modified TK-ranker infinite combos to behave as described by AuronX. * Modified TK-ranker infinite combos to behave as described by AuronX.

View File

@ -5822,6 +5822,25 @@ int clif_party_main_info(struct party *p, int fd)
return 1; return 1;
} }
int clif_party_join_info(struct party *p, struct map_session_data *sd)
{
unsigned char buf[96];
WBUFW(buf,0)=0x1e9;
WBUFL(buf,2)= sd->status.account_id;
WBUFL(buf,6)= 0; //Apparently setting this to 1 makes you adoptable.
WBUFW(buf,10)=sd->bl.x;
WBUFW(buf,12)=sd->bl.y;
WBUFB(buf,14)=0; //Uncomfirmed byte.
memcpy(WBUFP(buf,15), p->name, NAME_LENGTH);
memcpy(WBUFP(buf,39), sd->status.name, NAME_LENGTH);
memcpy(WBUFP(buf,63), mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH);
WBUFB(buf,79) = (p->item&1)?1:0;
WBUFB(buf,80) = (p->item&2)?1:0;
clif_send(buf,packet_len_table[0x1e9],&sd->bl,PARTY_WOS);
return 1;
}
/*========================================== /*==========================================
* *
*------------------------------------------ *------------------------------------------
@ -6041,8 +6060,8 @@ int clif_party_hp(struct map_session_data *sd)
WBUFW(buf,0)=0x106; WBUFW(buf,0)=0x106;
WBUFL(buf,2)=sd->status.account_id; WBUFL(buf,2)=sd->status.account_id;
WBUFW(buf,6)=(sd->status.hp > 0x7fff)? 0x7fff:sd->status.hp; WBUFW(buf,6)=(sd->status.hp > SHRT_MAX)?SHRT_MAX:sd->status.hp;
WBUFW(buf,8)=(sd->status.max_hp > 0x7fff)? 0x7fff:sd->status.max_hp; WBUFW(buf,8)=(sd->status.max_hp > SHRT_MAX)?SHRT_MAX:sd->status.max_hp;
clif_send(buf,packet_len_table[0x106],&sd->bl,PARTY_AREA_WOS); clif_send(buf,packet_len_table[0x106],&sd->bl,PARTY_AREA_WOS);
return 0; return 0;
} }
@ -11269,6 +11288,23 @@ void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv) {
sd->menuskill_lv=skilllv; sd->menuskill_lv=skilllv;
} }
void clif_parse_AdoptRequest(int fd,struct map_session_data *sd) {
//TODO: add somewhere the adopt code, checks for exploits, etc, etc.
//Missing packets are the client's reply packets to the adopt request one.
//[Skotlex]
int account_id;
struct map_session_data *sd2;
RFIFOHEAD(fd);
account_id = RFIFOL(fd,2);
sd2 = map_id2sd(account_id);
if(sd2 && sd2->fd && sd2 != sd && sd2->status.party_id == sd->status.party_id) { //FIXME: No checks whatsoever are in place yet!
fd = sd2->fd;
WFIFOHEAD(fd,packet_len_table[0x1f9]);
WFIFOW(fd,0)=0x1f9;
WFIFOSET(fd, packet_len_table[0x1f9]);
}
}
/*========================================== /*==========================================
* *
*------------------------------------------ *------------------------------------------
@ -11645,8 +11681,8 @@ static int packetdb_readdb(void)
{clif_parse_Taekwon,"taekwon"}, {clif_parse_Taekwon,"taekwon"},
{clif_parse_RankingPk,"rankingpk"}, {clif_parse_RankingPk,"rankingpk"},
{clif_parse_FeelSaveOk,"feelsaveok"}, {clif_parse_FeelSaveOk,"feelsaveok"},
{clif_parse_AdoptRequest,"adopt"},
{clif_parse_debug,"debug"}, {clif_parse_debug,"debug"},
{NULL,NULL} {NULL,NULL}
}; };

View File

@ -234,6 +234,7 @@ int clif_movetoattack(struct map_session_data *sd,struct block_list *bl);
// party // party
int clif_party_created(struct map_session_data *sd,int flag); int clif_party_created(struct map_session_data *sd,int flag);
int clif_party_main_info(struct party *p, int fd); int clif_party_main_info(struct party *p, int fd);
int clif_party_join_info(struct party *p, struct map_session_data *sd);
int clif_party_info(struct party *p,int fd); int clif_party_info(struct party *p,int fd);
int clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd); int clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd);
int clif_party_inviteack(struct map_session_data *sd,char *nick,int flag); int clif_party_inviteack(struct map_session_data *sd,char *nick,int flag);

View File

@ -278,7 +278,7 @@ int party_reply_invite(struct map_session_data *sd,int account_id,int flag)
int party_member_added(int party_id,int account_id,int char_id, int flag) int party_member_added(int party_id,int account_id,int char_id, int flag)
{ {
struct map_session_data *sd = map_id2sd(account_id),*sd2; struct map_session_data *sd = map_id2sd(account_id),*sd2;
struct party *p = party_search(party_id);
if(sd == NULL || sd->status.char_id != char_id){ if(sd == NULL || sd->status.char_id != char_id){
if (flag == 0) { if (flag == 0) {
if(battle_config.error_log) if(battle_config.error_log)
@ -287,23 +287,28 @@ int party_member_added(int party_id,int account_id,int char_id, int flag)
} }
return 0; return 0;
} }
sd->party_invite=0; sd->party_invite=0;
sd->party_invite_account=0; sd->party_invite_account=0;
sd2=map_id2sd(sd->party_invite_account); if (!p) {
if (sd2) if(battle_config.error_log)
clif_party_inviteack(sd2,sd->status.name,flag?2:0); ShowError("party_member_added: party %d not found.\n",party_id);
if(flag) intif_party_leave(party_id,account_id,char_id);
return 0; return 0;
}
sd2=map_id2sd(sd->party_invite_account);
if(!flag) {
sd->state.party_sent=0; sd->state.party_sent=0;
sd->status.party_id=party_id; sd->status.party_id=party_id;
party_check_conflict(sd); party_check_conflict(sd);
clif_party_join_info(p,sd);
clif_charnameupdate(sd); //Update char name's display [Skotlex] clif_charnameupdate(sd); //Update char name's display [Skotlex]
clif_party_hp(sd); clif_party_hp(sd);
clif_party_xy(sd); clif_party_xy(sd);
}
if (sd2)
clif_party_inviteack(sd2,sd->status.name,flag?2:0);
return 0; return 0;
} }
// ƒp<C692>[ƒeƒB<C692>œ¼—v<76> // ƒp<C692>[ƒeƒB<C692>œ¼—v<76>

View File

@ -2924,12 +2924,12 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
case SL_STIN: case SL_STIN:
case SL_STUN: case SL_STUN:
case SL_SMA: case SL_SMA:
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) { if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB)
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0); clif_skill_fail(sd,skillid,0,0);
break; else
}
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break; break;
/* ‚»‚Ì‘¼ */ /* ‚»‚Ì‘¼ */
@ -5389,36 +5389,36 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break; break;
case SL_SKA: // [marquis007] case SL_SKA: // [marquis007]
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) { if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB)
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0); clif_skill_fail(sd,skillid,0,0);
break; else
}
clif_skill_nodamage(src,bl,skillid,skilllv, clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
//Stun happens regardless.
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break; break;
case SL_SWOO: case SL_SWOO:
if (sd && ( if (sd && (
(!battle_config.allow_es_magic_pc && bl->type != BL_MOB) || (!battle_config.allow_es_magic_pc && bl->type != BL_MOB) ||
(tsc && tsc->data[type].timer != -1) (tsc && tsc->data[type].timer != -1)
)) { ))
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0); clif_skill_fail(sd,skillid,0,0);
break; else
}
clif_skill_nodamage(src,bl,skillid,skilllv, clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break; break;
case SL_SKE: case SL_SKE:
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) { if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB)
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
clif_skill_fail(sd,skillid,0,0); clif_skill_fail(sd,skillid,0,0);
break; else {
}
clif_skill_nodamage(src,bl,skillid,skilllv, clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
sc_start(src,SC_SMA,100,skilllv,skill_get_time(SL_SMA,skilllv)); sc_start(src,SC_SMA,100,skilllv,skill_get_time(SL_SMA,skilllv));
}
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break; break;
// New guild skills [Celest] // New guild skills [Celest]

View File

@ -4851,11 +4851,13 @@ int status_change_clear(struct block_list *bl,int type)
return 0; return 0;
for(i = 0; i < SC_MAX; i++) for(i = 0; i < SC_MAX; i++)
{ {
//Type 0: PC killed -> EDP and Meltdown must not be dispelled. [Skotlex] //Type 0: PC killed -> Place here stats that do not dispel on death.
// Do not reset Xmas status when killed. [Valaris]
if(sc->data[i].timer == -1 || if(sc->data[i].timer == -1 ||
(type == 0 && (type == 0 && (
(i == SC_EDP || i == SC_MELTDOWN || i == SC_XMAS || i == SC_NOCHAT || i == SC_FUSION || i == SC_TKREST))) i == SC_EDP || i == SC_MELTDOWN || i == SC_XMAS || i == SC_NOCHAT ||
i == SC_FUSION || i == SC_TKREST || i == SC_READYSTORM ||
i == SC_READYDOWN || i == SC_READYCOUNTER || i == SC_READYTURN
)))
continue; continue;
status_change_end(bl, i, -1); status_change_end(bl, i, -1);