viewing paste Unknown #5452 | 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
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -9345,14 +9345,8 @@
 {
        int diff, rate = 100, i;
 
-       nullpo_ret(sd);
        nullpo_ret(md);
 
-       diff = md->level - sd->status.base_level;
-
-       if( diff < 0 )
-               diff = MAX_LEVEL + ( ~diff + 1 );
-
        for(i=0; i<RC_MAX; i++){
                int tmp;
 
@@ -9369,6 +9363,23 @@
                }
        }
 
+       return _pc_level_penalty_mod(sd,md->level,i,type);
+}
+
+int _pc_level_penalty_mod(struct map_session_data *sd, int lvl, int race, int type)
+{
+       int diff, rate = 100, i;
+
+       nullpo_ret(sd);
+
+       diff = lvl - sd->status.base_level;
+
+       if( diff < 0 )
+               diff = MAX_LEVEL + ( ~diff + 1 );
+
+       if( (tmp=level_penalty[type][i][diff]) > 0 ){
+               rate = tmp;
+
        return rate;
 }
 #endif
Viewed 595 times, submitted by lighta.