From 0a21b3250da89a79769f40ad8244de7898e549fe Mon Sep 17 00:00:00 2001 From: ultramage Date: Wed, 5 Mar 2008 16:23:02 +0000 Subject: * 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 --- src/map/npc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/map/npc.c') 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=,,, 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 { -- cgit v1.2.3-60-g2f50