Enable autobonus to be reactivated (#3199)
* Fixes #3039, #3158 * Thanks to @Raf4h @laziem
This commit is contained in:
parent
a4336fd8ae
commit
e7fd6aa5bd
@ -2379,6 +2379,9 @@ void pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
|
||||
if (!sd || !autobonus)
|
||||
return;
|
||||
|
||||
if (autobonus->active != INVALID_TIMER)
|
||||
delete_timer(autobonus->active, pc_endautobonus);
|
||||
|
||||
if( autobonus->other_script )
|
||||
{
|
||||
int j;
|
||||
|
@ -2177,8 +2177,6 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
|
||||
{
|
||||
if( rnd()%1000 >= sd->autobonus[i].rate )
|
||||
continue;
|
||||
if( sd->autobonus[i].active != INVALID_TIMER )
|
||||
continue;
|
||||
if(!( ((sd->autobonus[i].atk_type)&attack_type)&BF_WEAPONMASK &&
|
||||
((sd->autobonus[i].atk_type)&attack_type)&BF_RANGEMASK &&
|
||||
((sd->autobonus[i].atk_type)&attack_type)&BF_SKILLMASK))
|
||||
@ -2281,8 +2279,6 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1
|
||||
for( i = 0; i < ARRAYLENGTH(sd->autobonus3); i++ ) {
|
||||
if( rnd()%1000 >= sd->autobonus3[i].rate )
|
||||
continue;
|
||||
if( sd->autobonus3[i].active != INVALID_TIMER )
|
||||
continue;
|
||||
if( sd->autobonus3[i].atk_type != skill_id )
|
||||
continue;
|
||||
pc_exeautobonus(sd,&sd->autobonus3[i]);
|
||||
@ -2516,8 +2512,6 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
|
||||
for( i = 0; i < ARRAYLENGTH(dstsd->autobonus2); i++ ) {
|
||||
if( rnd()%1000 >= dstsd->autobonus2[i].rate )
|
||||
continue;
|
||||
if( dstsd->autobonus2[i].active != INVALID_TIMER )
|
||||
continue;
|
||||
if(!( ((dstsd->autobonus2[i].atk_type)&attack_type)&BF_WEAPONMASK &&
|
||||
((dstsd->autobonus2[i].atk_type)&attack_type)&BF_RANGEMASK &&
|
||||
((dstsd->autobonus2[i].atk_type)&attack_type)&BF_SKILLMASK))
|
||||
|
Loading…
x
Reference in New Issue
Block a user