viewing paste basilica | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 17288)
+++ src/map/skill.c (working copy)
@@ -9989,13 +9989,13 @@
        flag|=1;
        break;
    case HP_BASILICA:
-       if( sc->data[SC_BASILICA] )
-           status_change_end(src, SC_BASILICA, INVALID_TIMER); // Cancel Basilica
-       else { // Create Basilica. Start SC on caster. Unit timer start SC on others.
-           if( map_foreachinrange(skill_count_wos, src, 2, BL_MOB|BL_PC, src) ) {
-               if( sd )
-                   clif_skill_fail(sd,skill_id,USESKILL_FAIL,0);
-               return 1;
+       if( sc->data[SC_BASILICA] ) {
+           status_change_end(src, SC_BASILICA, INVALID_TIMER); // Cancel Basilica and return so requirement isn't consumed again
+           return 0;
+       } else { // Create Basilica. Start SC on caster. Unit timer start SC on others.
+           if( map_getcell(src->m, x, y, CELL_CHKLANDPROTECTOR) ) {
+               clif_skill_fail(sd,skill_id,USESKILL_FAIL,0);
+               return 0;
            }
            skill_clear_unitgroup(src);
            if( skill_unitsetting(src,skill_id,skill_lv,x,y,0) )
@@ -11244,6 +11244,9 @@
    if( skill_get_type(sg->skill_id) == BF_MAGIC && map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) && sg->skill_id != SA_LANDPROTECTOR )
        return 0; //AoE skills are ineffective. [Skotlex]
 
+   if( skill_get_inf2(sg->skill_id)&(INF2_SONG_DANCE|INF2_ENSEMBLE_SKILL) && map_getcell(bl->m, bl->x, bl->y, CELL_CHKBASILICA) )
+       return 0; //Songs don't work in Basilica
+
    sc = status_get_sc(bl);
 
    if (sc && sc->option&OPTION_HIDE && sg->skill_id != WZ_HEAVENDRIVE && sg->skill_id != WL_EARTHSTRAIN )
@@ -12960,6 +12966,26 @@
                }
                break;
            }
+       case HP_BASILICA:
+           if( !sc || (sc && !sc->data[SC_BASILICA])) {
+               if( sd ) {
+                   int i,x,y,range = skill_get_unit_range(skill_id,skill_lv)+1;
+                   int size = range*2+1;
+                   for( i=0;i<size*size;i++ ) {
+                       x = sd->bl.x+(i%size-range);
+                       y = sd->bl.y+(i/size-range);
+                       if( map_getcell(sd->bl.m,x,y,CELL_CHKWALL) ) {
+                           clif_skill_fail(sd,skill_id,USESKILL_FAIL,0);
+                           return 0;
+                       }
+                   }
+                   if( map_foreachinrange(skill_count_wos, &sd->bl, range, BL_ALL, &sd->bl) ) {
+                       clif_skill_fail(sd,skill_id,USESKILL_FAIL,0);
+                       return 0;
+                   }
+               }
+           }
+           break;
        case AM_TWILIGHT2:
        case AM_TWILIGHT3:
            if (!party_skill_check(sd, sd->status.party_id, skill_id, skill_lv))
Viewed 550 times, submitted by Guest.