viewing paste tetravortex | Diff

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
--- Z:/rathena-dev/trunk/src/map/skill.c    Sun May 05 21:45:07 2013
+++ T:/rathena/rathena-test/src/map/skill.c Sun May 05 21:43:55 2013
@@ -4388,12 +4388,6 @@
                    j++; //
                }
 
-           if( j < 4 )
-           { // Need 4 spheres minimum
-               clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
-               break;
-           }
-
            // Sphere Sort, this time from new to old
            for( i = 0; i <= j - 2; i++ )
                for( k = i + 1; k <= j - 1; k++ )
@@ -13142,13 +13136,14 @@
        //  }
        //  break;
 
-       case AB_ADORAMUS:
+       
+       case AB_ADORAMUS: // bugreport:7647 mistress card DOES remove requirements for gemstones from Adoramus and Comet -helvetica
        /**
         * Warlock
         **/
        case WL_COMET:
            if( skill_check_pc_partner(sd,skill_id,&skill_lv,1,0) <= 0
-               && ((i = pc_search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[i].amount < require.amount[0]) ) {
+               && ((i = pc_search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[i].amount < require.amount[0] || !sd->special_state.no_gemstone) ) {
                //clif_skill_fail(sd,skill_id,USESKILL_FAIL_NEED_ITEM,require.amount[0],require.itemid[0]);
                clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
                return 0;
@@ -13164,6 +13159,25 @@
                    clif_skill_fail(sd,skill_id,USESKILL_FAIL_SUMMON,0);
                    return 0;
                }
+           }
+           break;
+       case WL_TETRAVORTEX: // bugreport:7598 moved sphere check to precast to avoid triggering cooldown per official behavior -helvetica
+           if( sc ) {  
+               int j = 0;
+
+               for( i = SC_SPHERE_1; i <= SC_SPHERE_5; i++ )
+                   if( sc->data[i] ) {
+                       j++;
+                   }
+           
+               if( j < 4 ) { // Need 4 spheres minimum
+                   clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+                   return 0;
+               }
+           }
+           else { // no status at all? no spheres present
+               clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+               return 0;
            }
            break;
        /**
Viewed 538 times, submitted by Guest.