viewing paste Unknown #5866 | 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
Index: src/map/script.c
===================================================================
--- src/map/script.c    (revision 17326)
+++ src/map/script.c    (working copy)
@@ -6055,7 +6055,7 @@
  *------------------------------------------*/
 BUILDIN_FUNC(countitem)
 {
-   int nameid, i;
+   int i;
    int count = 0;
    struct item_data* id = NULL;
    struct script_data* data;
@@ -6081,13 +6081,13 @@
    }
 
    if(script_lastdata(st) == 2) { // For countitem() function
+       int nameid;
        nameid = id->nameid;
        for(i = 0; i < MAX_INVENTORY; i++)
            if(sd->status.inventory[i].nameid == nameid)
                count += sd->status.inventory[i].amount;
    } else { // For countitem2() function
        struct item tmp_it;
-       int iden, ref, attr, c1, c2, c3, c4;
        tmp_it.nameid = id->nameid;
        tmp_it.identify = script_getnum(st, 3);
        tmp_it.refine = script_getnum(st, 4);
@@ -9878,7 +9878,7 @@
    }
 
    //solving if script from npc or item
-   isitem = (nd && nd->bl.id == fake_nd->bl.id || rate != 2)?true:false;
+   isitem = (nd && nd->bl.id == fake_nd->bl.id || flag != 2)?true:false;
 
    switch(start_type) {
        case 1:
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 17326)
+++ src/map/skill.c (working copy)
@@ -1840,7 +1840,7 @@
 
    if( sd && status_isdead(bl) ) {
        int sp = 0, hp = 0;
-       if( attack_type&(BF_WEAPON|BF_SHORT) == (BF_WEAPON|BF_SHORT) ) {
+       if( (attack_type&(BF_WEAPON|BF_SHORT)) == (BF_WEAPON|BF_SHORT) ) {
            sp += sd->bonus.sp_gain_value;
            sp += sd->sp_gain_race[status_get_race(bl)];
            sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS];
Viewed 905 times, submitted by Guest.