Changeset 5106


Ignore:
Timestamp:
Dec 20, 2011 5:51:20 AM (5 months ago)
Author:
MELERIX
Message:

BETA/STABLE: Updating FuncEnchant? (missing bonus for two-hand weapons and few improvements to reduce code).

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/skills/funcs/FuncEnchant.java

    r5083 r5106  
    8080                        { 
    8181                                case L2Item.CRYSTAL_S: 
     82                                case L2Item.CRYSTAL_S80: 
     83                                case L2Item.CRYSTAL_S84: 
     84                                        // M. Atk. increases by 4 for all weapons. 
     85                                        // Starting at +4, M. Atk. bonus double. 
    8286                                        env.value += 4 * enchant + 8 * overenchant; 
    8387                                        break; 
    8488                                case L2Item.CRYSTAL_A: 
     89                                case L2Item.CRYSTAL_B: 
     90                                case L2Item.CRYSTAL_C: 
     91                                        // M. Atk. increases by 3 for all weapons. 
     92                                        // Starting at +4, M. Atk. bonus double. 
    8593                                        env.value += 3 * enchant + 6 * overenchant; 
    8694                                        break; 
    87                                 case L2Item.CRYSTAL_B: 
    88                                         env.value += 3 * enchant + 6 * overenchant; 
    89                                         break; 
    90                                 case L2Item.CRYSTAL_C: 
    91                                         env.value += 3 * enchant + 6 * overenchant; 
    92                                         break; 
    9395                                case L2Item.CRYSTAL_D: 
     96                                case L2Item.CRYSTAL_NONE: 
     97                                        // M. Atk. increases by 2 for all weapons. Starting at +4, M. Atk. bonus double. 
     98                                        // Starting at +4, M. Atk. bonus double. 
    9499                                        env.value += 2 * enchant + 4 * overenchant; 
    95100                                        break; 
     
    106111                        { 
    107112                                case L2Item.CRYSTAL_S: 
    108                                         switch(type) 
    109                                         { 
    110                                                 case BOW: 
    111                                                 case CROSSBOW: 
     113                                case L2Item.CRYSTAL_S80: 
     114                                case L2Item.CRYSTAL_S84: 
     115                                        switch(type) 
     116                                        { 
     117                                                case BOW: 
     118                                                case CROSSBOW: 
     119                                                        // P. Atk. increases by 10 for bows. 
     120                                                        // Starting at +4, P. Atk. bonus double. 
    112121                                                        env.value += 10 * enchant + 20 * overenchant; 
    113122                                                        break; 
    114                                                 default: 
     123                                                case BIGSWORD: 
     124                                                case BIGBLUNT: 
     125                                                case DUAL: 
     126                                                case DUALFIST: 
     127                                                case DUALDAGGER: 
     128                                                        // P. Atk. increases by 6 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons. 
     129                                                        // Starting at +4, P. Atk. bonus double. 
     130                                                        env.value += 6 * enchant + 12 * overenchant; 
     131                                                        break; 
     132                                                default: 
     133                                                        // P. Atk. increases by 5 for one-handed swords, one-handed blunts, daggers, spears, and other weapons. 
     134                                                        // Starting at +4, P. Atk. bonus double. 
    115135                                                        env.value += 5 * enchant + 10 * overenchant; 
    116136                                                        break; 
     
    122142                                                case BOW: 
    123143                                                case CROSSBOW: 
     144                                                        // P. Atk. increases by 8 for bows. 
     145                                                        // Starting at +4, P. Atk. bonus double. 
    124146                                                        env.value += 8 * enchant + 16 * overenchant; 
    125147                                                        break; 
    126                                                 default: 
     148                                                case BIGSWORD: 
     149                                                case BIGBLUNT: 
     150                                                case DUAL: 
     151                                                case DUALFIST: 
     152                                                case DUALDAGGER: 
     153                                                        // P. Atk. increases by 5 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons. 
     154                                                        // Starting at +4, P. Atk. bonus double. 
     155                                                        env.value += 5 * enchant + 10 * overenchant; 
     156                                                        break; 
     157                                                default: 
     158                                                        // P. Atk. increases by 4 for one-handed swords, one-handed blunts, daggers, spears, and other weapons. 
     159                                                        // Starting at +4, P. Atk. bonus double. 
    127160                                                        env.value += 4 * enchant + 8 * overenchant; 
    128161                                                        break; 
     
    130163                                        break; 
    131164                                case L2Item.CRYSTAL_B: 
    132                                         switch(type) 
    133                                         { 
    134                                                 case BOW: 
    135                                                 case CROSSBOW: 
     165                                case L2Item.CRYSTAL_C: 
     166                                        switch(type) 
     167                                        { 
     168                                                case BOW: 
     169                                                case CROSSBOW: 
     170                                                        // P. Atk. increases by 6 for bows. 
     171                                                        // Starting at +4, P. Atk. bonus double. 
    136172                                                        env.value += 6 * enchant + 12 * overenchant; 
    137173                                                        break; 
    138                                                 default: 
    139                                                         env.value += 3 * enchant + 6 * overenchant; 
    140                                                         break; 
    141                                         } 
    142                                         break; 
    143                                 case L2Item.CRYSTAL_C: 
    144                                         switch(type) 
    145                                         { 
    146                                                 case BOW: 
    147                                                 case CROSSBOW: 
    148                                                         env.value += 6 * enchant + 12 * overenchant; 
    149                                                         break; 
    150                                                 default: 
     174                                                case BIGSWORD: 
     175                                                case BIGBLUNT: 
     176                                                case DUAL: 
     177                                                case DUALFIST: 
     178                                                case DUALDAGGER: 
     179                                                        // P. Atk. increases by 4 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons. 
     180                                                        // Starting at +4, P. Atk. bonus double. 
     181                                                        env.value += 4 * enchant + 8 * overenchant; 
     182                                                        break; 
     183                                                default: 
     184                                                        // P. Atk. increases by 3 for one-handed swords, one-handed blunts, daggers, spears, and other weapons. 
     185                                                        // Starting at +4, P. Atk. bonus double. 
    151186                                                        env.value += 3 * enchant + 6 * overenchant; 
    152187                                                        break; 
     
    160195                                                case CROSSBOW: 
    161196                                                { 
     197                                                        // Bows increase by 4. 
     198                                                        // Starting at +4, P. Atk. bonus double. 
    162199                                                        env.value += 4 * enchant + 8 * overenchant; 
    163200                                                        break; 
    164201                                                } 
    165202                                                default: 
     203                                                        // P. Atk. increases by 2 for all weapons with the exception of bows. 
     204                                                        // Starting at +4, P. Atk. bonus double. 
    166205                                                        env.value += 2 * enchant + 4 * overenchant; 
    167206                                                        break; 
  • trunk/L2J_Server/java/com/l2jserver/gameserver/skills/funcs/FuncEnchant.java

    r4417 r5106  
    8080                        { 
    8181                                case L2Item.CRYSTAL_S: 
     82                                case L2Item.CRYSTAL_S80: 
     83                                case L2Item.CRYSTAL_S84: 
     84                                        // M. Atk. increases by 4 for all weapons. 
     85                                        // Starting at +4, M. Atk. bonus double. 
    8286                                        env.value += 4 * enchant + 8 * overenchant; 
    8387                                        break; 
    8488                                case L2Item.CRYSTAL_A: 
     89                                case L2Item.CRYSTAL_B: 
     90                                case L2Item.CRYSTAL_C: 
     91                                        // M. Atk. increases by 3 for all weapons. 
     92                                        // Starting at +4, M. Atk. bonus double. 
    8593                                        env.value += 3 * enchant + 6 * overenchant; 
    8694                                        break; 
    87                                 case L2Item.CRYSTAL_B: 
    88                                         env.value += 3 * enchant + 6 * overenchant; 
    89                                         break; 
    90                                 case L2Item.CRYSTAL_C: 
    91                                         env.value += 3 * enchant + 6 * overenchant; 
    92                                         break; 
    9395                                case L2Item.CRYSTAL_D: 
     96                                case L2Item.CRYSTAL_NONE: 
     97                                        // M. Atk. increases by 2 for all weapons. Starting at +4, M. Atk. bonus double. 
     98                                        // Starting at +4, M. Atk. bonus double. 
    9499                                        env.value += 2 * enchant + 4 * overenchant; 
    95100                                        break; 
     
    106111                        { 
    107112                                case L2Item.CRYSTAL_S: 
    108                                         switch(type) 
    109                                         { 
    110                                                 case BOW: 
    111                                                 case CROSSBOW: 
     113                                case L2Item.CRYSTAL_S80: 
     114                                case L2Item.CRYSTAL_S84: 
     115                                        switch(type) 
     116                                        { 
     117                                                case BOW: 
     118                                                case CROSSBOW: 
     119                                                        // P. Atk. increases by 10 for bows. 
     120                                                        // Starting at +4, P. Atk. bonus double. 
    112121                                                        env.value += 10 * enchant + 20 * overenchant; 
    113122                                                        break; 
    114                                                 default: 
     123                                                case BIGSWORD: 
     124                                                case BIGBLUNT: 
     125                                                case DUAL: 
     126                                                case DUALFIST: 
     127                                                case DUALDAGGER: 
     128                                                        // P. Atk. increases by 6 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons. 
     129                                                        // Starting at +4, P. Atk. bonus double. 
     130                                                        env.value += 6 * enchant + 12 * overenchant; 
     131                                                        break; 
     132                                                default: 
     133                                                        // P. Atk. increases by 5 for one-handed swords, one-handed blunts, daggers, spears, and other weapons. 
     134                                                        // Starting at +4, P. Atk. bonus double. 
    115135                                                        env.value += 5 * enchant + 10 * overenchant; 
    116136                                                        break; 
     
    122142                                                case BOW: 
    123143                                                case CROSSBOW: 
     144                                                        // P. Atk. increases by 8 for bows. 
     145                                                        // Starting at +4, P. Atk. bonus double. 
    124146                                                        env.value += 8 * enchant + 16 * overenchant; 
    125147                                                        break; 
    126                                                 default: 
     148                                                case BIGSWORD: 
     149                                                case BIGBLUNT: 
     150                                                case DUAL: 
     151                                                case DUALFIST: 
     152                                                case DUALDAGGER: 
     153                                                        // P. Atk. increases by 5 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons. 
     154                                                        // Starting at +4, P. Atk. bonus double. 
     155                                                        env.value += 5 * enchant + 10 * overenchant; 
     156                                                        break; 
     157                                                default: 
     158                                                        // P. Atk. increases by 4 for one-handed swords, one-handed blunts, daggers, spears, and other weapons. 
     159                                                        // Starting at +4, P. Atk. bonus double. 
    127160                                                        env.value += 4 * enchant + 8 * overenchant; 
    128161                                                        break; 
     
    130163                                        break; 
    131164                                case L2Item.CRYSTAL_B: 
    132                                         switch(type) 
    133                                         { 
    134                                                 case BOW: 
    135                                                 case CROSSBOW: 
     165                                case L2Item.CRYSTAL_C: 
     166                                        switch(type) 
     167                                        { 
     168                                                case BOW: 
     169                                                case CROSSBOW: 
     170                                                        // P. Atk. increases by 6 for bows. 
     171                                                        // Starting at +4, P. Atk. bonus double. 
    136172                                                        env.value += 6 * enchant + 12 * overenchant; 
    137173                                                        break; 
    138                                                 default: 
    139                                                         env.value += 3 * enchant + 6 * overenchant; 
    140                                                         break; 
    141                                         } 
    142                                         break; 
    143                                 case L2Item.CRYSTAL_C: 
    144                                         switch(type) 
    145                                         { 
    146                                                 case BOW: 
    147                                                 case CROSSBOW: 
    148                                                         env.value += 6 * enchant + 12 * overenchant; 
    149                                                         break; 
    150                                                 default: 
     174                                                case BIGSWORD: 
     175                                                case BIGBLUNT: 
     176                                                case DUAL: 
     177                                                case DUALFIST: 
     178                                                case DUALDAGGER: 
     179                                                        // P. Atk. increases by 4 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons. 
     180                                                        // Starting at +4, P. Atk. bonus double. 
     181                                                        env.value += 4 * enchant + 8 * overenchant; 
     182                                                        break; 
     183                                                default: 
     184                                                        // P. Atk. increases by 3 for one-handed swords, one-handed blunts, daggers, spears, and other weapons. 
     185                                                        // Starting at +4, P. Atk. bonus double. 
    151186                                                        env.value += 3 * enchant + 6 * overenchant; 
    152187                                                        break; 
     
    160195                                                case CROSSBOW: 
    161196                                                { 
     197                                                        // Bows increase by 4. 
     198                                                        // Starting at +4, P. Atk. bonus double. 
    162199                                                        env.value += 4 * enchant + 8 * overenchant; 
    163200                                                        break; 
    164201                                                } 
    165202                                                default: 
     203                                                        // P. Atk. increases by 2 for all weapons with the exception of bows. 
     204                                                        // Starting at +4, P. Atk. bonus double. 
    166205                                                        env.value += 2 * enchant + 4 * overenchant; 
    167206                                                        break; 
Note: See TracChangeset for help on using the changeset viewer.