summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 8d07ca0d1..777179507 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -278,7 +278,7 @@ void disp_error_message2(const char *mes,const char *pos,int report)
script->error_report = report;
longjmp( script->error_jump, 1 );
}
-#define disp_error_message(mes,pos) script->disp_error_message2(mes,pos,1)
+#define disp_error_message(mes,pos) (script->disp_error_message2((mes),(pos),1))
void disp_warning_message(const char *mes, const char *pos) {
script->warning(script->parser_current_src,script->parser_current_file,script->parser_current_line,mes,pos);
@@ -3986,9 +3986,6 @@ const char *script_getfuncname(struct script_state *st) {
// buildin functions
//
-#define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args }
-#define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args }
-
/////////////////////////////////////////////////////////////////////
// NPC interaction
//
@@ -8540,7 +8537,7 @@ BUILDIN(monster)
int class_ = script_getnum(st,6);
int amount = script_getnum(st,7);
const char* event = "";
- unsigned int size = SZ_SMALL;
+ unsigned int size = SZ_MEDIUM;
unsigned int ai = AI_NONE;
int mob_id;
@@ -8650,7 +8647,7 @@ BUILDIN(areamonster)
int class_ = script_getnum(st,8);
int amount = script_getnum(st,9);
const char* event = "";
- unsigned int size = SZ_SMALL;
+ unsigned int size = SZ_MEDIUM;
unsigned int ai = AI_NONE;
int mob_id;
@@ -12980,7 +12977,7 @@ BUILDIN(summon)
clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
- md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_SMALL, AI_NONE);
+ md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_MEDIUM, AI_NONE);
if (md) {
md->master_id=sd->bl.id;
md->special_state.ai = AI_ATTACK;
@@ -13024,7 +13021,7 @@ BUILDIN(isequippedcnt)
}
for (i=0; id!=0; i++) {
- script_fetch(st,i+2, id) else id = 0;
+ script_fetch(st,i+2, id);
if (id <= 0)
continue;
@@ -13082,7 +13079,7 @@ BUILDIN(isequipped)
setitem_hash = sd->bonus.setitem_hash;
setitem_hash2 = sd->bonus.setitem_hash2;
for (i=0; id!=0; i++) {
- script_fetch(st,i+2, id) else id = 0;
+ script_fetch(st,i+2, id);
if (id <= 0)
continue;
flag = 0;
@@ -13156,7 +13153,7 @@ BUILDIN(cardscnt) {
sd = script->rid2sd(st);
for (i=0; id!=0; i++) {
- script_fetch(st,i+2, id) else id = 0;
+ script_fetch(st,i+2, id);
if (id <= 0)
continue;
@@ -17969,6 +17966,8 @@ bool script_hp_add(char *name, char *args, bool (*func)(struct script_state *st)
return true;
}
+#define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args }
+#define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args }
void script_parse_builtin(void) {
struct script_function BUILDIN[] = {
// NPC interaction
@@ -18512,6 +18511,8 @@ void script_parse_builtin(void) {
}
}
}
+#undef BUILDIN_DEF
+#undef BUILDIN_DEF2
void script_label_add(int key, int pos) {
int idx = script->label_count;