|
@@ -2248,6 +2248,10 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
|
|
if( sd && !sd->autobonus.empty() )
|
|
if( sd && !sd->autobonus.empty() )
|
|
{
|
|
{
|
|
for(auto &it : sd->autobonus) {
|
|
for(auto &it : sd->autobonus) {
|
|
|
|
+ if( it == nullptr ){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (rnd()%1000 >= it->rate)
|
|
if (rnd()%1000 >= it->rate)
|
|
continue;
|
|
continue;
|
|
if (!(((it->atk_type)&attack_type)&BF_WEAPONMASK &&
|
|
if (!(((it->atk_type)&attack_type)&BF_WEAPONMASK &&
|
|
@@ -2333,6 +2337,8 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1
|
|
|
|
|
|
if( sd && !sd->autobonus3.empty() ) {
|
|
if( sd && !sd->autobonus3.empty() ) {
|
|
for (auto &it : sd->autobonus3) {
|
|
for (auto &it : sd->autobonus3) {
|
|
|
|
+ if (it == nullptr)
|
|
|
|
+ continue;
|
|
if (rnd()%1000 >= it->rate)
|
|
if (rnd()%1000 >= it->rate)
|
|
continue;
|
|
continue;
|
|
if (it->atk_type != skill_id)
|
|
if (it->atk_type != skill_id)
|
|
@@ -2556,6 +2562,10 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
|
|
//Autobonus when attacked
|
|
//Autobonus when attacked
|
|
if( dstsd && !status_isdead(bl) && !dstsd->autobonus2.empty() && !(skill_id && skill_get_nk(skill_id, NK_NODAMAGE)) ) {
|
|
if( dstsd && !status_isdead(bl) && !dstsd->autobonus2.empty() && !(skill_id && skill_get_nk(skill_id, NK_NODAMAGE)) ) {
|
|
for (auto &it : dstsd->autobonus2) {
|
|
for (auto &it : dstsd->autobonus2) {
|
|
|
|
+ if( it == nullptr ){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (rnd()%1000 >= it->rate)
|
|
if (rnd()%1000 >= it->rate)
|
|
continue;
|
|
continue;
|
|
if (!(((it->atk_type)&attack_type)&BF_WEAPONMASK &&
|
|
if (!(((it->atk_type)&attack_type)&BF_WEAPONMASK &&
|