- 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://svn.code.sf.net/p/rathena/svn/trunk@9099 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
f7442ef2b3
commit
f9bca76cd9
@ -4,6 +4,17 @@ 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.
|
||||
|
||||
2006/10/30
|
||||
* 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. [Skotlex]
|
||||
* Fixed Gank not working at all with the default max steal tries setting.
|
||||
[Skotlex]
|
||||
* Soul Drain won't work with skills tagged as self-targetted. [Skotlex]
|
||||
* Improved the Suiton code so that the walk/agi penalty only applies to
|
||||
enemies of whoever casted the skill. [Skotlex]
|
||||
* 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. [Skotlex]
|
||||
* Fixed getcharid according to samples and docs. [Lupus]
|
||||
Thanks to joshuaali for pointing it out. eAPP has no such bug
|
||||
2006/10/27
|
||||
|
@ -19,6 +19,8 @@
|
||||
-----
|
||||
|
||||
========================
|
||||
10/30
|
||||
* Set the inf2 to encore skills of Wand of Hermode [Skotlex]
|
||||
10/29
|
||||
* Official NJ/GS exp chart for level 1-48 [Playtester]
|
||||
* Added Shinobi Sash to Shinobi drops [Playtester]
|
||||
|
@ -511,7 +511,7 @@
|
||||
485,-2,6,1,-1,0,0,10,1,no,0,0,0,weapon,0 //WS_CARTTERMINATION#Cart Termination#
|
||||
486,0,6,4,0,1,0,5,1,no,0,0,0,weapon,0 //WS_OVERTHRUSTMAX#Maximum Power Thrust#
|
||||
487,0,6,4,0,1,0,5,1,no,0,0,0,none,0 //CG_LONGINGFREEDOM#Longing for Freedom#
|
||||
488,0,6,4,0,1,3,5,1,no,0,0,0,misc,0 //CG_HERMODE#Wand of Hermod#
|
||||
488,0,6,4,0,1,3,5,1,no,0,64,0,misc,0 //CG_HERMODE#Wand of Hermod#
|
||||
489,9,6,1,0,1,0,5,1,no,0,0,0,misc,0 //CG_TAROTCARD#Tarot Card of Fate#
|
||||
490,9,8,1,0,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,misc,0 //CR_ACIDDEMONSTRATION#Acid Demonstration#
|
||||
491,1,6,2,0,1,0,2,1,no,0,0,0,none,0 //CR_CULTIVATION#Cultivation#
|
||||
|
@ -2761,7 +2761,7 @@ struct Damage battle_calc_attack( int attack_type,
|
||||
return d;
|
||||
}
|
||||
|
||||
int battle_calc_return_damage(struct block_list *bl, int *damage, int flag) {
|
||||
int battle_calc_return_damage(struct block_list *bl, int skill, int *damage, int flag) {
|
||||
struct map_session_data *sd=NULL;
|
||||
struct status_change *sc;
|
||||
int rdamage = 0;
|
||||
@ -2793,7 +2793,9 @@ int battle_calc_return_damage(struct block_list *bl, int *damage, int flag) {
|
||||
// magic_damage_return by [AppleGirl] and [Valaris]
|
||||
if(flag&BF_MAGIC)
|
||||
{
|
||||
if(sd && sd->magic_damage_return && rand()%100 < sd->magic_damage_return)
|
||||
if(sd && sd->magic_damage_return &&
|
||||
!(skill_get_inf(skill)&(INF_GROUND_SKILL|INF_SELF_SKILL)) &&
|
||||
rand()%100 < sd->magic_damage_return)
|
||||
{ //Bounces back full damage, you take none.
|
||||
rdamage = *damage;
|
||||
*damage = 0;
|
||||
@ -2980,7 +2982,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
|
||||
|
||||
damage = wd.damage + wd.damage2;
|
||||
if (damage > 0 && src != target) {
|
||||
rdamage = battle_calc_return_damage(target, &damage, wd.flag);
|
||||
rdamage = battle_calc_return_damage(target, 0, &damage, wd.flag);
|
||||
if (rdamage > 0) {
|
||||
rdelay = clif_damage(src, src, tick, wd.amotion, sstatus->dmotion, rdamage, 1, 4, 0);
|
||||
//Use Reflect Shield to signal this kind of skill trigger. [Skotlex]
|
||||
|
@ -25,7 +25,7 @@ struct block_list;
|
||||
|
||||
struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int flag);
|
||||
|
||||
int battle_calc_return_damage(struct block_list *bl, int *damage, int flag);
|
||||
int battle_calc_return_damage(struct block_list *bl, int skill, int *damage, int flag);
|
||||
|
||||
void battle_drain(struct map_session_data *sd, struct block_list *tbl, int rdamage, int ldamage, int race, int boss);
|
||||
|
||||
|
@ -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,55 +8333,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
|
||||
clif_homskillinfoblock(sd);
|
||||
}
|
||||
|
||||
if(sd->state.connect_new) {
|
||||
sd->state.connect_new = 0;
|
||||
//Delayed night effect on log-on fix for the glow-issue. Thanks to Larry.
|
||||
if (night_flag) {
|
||||
char tmpstr[1024];
|
||||
strcpy(tmpstr, msg_txt(500)); // Actually, it's the night...
|
||||
clif_wis_message(sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
|
||||
|
||||
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
|
||||
//New 'night' effect by dynamix [Skotlex]
|
||||
if (night_flag && map[sd->bl.m].flag.nightenabled)
|
||||
{ //Display night.
|
||||
if (sd->state.night) //It must be resent because otherwise players get this annoying aura...
|
||||
clif_status_load(&sd->bl, SI_NIGHT, 0);
|
||||
else
|
||||
sd->state.night = 1;
|
||||
clif_status_load(&sd->bl, SI_NIGHT, 1);
|
||||
} else if (sd->state.night) { //Clear night display.
|
||||
sd->state.night = 0;
|
||||
clif_status_load(&sd->bl, SI_NIGHT, 0);
|
||||
}
|
||||
|
||||
// view equipment item
|
||||
#if PACKETVER < 4
|
||||
clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
|
||||
@ -8374,6 +8347,33 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
|
||||
if(sd->status.manner < 0)
|
||||
sc_start(&sd->bl,SC_NOCHAT,100,0,0);
|
||||
|
||||
if(sd->state.connect_new) {
|
||||
//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...
|
||||
clif_wis_message(sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
|
||||
|
||||
if (map[sd->bl.m].flag.nightenabled)
|
||||
add_timer(gettick()+1000,clif_nighttimer,sd->bl.id,0);
|
||||
}
|
||||
//On Login Script.
|
||||
npc_script_event(sd, NPCE_LOGIN);
|
||||
} else
|
||||
//New 'night' effect by dynamix [Skotlex]
|
||||
if (night_flag && map[sd->bl.m].flag.nightenabled)
|
||||
{ //Display night.
|
||||
if (sd->state.night) //It must be resent because otherwise players get this annoying aura...
|
||||
clif_status_load(&sd->bl, SI_NIGHT, 0);
|
||||
else
|
||||
sd->state.night = 1;
|
||||
clif_status_load(&sd->bl, SI_NIGHT, 1);
|
||||
} else if (sd->state.night) { //Clear night display.
|
||||
sd->state.night = 0;
|
||||
clif_status_load(&sd->bl, SI_NIGHT, 0);
|
||||
}
|
||||
|
||||
// Lance
|
||||
if(sd->state.event_loadmap && map[sd->bl.m].flag.loadevent){
|
||||
pc_setregstr(sd, add_str("@maploaded$"), map[sd->bl.m].name);
|
||||
|
@ -705,8 +705,6 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
|
||||
sd->state.event_kill_pc = 1;
|
||||
sd->state.event_disconnect = 1;
|
||||
sd->state.event_kill_mob = 1;
|
||||
|
||||
status_calc_pc(sd,1);
|
||||
|
||||
sd->state.auth = 1; //Do not auth him until the initial stats have been placed.
|
||||
{ //Add IP field
|
||||
@ -749,8 +747,6 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
|
||||
clif_wis_message(sd->fd, wisp_server_name, tmpstr, strlen(tmpstr)+1);
|
||||
}
|
||||
|
||||
if(sd->status.manner < 0) //Needed or manner will always be negative.
|
||||
sc_start(&sd->bl,SC_NOCHAT,100,0,0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1023,7 +1023,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
|
||||
skill_castend_damage_id(src,bl,HT_BLITZBEAT,(skill<lv)?skill:lv,tick,SD_LEVEL);
|
||||
}
|
||||
// Gank
|
||||
if(dstmd && dstmd->state.steal_flag<battle_config.skill_steal_max_tries && sd->status.weapon != W_BOW &&
|
||||
if(dstmd && sd->status.weapon != W_BOW &&
|
||||
(skill=pc_checkskill(sd,RG_SNATCHER)) > 0 &&
|
||||
(skill*15 + 55) + pc_checkskill(sd,TF_STEAL)*10 > rand()%1000) {
|
||||
if(pc_steal_item(sd,bl,pc_checkskill(sd,TF_STEAL)))
|
||||
@ -1520,7 +1520,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
|
||||
}
|
||||
|
||||
if(sd && skillid && attack_type&BF_MAGIC && status_isdead(bl) &&
|
||||
skill_get_inf(skillid)!=INF_GROUND_SKILL &&
|
||||
!(skill_get_inf(skillid)&(INF_GROUND_SKILL|INF_SELF_SKILL)) &&
|
||||
(rate=pc_checkskill(sd,HW_SOULDRAIN))>0
|
||||
){ //Soul Drain should only work on targetted spells [Skotlex]
|
||||
if (pc_issit(sd)) pc_setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex]
|
||||
@ -1888,7 +1888,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
||||
damage = dmg.damage + dmg.damage2;
|
||||
|
||||
if (damage > 0 && src != bl && src == dsrc)
|
||||
rdamage = battle_calc_return_damage(bl, &damage, dmg.flag);
|
||||
rdamage = battle_calc_return_damage(bl, skillid, &damage, dmg.flag);
|
||||
|
||||
//Skill hit type
|
||||
type=(skillid==0)?5:skill_get_hit(skillid);
|
||||
@ -6877,11 +6877,17 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
|
||||
case UNT_VOLCANO:
|
||||
case UNT_DELUGE:
|
||||
case UNT_VIOLENTGALE:
|
||||
case UNT_SUITON:
|
||||
if(sc && sc->data[type].timer==-1)
|
||||
sc_start(bl,type,100,sg->skill_lv,sg->limit);
|
||||
break;
|
||||
|
||||
case UNT_SUITON:
|
||||
if(sc && sc->data[type].timer==-1)
|
||||
sc_start4(bl,type,100,sg->skill_lv,
|
||||
battle_check_target(&src->bl,bl,BCT_ENEMY)>0?1:0, //Send val3 =1 to reduce agi.
|
||||
0,0,sg->limit);
|
||||
break;
|
||||
|
||||
case UNT_RICHMANKIM:
|
||||
case UNT_ETERNALCHAOS:
|
||||
case UNT_DRUMBATTLEFIELD:
|
||||
|
@ -3150,7 +3150,7 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
|
||||
agi -= sc->data[SC_DECREASEAGI].val2;
|
||||
if(sc->data[SC_QUAGMIRE].timer!=-1)
|
||||
agi -= sc->data[SC_QUAGMIRE].val2;
|
||||
if(sc->data[SC_SUITON].timer!=-1 && sc->data[SC_SUITON].val3) // does not affect players when not in PVP nor WoE. Does not affect Ninjas.
|
||||
if(sc->data[SC_SUITON].timer!=-1 && sc->data[SC_SUITON].val3)
|
||||
agi -= sc->data[SC_SUITON].val2;
|
||||
if(sc->data[SC_MARIONETTE].timer!=-1)
|
||||
agi -= (sc->data[SC_MARIONETTE].val3>>8)&0xFF;
|
||||
@ -4919,11 +4919,12 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
|
||||
val2 = 0;
|
||||
break;
|
||||
case SC_SUITON:
|
||||
val2 = 0; //Agi penalty
|
||||
val3 = 0; //Walk speed penalty
|
||||
if (status_get_class(bl) == JOB_NINJA ||
|
||||
(sd && !map_flag_vs(bl->m)))
|
||||
if (!val2 || (sd && (sd->class_&MAPID_UPPERMASK) == MAPID_NINJA)) {
|
||||
//No penalties.
|
||||
val2 = 0; //Agi penalty
|
||||
val3 = 0; //Walk speed penalty
|
||||
break;
|
||||
}
|
||||
val3 = 50;
|
||||
val2 = 3*((val1+1)/3);
|
||||
if (val1 > 4) val2--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user