summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/map/atcommand.c4
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/npc.c14
-rw-r--r--src/map/status.c14
5 files changed, 27 insertions, 11 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index dbb9c1aed..702a7550d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8540,14 +8540,14 @@ static AtCommandInfo* get_atcommandinfo_byname(const char* name)
int i;
if( *name == atcommand_symbol ) name++; // for backwards compatibility
ARR_FIND( 0, ARRAYLENGTH(atcommand_info), i, strcmpi(atcommand_info[i].command, name) == 0 );
- return ( i != ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
+ return ( i < ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
}
static AtCommandInfo* get_atcommandinfo_byfunc(const AtCommandFunc func)
{
int i;
ARR_FIND( 0, ARRAYLENGTH(atcommand_info), i, atcommand_info[i].func == func );
- return ( i != ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
+ return ( i < ARRAYLENGTH(atcommand_info) ) ? &atcommand_info[i] : NULL;
}
diff --git a/src/map/clif.c b/src/map/clif.c
index e3cb75054..c815fd7b3 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6009,7 +6009,7 @@ int clif_mvp_item(struct map_session_data *sd,int nameid)
/*==========================================
* MVPŒoŒ±’lŠ“¾
*------------------------------------------*/
-int clif_mvp_exp(struct map_session_data *sd,unsigned long exp)
+int clif_mvp_exp(struct map_session_data *sd, unsigned int exp)
{
int fd;
@@ -6018,7 +6018,7 @@ int clif_mvp_exp(struct map_session_data *sd,unsigned long exp)
fd=sd->fd;
WFIFOHEAD(fd,packet_len(0x10b));
WFIFOW(fd,0)=0x10b;
- WFIFOL(fd,2)=exp;
+ WFIFOL(fd,2)=cap_value(exp,0,INT_MAX);
WFIFOSET(fd,packet_len(0x10b));
return 0;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 51dc0c417..d8714554d 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -262,7 +262,7 @@ int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv);
int clif_mvp_effect(struct map_session_data *sd);
int clif_mvp_item(struct map_session_data *sd,int nameid);
-int clif_mvp_exp(struct map_session_data *sd,unsigned long exp);
+int clif_mvp_exp(struct map_session_data *sd, unsigned int exp);
void clif_changed_dir(struct block_list *bl, int area);
// vending
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
{
diff --git a/src/map/status.c b/src/map/status.c
index 11198f28f..453c0b40e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6060,6 +6060,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
sc->opt3 |= 0x10000;
opt_flag = 0;
break;
+// TODO: unknown option (looks like the aura of biolab mobs)
+// case ???:
+// sc->opt3 |= 0x20000;
+// opt_flag = 0;
+// break;
//OPTION
case SC_HIDING:
sc->option |= OPTION_HIDE;
@@ -6637,6 +6642,10 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
sc->opt3 &= ~0x2000;
opt_flag = 0;
break;
+ case SC_BUNSINJYUTSU:
+ sc->opt3 &= ~0x4000;
+ opt_flag = 0;
+ break;
case SC_SPIRIT:
sc->opt3 &= ~0x8000;
opt_flag = 0;
@@ -6645,6 +6654,11 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
sc->opt3 &= ~0x10000;
opt_flag = 0;
break;
+// TODO:
+// case ???:
+// sc->opt3 &= ~0x20000;
+// opt_flag = 0;
+// break;
default:
opt_flag = 0;
}