From 5d2225fbbf84324c1cf370bb11776b1c0a671b4a Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 30 Oct 2006 17:53:18 +0000 Subject: - Set the inf2 to encore skills of Wand of Hermode - Modified battle_calc_return_damage to take the skill id as well, now magic damage return will not work on skills tagged as ground or self targetted. - Fixed Gank not working at all with the default max steal tries setting. - Soul Drain won't work with skills tagged as self-targetted. - Improved the Suiton code so that the walk/agi penalty only applies to enemies of whoever casted the skill. - Moved the initial status_calc_pc call to when you finish loading the map, should fix equipment scripts which are based on character variables not working. - Some cleanup of the clif_parse_LoadEndAck function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9099 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 74 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 6bfe4ef50..ef1499cd9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8218,11 +8218,30 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if(sd->npc_id) npc_event_dequeue(sd); if(sd->state.connect_new) { + status_calc_pc(sd,1); + + if (sd->sc.option&OPTION_FALCON) + clif_status_load(&sd->bl, SI_FALCON, 1); + if (sd->sc.option&OPTION_RIDING) + clif_status_load(&sd->bl, SI_RIDING, 1); + + //Auron reported that This skill only triggers when you logon on the map o.O [Skotlex] + if ((i = pc_checkskill(sd,SG_KNOWLEDGE)) > 0) { + if(sd->bl.m == sd->feel_map[0].m + || sd->bl.m == sd->feel_map[1].m + || sd->bl.m == sd->feel_map[2].m) + sc_start(&sd->bl, SC_KNOWLEDGE, 100, i, skill_get_time(SG_KNOWLEDGE, i)); + } + clif_skillinfoblock(sd); clif_updatestatus(sd,SP_NEXTBASEEXP); clif_updatestatus(sd,SP_NEXTJOBEXP); clif_updatestatus(sd,SP_SKILLPOINT); clif_initialstatus(sd); + //Removed, for some reason chars get stuck on map-change when you send this packet!? [Skotlex] + //[LuzZza] + //clif_guild_send_onlineinfo(sd); + } else { //For some reason the client "loses" these on map-change. clif_updatestatus(sd,SP_STR); @@ -8298,6 +8317,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_send_petdata(sd,0,0); clif_send_petdata(sd,5,battle_config.pet_hair_style); clif_send_petstatus(sd); + + if(sd->state.connect_new && sd->pd->pet.intimate > 900) + clif_pet_emotion(sd->pd,(sd->pd->pet.class_ - 100)*100 + 50 + pet_hungry_val(sd->pd)); } //homunculus [blackhole89] @@ -8311,9 +8333,23 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_homskillinfoblock(sd); } + // view equipment item +#if PACKETVER < 4 + clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); + clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield); +#else + clif_changelook(&sd->bl,LOOK_WEAPON,0); +#endif + + if(sd->vd.cloth_color) + clif_refreshlook(&sd->bl,sd->bl.id,LOOK_CLOTHES_COLOR,sd->vd.cloth_color,SELF); + + if(sd->status.manner < 0) + sc_start(&sd->bl,SC_NOCHAT,100,0,0); + if(sd->state.connect_new) { - sd->state.connect_new = 0; //Delayed night effect on log-on fix for the glow-issue. Thanks to Larry. + sd->state.connect_new = 0; if (night_flag) { char tmpstr[1024]; strcpy(tmpstr, msg_txt(500)); // Actually, it's the night... @@ -8322,28 +8358,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if (map[sd->bl.m].flag.nightenabled) add_timer(gettick()+1000,clif_nighttimer,sd->bl.id,0); } - -// if(sd->status.class_ != sd->vd.class_) -// clif_refreshlook(&sd->bl,sd->bl.id,LOOK_BASE,sd->vd.class_,SELF); - - if (sd->sc.option&OPTION_FALCON) - clif_status_load(&sd->bl, SI_FALCON, 1); - if (sd->sc.option&OPTION_RIDING) - clif_status_load(&sd->bl, SI_RIDING, 1); - - //Auron reported that This skill only triggers when you logon on the map o.O [Skotlex] - if ((i = pc_checkskill(sd,SG_KNOWLEDGE)) > 0) { - if(sd->bl.m == sd->feel_map[0].m - || sd->bl.m == sd->feel_map[1].m - || sd->bl.m == sd->feel_map[2].m) - sc_start(&sd->bl, SC_KNOWLEDGE, 100, i, skill_get_time(SG_KNOWLEDGE, i)); - } - - if(sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 900) - clif_pet_emotion(sd->pd,(sd->pd->pet.class_ - 100)*100 + 50 + pet_hungry_val(sd->pd)); - //Removed, for some reason chars get stuck on map-change when you send this packet!? [Skotlex] - //[LuzZza] - //clif_guild_send_onlineinfo(sd); //On Login Script. npc_script_event(sd, NPCE_LOGIN); } else @@ -8360,20 +8374,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_status_load(&sd->bl, SI_NIGHT, 0); } - // view equipment item -#if PACKETVER < 4 - clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); - clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield); -#else - clif_changelook(&sd->bl,LOOK_WEAPON,0); -#endif - - if(sd->vd.cloth_color) - clif_refreshlook(&sd->bl,sd->bl.id,LOOK_CLOTHES_COLOR,sd->vd.cloth_color,SELF); - - if(sd->status.manner < 0) - sc_start(&sd->bl,SC_NOCHAT,100,0,0); - // Lance if(sd->state.event_loadmap && map[sd->bl.m].flag.loadevent){ pc_setregstr(sd, add_str("@maploaded$"), map[sd->bl.m].name); -- cgit v1.2.3-70-g09d2