summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-05 16:23:02 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-05 16:23:02 +0000
commit0a21b3250da89a79769f40ad8244de7898e549fe (patch)
tree7df611acf7b14628f62639ed6fdb6782553f34a6 /src/map/npc.c
parent53c1056d5f11c8ecd8caedae24765e922017fede (diff)
downloadhercules-0a21b3250da89a79769f40ad8244de7898e549fe.tar.gz
hercules-0a21b3250da89a79769f40ad8244de7898e549fe.tar.bz2
hercules-0a21b3250da89a79769f40ad8244de7898e549fe.tar.xz
hercules-0a21b3250da89a79769f40ad8244de7898e549fe.zip
* Added code to clear the Illusionary Shadow effect (followup to r12293)
* Added some trim() calls into mapflag code (followup to r12238) * Fixed mvp exp reward packet not working right for big values * Added dbghelpplug plugin entry to the plugins configuration file * Added conf setting for auction table name (see r12287) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12300 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index a62f5679a..fa4f510d6 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1631,10 +1631,7 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
char *p;
int x, y, dir, m, i;
struct npc_data *nd;
-
- enum npc_subtype type = SHOP;
- if( !strcasecmp(w2,"cashshop") )
- type = CASHSHOP;
+ enum npc_subtype type;
if( strcmp(w1,"-") == 0 )
{// 'floating' shop?
@@ -1642,7 +1639,7 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
m = -1;
}
else
- {
+ {// w1=<map name>,<x>,<y>,<facing>
char mapname[32];
if( sscanf(w1, "%31[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4
|| strchr(w4, ',') == NULL )
@@ -1654,6 +1651,11 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
m = map_mapname2mapid(mapname);
}
+ if( !strcasecmp(w2,"cashshop") )
+ type = CASHSHOP;
+ else
+ type = SHOP;
+
p = strchr(w4,',');
for( i = 0; i < ARRAYLENGTH(items) && p; ++i )
{
@@ -2720,7 +2722,7 @@ void npc_parsesrcfile(const char* filepath)
}
else if( strcmpi(w2,"mapflag") == 0 && count >= 3 )
{
- p = npc_parse_mapflag(w1, w2, w3, w4, p, buffer, filepath);
+ p = npc_parse_mapflag(w1, w2, trim(w3), trim(w4), p, buffer, filepath);
}
else
{