summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-09 17:31:13 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-09 17:31:13 +0000
commitfaa7a02a489886461cd039cc306f1fc55d81daa5 (patch)
tree07ba43506b1c277d7033855c5495dd0e7444ae39 /src/map/itemdb.c
parentdde71c808130e2923b321561d3d772e0e734b725 (diff)
downloadhercules-faa7a02a489886461cd039cc306f1fc55d81daa5.tar.gz
hercules-faa7a02a489886461cd039cc306f1fc55d81daa5.tar.bz2
hercules-faa7a02a489886461cd039cc306f1fc55d81daa5.tar.xz
hercules-faa7a02a489886461cd039cc306f1fc55d81daa5.zip
- Changes to script buildin functions:
* functions checking if a player is attached as soon as possible. * functions that required a player attached and would crash if none was there terminate the script now. (others keep the current behaviour to maintain full backward compatibility) * removed the unused flag argument in guildskill. * bonus,bonus2,bonus3,bonus4 use the same function now (remains the same script-wise) * added an optional parameter to setcart,setfalcon,setriding so it's possible to remove the cart/falcon/mount or select a specific cart * other cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9636 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 2d4e9a3af..7d27f4fd0 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1141,7 +1141,7 @@ static int itemdb_readdb(void)
str[19] = p; //Script
np = strchr(p,'}');
-
+
while (np && np[1] && np[1] != ',')
np = strchr(np+1,'}'); //Jump close brackets until the next field is found.
if (!np || !np[1]) {
@@ -1152,13 +1152,13 @@ static int itemdb_readdb(void)
np[1] = '\0'; //Set end of script
id->script = parse_script(str[19],filename[i],lines,0);
np+=2; //Skip to next field
-
+
if(!np || (p=strchr(np,'{'))==NULL)
continue;
-
+
str[20] = p; //Equip Script
np = strchr(p,'}');
-
+
while (np && np[1] && np[1] != ',')
np = strchr(np+1,'}'); //Jump close brackets until the next field is found.
if (!np || !np[1]) {
@@ -1166,11 +1166,11 @@ static int itemdb_readdb(void)
id->equip_script = parse_script(str[20],filename[i],lines,0);
continue;
}
-
+
np[1] = '\0'; //Set end of script
id->equip_script = parse_script(str[20],filename[i],lines,0);
np+=2; //Skip comma, to next field
-
+
if(!np || (p=strchr(np,'{'))==NULL)
continue;
//Unequip script, last column.