static int skill_cell_overlap(struct block_list *bl, va_list ap) { int skillid; int *alive; struct skill_unit *unit; struct block_list *src; skillid = va_arg(ap,int); alive = va_arg(ap,int *); src = va_arg(ap,struct block_list *); unit = (struct skill_unit *)bl; if (unit == NULL || unit->group == NULL || (*alive) == 0) return 0; switch (skillid) { /*..other declaration that we don't care here..*/ case SA_VOLCANO: case SA_DELUGE: case SA_VIOLENTGALE: if(unit->group->skill_id == SO_WARMER){ //can't be put on top of warmer (*alive) = 0; return 1; } // The official implementation makes them fail to appear when casted on top of ANYTHING // but I wonder if they didn't actually meant to fail when casted on top of each other? // hence, I leave the alternate implementation here, commented. [Skotlex] if (unit->range <= 0) { (*alive) = 0; return 1; } /* switch (unit->group->skill_id) { //These cannot override each other. case SA_VOLCANO: case SA_DELUGE: case SA_VIOLENTGALE: (*alive) = 0; return 1; } */ break; /*..other declaration that we don't care here..*/ case SO_WARMER: //client display issue if (unit->group->skill_id == SA_LANDPROTECTOR) //can't be put on top of LP { //can't be place on top of LP (*alive) = 0; return 1; } break; } if (unit->group->skill_id == SA_LANDPROTECTOR && !(skill_get_inf2(skillid)&(INF2_SONG_DANCE|INF2_TRAP))) { //It deletes everything except songs/dances/traps (*alive) = 0; return 1; } return 0; }