- Corrected Kaupe so it doesn't ends on the first part of Soul Destroyer.
- Applied some cleaning to the way Tatami Gaeshi knocks back. - Cleaned up the way mobskill_use checks for the correct event. It should fix unlimited mob-skill-casting issues. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9154 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
eee1baf718
commit
91b73455dc
@ -4,6 +4,11 @@ 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/11/06
|
2006/11/06
|
||||||
|
* Corrected Kaupe so it doesn't ends on the first part of Soul Destroyer.
|
||||||
|
[Skotlex]
|
||||||
|
* Applied some cleaning to the way Tatami Gaeshi knocks back. [Skotlex]
|
||||||
|
* Cleaned up the way mobskill_use checks for the correct event. It should
|
||||||
|
fix unlimited mob-skill-casting issues. [Skotlex]
|
||||||
* Removed the return code entry when logging GM reload-GM requests
|
* Removed the return code entry when logging GM reload-GM requests
|
||||||
(login-sql),it'll just be stored as zero. [Skotlex]
|
(login-sql),it'll just be stored as zero. [Skotlex]
|
||||||
* Added a fix on socket.c to not pick INADDR_ANY when choosing our own IP.
|
* Added a fix on socket.c to not pick INADDR_ANY when choosing our own IP.
|
||||||
|
@ -318,8 +318,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
|
|||||||
(src->type == BL_PC || !skill_num))
|
(src->type == BL_PC || !skill_num))
|
||||||
{ //Kaupe only blocks all skills of players.
|
{ //Kaupe only blocks all skills of players.
|
||||||
clif_specialeffect(bl, 462, AREA);
|
clif_specialeffect(bl, 462, AREA);
|
||||||
if (--sc->data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
|
//Shouldn't end until Breaker's non-weapon part connects.
|
||||||
status_change_end(bl, SC_KAUPE, -1);
|
if (skill_num != ASC_BREAKER || !(flag&BF_WEAPON))
|
||||||
|
if (--sc->data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
|
||||||
|
status_change_end(bl, SC_KAUPE, -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2649,7 +2649,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
|
|||||||
if (!battle_config.mob_skill_rate || md->ud.skilltimer != -1 || !md->db->maxskill)
|
if (!battle_config.mob_skill_rate || md->ud.skilltimer != -1 || !md->db->maxskill)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (event < 0 && DIFF_TICK(md->ud.canact_tick, tick) > 0)
|
if (event == -1 && DIFF_TICK(md->ud.canact_tick, tick) > 0)
|
||||||
return 0; //Skill act delay only affects non-event skills.
|
return 0; //Skill act delay only affects non-event skills.
|
||||||
|
|
||||||
//Pick a starting position and loop from that.
|
//Pick a starting position and loop from that.
|
||||||
@ -2676,11 +2676,12 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
|
|||||||
if (rand() % 10000 > ms[i].permillage) //Lupus (max value = 10000)
|
if (rand() % 10000 > ms[i].permillage) //Lupus (max value = 10000)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// <20>ðŒ<C3B0>”»’è
|
if (ms[i].cond1 == event)
|
||||||
flag = (event == ms[i].cond1);
|
flag = 1; //Trigger skill.
|
||||||
//Avoid entering on defined events to avoid "hyper-active skill use" due to the overflow of calls to this function
|
else if (ms[i].cond1 == MSC_SKILLUSED)
|
||||||
//in battle. The only exception is MSC_SKILLUSED which explicitly uses the event value to trigger. [Skotlex]
|
flag = ((event & 0xffff) == MSC_SKILLUSED && ((event >> 16) == c2 || c2 == 0));
|
||||||
if (!flag && (event == -1 || (event & 0xffff) == MSC_SKILLUSED)){
|
else if(event == -1){
|
||||||
|
//Avoid entering on defined events to avoid "hyper-active skill use" due to the overflow of calls to this function in battle.
|
||||||
switch (ms[i].cond1)
|
switch (ms[i].cond1)
|
||||||
{
|
{
|
||||||
case MSC_ALWAYS:
|
case MSC_ALWAYS:
|
||||||
@ -2723,8 +2724,6 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
|
|||||||
flag = (unit_counttargeted(&md->bl, 0) >= c2); break;
|
flag = (unit_counttargeted(&md->bl, 0) >= c2); break;
|
||||||
case MSC_AFTERSKILL:
|
case MSC_AFTERSKILL:
|
||||||
flag = (md->ud.skillid == c2); break;
|
flag = (md->ud.skillid == c2); break;
|
||||||
case MSC_SKILLUSED: // specificated skill used
|
|
||||||
flag = ((event & 0xffff) == MSC_SKILLUSED && ((event >> 16) == c2 || c2 == 0)); break;
|
|
||||||
case MSC_RUDEATTACKED:
|
case MSC_RUDEATTACKED:
|
||||||
flag = (md->attacked_count >= RUDE_ATTACKED_COUNT);
|
flag = (md->attacked_count >= RUDE_ATTACKED_COUNT);
|
||||||
if (flag) md->attacked_count = 0; //Rude attacked count should be reset after the skill condition is met. Thanks to Komurka [Skotlex]
|
if (flag) md->attacked_count = 0; //Rude attacked count should be reset after the skill condition is met. Thanks to Komurka [Skotlex]
|
||||||
@ -2850,7 +2849,7 @@ int mobskill_event(struct mob_data *md, struct block_list *src, unsigned int tic
|
|||||||
if (flag == -1)
|
if (flag == -1)
|
||||||
res = mobskill_use(md, tick, MSC_CASTTARGETED);
|
res = mobskill_use(md, tick, MSC_CASTTARGETED);
|
||||||
else if ((flag&0xffff) == MSC_SKILLUSED)
|
else if ((flag&0xffff) == MSC_SKILLUSED)
|
||||||
res = mobskill_use(md,tick,flag);
|
res = mobskill_use(md, tick, flag);
|
||||||
else if (flag&BF_SHORT)
|
else if (flag&BF_SHORT)
|
||||||
res = mobskill_use(md, tick, MSC_CLOSEDATTACKED);
|
res = mobskill_use(md, tick, MSC_CLOSEDATTACKED);
|
||||||
else if (flag&BF_LONG)
|
else if (flag&BF_LONG)
|
||||||
|
@ -1906,6 +1906,10 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
if(src == bl) type = 4;
|
if(src == bl) type = 4;
|
||||||
else flag|=SD_ANIMATION;
|
else flag|=SD_ANIMATION;
|
||||||
}
|
}
|
||||||
|
if(skillid == NJ_TATAMIGAESHI) {
|
||||||
|
dsrc = src; //For correct knockback.
|
||||||
|
flag|=SD_ANIMATION;
|
||||||
|
}
|
||||||
|
|
||||||
if(sd) {
|
if(sd) {
|
||||||
int flag = 0; //Used to signal if this skill can be combo'ed later on.
|
int flag = 0; //Used to signal if this skill can be combo'ed later on.
|
||||||
@ -2066,7 +2070,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
|
|
||||||
//Only knockback if it's still alive, otherwise a "ghost" is left behind. [Skotlex]
|
//Only knockback if it's still alive, otherwise a "ghost" is left behind. [Skotlex]
|
||||||
if (dmg.blewcount > 0 && !status_isdead(bl))
|
if (dmg.blewcount > 0 && !status_isdead(bl))
|
||||||
skill_blown(skillid==NJ_TATAMIGAESHI?src:dsrc,bl,dmg.blewcount);
|
skill_blown(dsrc,bl,dmg.blewcount);
|
||||||
|
|
||||||
//Delayed damage must be dealt after the knockback (it needs to know actual position of target)
|
//Delayed damage must be dealt after the knockback (it needs to know actual position of target)
|
||||||
if (dmg.amotion)
|
if (dmg.amotion)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user