Updated Firewall cast check (#3556)
* Firewall should check at cast begin if unit max count has been reached. * Removed redundancy with the unit max count checks by merging into a single function. Thanks to @mrjnumber1!
This commit is contained in:
@@ -1998,6 +1998,8 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui
|
||||
if( sd ) {
|
||||
if( skill_isNotOk(skill_id, sd) || !skill_check_condition_castbegin(sd, skill_id, skill_lv) )
|
||||
return 0;
|
||||
if (skill_id == MG_FIREWALL && !skill_pos_maxcount_check(src, skill_x, skill_y, skill_id, skill_lv, BL_PC, true))
|
||||
return 0; // Special check for Firewall only
|
||||
}
|
||||
|
||||
if( (skill_id >= SC_MANHOLE && skill_id <= SC_FEINTBOMB) && map_getcell(src->m, skill_x, skill_y, CELL_CHKMAELSTROM) ) {
|
||||
|
||||
Reference in New Issue
Block a user