Jump to content

Nyaniverse

Members
  • Posts

    51
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Nyaniverse

  1. Good day rAthena, I am currently trying to edit my Blast Mine to be able to get knocked back using Arrow Shower. ( I want it to behave like how it behaves in non-gvg maps) I am very new to source coding so I am not even sure on what I should work with, I know that I have to look at this particular area, but I am not sure on what or how I should proceed. Any tips or guide on what to do next would be really appreciated. /** * Checks if unit can be knocked back / stopped by skills. * @param bl: Object to check * @param flag * 0x1 - Offensive (not set: self skill, e.g. Backslide) * 0x2 - Knockback type (not set: Stop type, e.g. Ankle Snare) * 0x4 - Boss attack * 0x8 - Ignore target player 'special_state.no_knockback' * @return reason for immunity * UB_KNOCKABLE - can be knocked back / stopped * UB_NO_KNOCKBACK_MAP - at WOE/BG map * UB_MD_KNOCKBACK_IMMUNE - target is MD_KNOCKBACK_IMMUNE * UB_TARGET_BASILICA - target is in Basilica area (Pre-Renewal) * UB_TARGET_NO_KNOCKBACK - target has 'special_state.no_knockback' * UB_TARGET_TRAP - target is trap that cannot be knocked back */ enum e_unit_blown unit_blown_immune(struct block_list* bl, uint8 flag) { if ((flag&0x1) && (map_flag_gvg2(bl->m) || map_getmapflag(bl->m, MF_BATTLEGROUND)) && ((flag&0x2) || !(battle_config.skill_trap_type&0x1))) return UB_NO_KNOCKBACK_MAP; // No knocking back in WoE / BG switch (bl->type) { case BL_MOB: // Immune can't be knocked back if (((flag&0x1) && status_bl_has_mode(bl,MD_KNOCKBACKIMMUNE)) && ((flag&0x2) || !(battle_config.skill_trap_type&0x2))) return UB_MD_KNOCKBACK_IMMUNE; break; case BL_PC: { map_session_data *sd = BL_CAST(BL_PC, bl); #ifndef RENEWAL // Basilica caster can't be knocked-back by normal monsters. if( !(flag&0x4) && sd->sc.getSCE(SC_BASILICA) && sd->sc.getSCE(SC_BASILICA)->val4 == sd->bl.id) return UB_TARGET_BASILICA; #endif // Target has special_state.no_knockback (equip) if( (flag&(0x1|0x2)) && !(flag&0x8) && sd->special_state.no_knockback ) return UB_TARGET_NO_KNOCKBACK; } break; case BL_SKILL: { struct skill_unit* su = (struct skill_unit *)bl; // Trap cannot be knocked back if (su && su->group && skill_get_unit_flag(su->group->skill_id, UF_NOKNOCKBACK)) return UB_TARGET_TRAP; } break; } //Object can be knocked back / stopped return UB_KNOCKABLE; }
×
×
  • Create New...