Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 17256)
+++ src/map/skill.c (working copy)
@@ -11214,7 +11214,10 @@
nullpo_ret(sg=src->group);
nullpo_ret(ss=map_id2bl(sg->src_id));
- if( skill_get_type(sg->skill_id) == BF_MAGIC && map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) && sg->skill_id != SA_LANDPROTECTOR )
+ if(sg->skill_id != SA_LANDPROTECTOR
+ && skill_get_type(sg->skill_id) == BF_MAGIC
+ && map_foreachinrange(map_iscellchk, bl, 1, BL_SKILL, CELL_CHKLANDPROTECTOR) >= 8
+ )
return 0; //AoE skills are ineffective. [Skotlex]
sc = status_get_sc(bl);
@@ -15599,7 +15602,8 @@
nullpo_ret(group);
- if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP|INF2_NOLP)) && map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) )
+ if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP|INF2_NOLP))
+ && map_foreachinrange(map_iscellchk, bl, 1, BL_SKILL, CELL_CHKLANDPROTECTOR) >= 8 ) //chk if all around has lp
return 0; //AoE skills are ineffective. [Skotlex]
if( battle_check_target(&unit->bl,bl,group->target_flag) <= 0 )
@@ -15618,7 +15622,7 @@
struct skill_unit* unit = db_data2ptr(data);
struct skill_unit_group* group = unit->group;
unsigned int tick = va_arg(ap,unsigned int);
- bool dissonance;
+ bool dissonance;
struct block_list* bl = &unit->bl;
if( !unit->alive )
@@ -15824,7 +15828,7 @@
}
}
- if( dissonance ) skill_dance_switch(unit, 1);
+ if( dissonance ) skill_dance_switch(unit, 1);
return 0;
}
Index: src/map/map.c
===================================================================
--- src/map/map.c (revision 17256)
+++ src/map/map.c (working copy)
@@ -554,7 +554,7 @@
#ifdef CIRCULAR_AREA
&& check_distance_bl(center, bl, range)
#endif
- && bl_list_count < BL_LIST_MAX )
+ && bl_list_count < BL_LIST_MAX )
bl_list[ bl_list_count++ ] = bl;
}
}
@@ -579,6 +579,7 @@
map_freeblock_lock();
+
for( i = blockcount; i < bl_list_count; i++ )
if( bl_list[ i ]->prev ) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion.
va_start(ap, type);
@@ -2573,6 +2574,10 @@
map[m].cell[j].water = cell.water;
}
+int map_iscellchk(struct block_list *bl, va_list ap){
+ cell_chk cellchk = va_arg(ap, cell_chk);
+ return map_getcell(bl->m, bl->x, bl->y, cellchk)?1:0;
+}
/*==========================================
* Invisible Walls
*------------------------------------------*/
Index: src/map/map.h
===================================================================
--- src/map/map.h (revision 17256)
+++ src/map/map.h (working copy)
@@ -608,6 +608,7 @@
uint16 port;
};
+int map_iscellchk(struct block_list *bl, va_list ap);
int map_getcell(int16 m,int16 x,int16 y,cell_chk cellchk);
int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk);
void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag);