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];