summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-19 15:38:15 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-19 15:38:15 +0000
commita554c06fd91bbdc0879da51637f1a3f531b41036 (patch)
tree7d59399862729c40956eb35373e5ab9cbfc2e5bd /src/map/pc.c
parent923710723574716b15bc2e5f116b2741c5b9b6bd (diff)
downloadhercules-a554c06fd91bbdc0879da51637f1a3f531b41036.tar.gz
hercules-a554c06fd91bbdc0879da51637f1a3f531b41036.tar.bz2
hercules-a554c06fd91bbdc0879da51637f1a3f531b41036.tar.xz
hercules-a554c06fd91bbdc0879da51637f1a3f531b41036.zip
- Added some braces to clear up the code in pc_additem, even though I doubt it'll fix the problem :X
- Modified mobskill_use behaviour to pick a random starting point and check skills from that, rather than always checking from first to last. Fixes skills with high priority blocking skills lower down in the list from triggering. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6657 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 1797bb36b..10567e56d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2401,8 +2401,10 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
i = MAX_INVENTORY;
- if (!itemdb_isequip2(data)){ //Stackable
+ if (!itemdb_isequip2(data))
+ { //Stackable
for (i = 0; i < MAX_INVENTORY; i++)
+ {
if(sd->status.inventory[i].nameid == item_data->nameid &&
memcmp(&sd->status.inventory[i].card,&item_data->card,
sizeof(item_data->card))==0)
@@ -2413,6 +2415,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
clif_additem(sd,i,amount,0);
break;
}
+ }
}
if (i >= MAX_INVENTORY){
i = pc_search_inventory(sd,0);