summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--3rdparty/libconfig/extra/gen/Makefile1
-rw-r--r--3rdparty/libconfig/extra/gen/Makefile.in1
-rw-r--r--3rdparty/libconfig/extra/gen/clangwarnings.patch36
-rw-r--r--3rdparty/libconfig/extra/gen/scanner.l12
-rw-r--r--3rdparty/libconfig/grammar.c4
-rw-r--r--3rdparty/libconfig/scanctx.c2
-rw-r--r--3rdparty/libconfig/scanner.c117
-rw-r--r--3rdparty/libconfig/scanner.h2
-rw-r--r--Hercules.xcodeproj/project.pbxproj1618
-rw-r--r--Hercules.xcodeproj/project.xcworkspace/contents.xcworkspacedata7
-rw-r--r--Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking.xcscheme59
-rw-r--r--Hercules.xcodeproj/xcshareddata/xcschemes/char-server.xcscheme86
-rw-r--r--Hercules.xcodeproj/xcshareddata/xcschemes/db2sql.xcscheme126
-rw-r--r--Hercules.xcodeproj/xcshareddata/xcschemes/login-server.xcscheme86
-rw-r--r--Hercules.xcodeproj/xcshareddata/xcschemes/map-server.xcscheme86
-rw-r--r--Hercules.xcodeproj/xcshareddata/xcschemes/mapcache.xcscheme86
-rw-r--r--Hercules.xcodeproj/xcshareddata/xcschemes/sample.xcscheme59
-rw-r--r--conf/battle/misc.conf15
-rw-r--r--conf/char-server.conf2
-rw-r--r--conf/messages.conf3
-rwxr-xr-xconfigure893
-rw-r--r--configure.in196
-rw-r--r--db/pre-re/item_db.conf16
-rw-r--r--db/pre-re/item_group.conf15
-rw-r--r--db/re/item_db.conf16
-rw-r--r--db/re/item_group.conf15
-rw-r--r--db2sql.bat29
-rw-r--r--npc/battleground/kvm/kvm01.txt2
-rw-r--r--npc/battleground/kvm/kvm02.txt2
-rw-r--r--npc/battleground/kvm/kvm03.txt2
-rw-r--r--npc/custom/quests/bandit_beard.txt4
-rw-r--r--npc/events/gdevent_aru.txt4
-rw-r--r--npc/events/gdevent_sch.txt4
-rw-r--r--npc/events/god_se_festival.txt2
-rw-r--r--npc/instances/EndlessTower.txt10
-rw-r--r--npc/jobs/2-1/assassin.txt6
-rw-r--r--npc/jobs/2-1/hunter.txt2
-rw-r--r--npc/jobs/2-2/rogue.txt2
-rw-r--r--npc/pre-re/mobs/dungeons/lhz_dun.txt4
-rw-r--r--npc/quests/bard_quest.txt2
-rw-r--r--npc/quests/quests_morocc.txt2
-rw-r--r--npc/quests/the_sign_quest.txt2
-rw-r--r--sql-files/item_db.sql652
-rw-r--r--sql-files/item_db_re.sql744
-rw-r--r--src/char/char.c99
-rw-r--r--src/char/int_guild.c30
-rw-r--r--src/char/int_party.c2
-rw-r--r--src/char/int_quest.c235
-rw-r--r--src/char/int_quest.h3
-rw-r--r--src/char/int_storage.c12
-rw-r--r--src/char/inter.c2
-rw-r--r--src/common/HPM.c69
-rw-r--r--src/common/HPM.h15
-rw-r--r--src/common/HPMi.h11
-rw-r--r--src/common/Makefile.in9
-rw-r--r--src/common/cbasetypes.h26
-rw-r--r--src/common/core.c3
-rw-r--r--src/common/db.c8
-rw-r--r--src/common/db.h6
-rw-r--r--src/common/ers.c4
-rw-r--r--src/common/ers.h9
-rw-r--r--src/common/grfio.c23
-rw-r--r--src/common/malloc.c35
-rw-r--r--src/common/malloc.h4
-rw-r--r--src/common/mapindex.c92
-rw-r--r--src/common/mapindex.h54
-rw-r--r--src/common/mmo.h21
-rw-r--r--src/common/nullpo.c94
-rw-r--r--src/common/nullpo.h302
-rw-r--r--src/common/socket.c12
-rw-r--r--src/common/sql.c4
-rw-r--r--src/common/strlib.c19
-rw-r--r--src/common/timer.c8
-rw-r--r--src/config/classes/general.h10
-rw-r--r--src/config/renewal.h1
-rw-r--r--src/login/account_sql.c7
-rw-r--r--src/login/login.c10
-rw-r--r--src/login/login.h4
-rw-r--r--src/map/atcommand.c267
-rw-r--r--src/map/battle.c87
-rw-r--r--src/map/battle.h4
-rw-r--r--src/map/battleground.c8
-rw-r--r--src/map/battleground.h4
-rw-r--r--src/map/buyingstore.c10
-rw-r--r--src/map/chat.c8
-rw-r--r--src/map/clif.c246
-rw-r--r--src/map/clif.h37
-rw-r--r--src/map/guild.c26
-rw-r--r--src/map/guild.h2
-rw-r--r--src/map/homunculus.c2
-rw-r--r--src/map/instance.c6
-rw-r--r--src/map/intif.c129
-rw-r--r--src/map/intif.h10
-rw-r--r--src/map/irc-bot.c9
-rw-r--r--src/map/irc-bot.h2
-rw-r--r--src/map/itemdb.c40
-rw-r--r--src/map/itemdb.h1
-rw-r--r--src/map/mail.c8
-rw-r--r--src/map/map.c64
-rw-r--r--src/map/map.h6
-rw-r--r--src/map/mapreg_sql.c2
-rw-r--r--src/map/mob.c46
-rw-r--r--src/map/mob.h4
-rw-r--r--src/map/npc.c118
-rw-r--r--src/map/party.c4
-rw-r--r--src/map/party.h10
-rw-r--r--src/map/path.c2
-rw-r--r--src/map/pc.c174
-rw-r--r--src/map/pc.h23
-rw-r--r--src/map/pc_groups.c28
-rw-r--r--src/map/pet.c19
-rw-r--r--src/map/quest.c413
-rw-r--r--src/map/quest.h22
-rw-r--r--src/map/script.c734
-rw-r--r--src/map/script.h38
-rw-r--r--src/map/skill.c666
-rw-r--r--src/map/skill.h2
-rw-r--r--src/map/status.c202
-rw-r--r--src/map/status.h17
-rw-r--r--src/map/storage.c12
-rw-r--r--src/map/trade.c8
-rw-r--r--src/map/unit.c17
-rw-r--r--src/map/vending.c6
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc44
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc11
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc495
-rw-r--r--src/plugins/Makefile.in13
-rw-r--r--src/plugins/db2sql.c10
-rw-r--r--src/plugins/sample.c13
-rw-r--r--src/tool/Makefile.in4
-rw-r--r--src/tool/mapcache.c2
-rw-r--r--vcproj-10/mapcache.vcxproj8
-rw-r--r--vcproj-10/mapcache.vcxproj.filters6
-rw-r--r--vcproj-11/mapcache.vcxproj6
-rw-r--r--vcproj-11/mapcache.vcxproj.filters10
-rw-r--r--vcproj-12/mapcache.vcxproj2
-rw-r--r--vcproj-12/mapcache.vcxproj.filters10
-rw-r--r--vcproj-9/mapcache.vcproj8
139 files changed, 7089 insertions, 3378 deletions
diff --git a/.gitignore b/.gitignore
index 773005315..c43c27e31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,7 +36,12 @@ Thumbs.db
/plugins/
#OSX Xcode project user-sensitive-stuff
+/DerivedData
/Hercules
+/build
+/Hercules.xcodeproj/xcuserdata
+/Hercules.xcodeproj/project.xcworkspace/xcuserdata/
+/Hercules.xcodeproj/project.xcworkspace/xcshareddata/Hercules.xccheckout
# /3rdparty/libconfig/
/3rdparty/libconfig/Makefile
diff --git a/3rdparty/libconfig/extra/gen/Makefile b/3rdparty/libconfig/extra/gen/Makefile
index b4d2db841..0b2e0655e 100644
--- a/3rdparty/libconfig/extra/gen/Makefile
+++ b/3rdparty/libconfig/extra/gen/Makefile
@@ -31,6 +31,7 @@ AM_YFLAGS = -d -p $(PARSER_PREFIX)
AM_LFLAGS = --nounistd --header-file=scanner.h --prefix=$(PARSER_PREFIX)
all: $(BUILT_SOURCES)
+ @patch -p1 < clangwarnings.patch
.SUFFIXES: .c .l .y
diff --git a/3rdparty/libconfig/extra/gen/Makefile.in b/3rdparty/libconfig/extra/gen/Makefile.in
index 5850c2392..0bd4efd62 100644
--- a/3rdparty/libconfig/extra/gen/Makefile.in
+++ b/3rdparty/libconfig/extra/gen/Makefile.in
@@ -31,6 +31,7 @@ AM_YFLAGS = -d -p $(PARSER_PREFIX)
AM_LFLAGS = --nounistd --header-file=scanner.h --prefix=$(PARSER_PREFIX)
all: $(BUILT_SOURCES)
+ @patch -p1 < clangwarnings.patch
.SUFFIXES: .c .l .y
diff --git a/3rdparty/libconfig/extra/gen/clangwarnings.patch b/3rdparty/libconfig/extra/gen/clangwarnings.patch
new file mode 100644
index 000000000..65aef9a08
--- /dev/null
+++ b/3rdparty/libconfig/extra/gen/clangwarnings.patch
@@ -0,0 +1,36 @@
+diff --git a/grammar.c b/grammar.c
+index 3595578..26444f8 100644
+--- a/grammar.c
++++ b/grammar.c
+@@ -1187,9 +1187,7 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx,
+ YYUSE (ctx);
+ YYUSE (scan_ctx);
+
+- if (!yymsg)
+- yymsg = "Deleting";
+- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
++ YY_SYMBOL_PRINT (yymsg ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+diff --git a/scanner.c b/scanner.c
+index aebd34c..c3a717f 100644
+--- a/scanner.c
++++ b/scanner.c
+@@ -1500,6 +1500,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
++#ifndef __clang_analyzer__
++ // FIXME: Clang's static analyzer complains about leaking the result of libconfig_yyrealloc
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+@@ -1507,6 +1509,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
++#endif // __clang_analyzer__
+
+ yyg->yy_n_chars += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
diff --git a/3rdparty/libconfig/extra/gen/scanner.l b/3rdparty/libconfig/extra/gen/scanner.l
index 4b3048fab..66364e019 100644
--- a/3rdparty/libconfig/extra/gen/scanner.l
+++ b/3rdparty/libconfig/extra/gen/scanner.l
@@ -86,6 +86,13 @@ static unsigned long long fromhex(const char *s)
#endif /* __MINGW32__ */
}
+static int fromihex(const char *s) {
+ unsigned long l = strtoul(s, NULL, 16);
+ if (l > INT32_MAX)
+ l = INT32_MAX;
+ return (int)l;
+}
+
%}
true [Tt][Rr][Uu][Ee]
@@ -178,10 +185,7 @@ include_open ^[ \t]*@include[ \t]+\"
{float} { yylval->fval = atof(yytext); return(TOK_FLOAT); }
{integer} { yylval->ival = atoi(yytext); return(TOK_INTEGER); }
{integer64} { yylval->llval = atoll(yytext); return(TOK_INTEGER64); }
-{hex} {
- yylval->ival = strtoul(yytext, NULL, 16);
- return(TOK_HEX);
- }
+{hex} { yylval->ival = fromihex(yytext); return(TOK_HEX); }
{hex64} { yylval->llval = fromhex(yytext); return(TOK_HEX64); }
\[ { return(TOK_ARRAY_START); }
\] { return(TOK_ARRAY_END); }
diff --git a/3rdparty/libconfig/grammar.c b/3rdparty/libconfig/grammar.c
index 3595578de..26444f816 100644
--- a/3rdparty/libconfig/grammar.c
+++ b/3rdparty/libconfig/grammar.c
@@ -1187,9 +1187,7 @@ yydestruct (yymsg, yytype, yyvaluep, scanner, ctx, scan_ctx)
YYUSE (ctx);
YYUSE (scan_ctx);
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
switch (yytype)
{
diff --git a/3rdparty/libconfig/scanctx.c b/3rdparty/libconfig/scanctx.c
index 7d7f4994c..e057d50bc 100644
--- a/3rdparty/libconfig/scanctx.c
+++ b/3rdparty/libconfig/scanctx.c
@@ -39,6 +39,7 @@ static const char *err_include_too_deep = "include file nesting too deep";
static const char *__scanctx_add_filename(struct scan_context *ctx,
const char *filename)
{
+#ifndef __clang_analyzer__ // FIXME: Clang's static analyzer doesn't like this
unsigned int count = ctx->num_filenames;
const char **f;
@@ -60,6 +61,7 @@ static const char *__scanctx_add_filename(struct scan_context *ctx,
ctx->filenames[ctx->num_filenames] = filename;
++ctx->num_filenames;
+#endif // __clang_analyzer__
return(filename);
}
diff --git a/3rdparty/libconfig/scanner.c b/3rdparty/libconfig/scanner.c
index 6de72c2fd..c3a717ff0 100644
--- a/3rdparty/libconfig/scanner.c
+++ b/3rdparty/libconfig/scanner.c
@@ -625,8 +625,15 @@ static unsigned long long fromhex(const char *s)
#endif /* __MINGW32__ */
}
+static int fromihex(const char *s) {
+ unsigned long l = strtoul(s, NULL, 16);
+ if (l > INT32_MAX)
+ l = INT32_MAX;
+ return (int)l;
+}
+
-#line 630 "scanner.c"
+#line 637 "scanner.c"
#define INITIAL 0
#define COMMENT 1
@@ -858,10 +865,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 105 "scanner.l"
+#line 112 "scanner.l"
-#line 865 "scanner.c"
+#line 872 "scanner.c"
yylval = yylval_param;
@@ -957,69 +964,69 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 107 "scanner.l"
+#line 114 "scanner.l"
{ BEGIN COMMENT; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 108 "scanner.l"
+#line 115 "scanner.l"
{ BEGIN INITIAL; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 109 "scanner.l"
+#line 116 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 110 "scanner.l"
+#line 117 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 112 "scanner.l"
+#line 119 "scanner.l"
{ BEGIN STRING; }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 113 "scanner.l"
+#line 120 "scanner.l"
{ scanctx_append_string(yyextra, yytext); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 114 "scanner.l"
+#line 121 "scanner.l"
{ scanctx_append_string(yyextra, "\n"); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 115 "scanner.l"
+#line 122 "scanner.l"
{ scanctx_append_string(yyextra, "\r"); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 116 "scanner.l"
+#line 123 "scanner.l"
{ scanctx_append_string(yyextra, "\t"); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 117 "scanner.l"
+#line 124 "scanner.l"
{ scanctx_append_string(yyextra, "\f"); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 118 "scanner.l"
+#line 125 "scanner.l"
{ scanctx_append_string(yyextra, "\\"); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 119 "scanner.l"
+#line 126 "scanner.l"
{ scanctx_append_string(yyextra, "\""); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 120 "scanner.l"
+#line 127 "scanner.l"
{
char c[2] = { (char)(strtol(yytext + 2, NULL, 16) & 0xFF),
0 };
@@ -1028,12 +1035,12 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 125 "scanner.l"
+#line 132 "scanner.l"
{ scanctx_append_string(yyextra, "\\"); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 126 "scanner.l"
+#line 133 "scanner.l"
{
yylval->sval = scanctx_take_string(yyextra);
BEGIN INITIAL;
@@ -1042,18 +1049,18 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 132 "scanner.l"
+#line 139 "scanner.l"
{ BEGIN SCRIPTBLOCK; }
YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
-#line 133 "scanner.l"
+#line 140 "scanner.l"
{ scanctx_append_string(yyextra, yytext); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 134 "scanner.l"
+#line 141 "scanner.l"
{
yylval->sval = scanctx_take_string(yyextra);
BEGIN INITIAL;
@@ -1062,28 +1069,28 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 140 "scanner.l"
+#line 147 "scanner.l"
{ BEGIN INCLUDE; }
YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 141 "scanner.l"
+#line 148 "scanner.l"
{ scanctx_append_string(yyextra, yytext); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 142 "scanner.l"
+#line 149 "scanner.l"
{ scanctx_append_string(yyextra, "\\"); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 143 "scanner.l"
+#line 150 "scanner.l"
{ scanctx_append_string(yyextra, "\""); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 144 "scanner.l"
+#line 151 "scanner.l"
{
const char *error;
FILE *fp = scanctx_push_include(yyextra,
@@ -1109,100 +1116,97 @@ YY_RULE_SETUP
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
-#line 168 "scanner.l"
+#line 175 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 169 "scanner.l"
+#line 176 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 171 "scanner.l"
+#line 178 "scanner.l"
{ return(TOK_EQUALS); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 172 "scanner.l"
+#line 179 "scanner.l"
{ return(TOK_COMMA); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 173 "scanner.l"
+#line 180 "scanner.l"
{ return(TOK_GROUP_START); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 174 "scanner.l"
+#line 181 "scanner.l"
{ return(TOK_GROUP_END); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 175 "scanner.l"
+#line 182 "scanner.l"
{ yylval->ival = 1; return(TOK_BOOLEAN); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 176 "scanner.l"
+#line 183 "scanner.l"
{ yylval->ival = 0; return(TOK_BOOLEAN); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 177 "scanner.l"
+#line 184 "scanner.l"
{ yylval->sval = yytext; return(TOK_NAME); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 178 "scanner.l"
+#line 185 "scanner.l"
{ yylval->fval = atof(yytext); return(TOK_FLOAT); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 179 "scanner.l"
+#line 186 "scanner.l"
{ yylval->ival = atoi(yytext); return(TOK_INTEGER); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 180 "scanner.l"
+#line 187 "scanner.l"
{ yylval->llval = atoll(yytext); return(TOK_INTEGER64); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 181 "scanner.l"
-{
- yylval->ival = strtoul(yytext, NULL, 16);
- return(TOK_HEX);
- }
+#line 188 "scanner.l"
+{ yylval->ival = fromihex(yytext); return(TOK_HEX); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 185 "scanner.l"
+#line 189 "scanner.l"
{ yylval->llval = fromhex(yytext); return(TOK_HEX64); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 186 "scanner.l"
+#line 190 "scanner.l"
{ return(TOK_ARRAY_START); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 187 "scanner.l"
+#line 191 "scanner.l"
{ return(TOK_ARRAY_END); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 188 "scanner.l"
+#line 192 "scanner.l"
{ return(TOK_LIST_START); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 189 "scanner.l"
+#line 193 "scanner.l"
{ return(TOK_LIST_END); }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 190 "scanner.l"
+#line 194 "scanner.l"
{ return(TOK_SEMICOLON); }
YY_BREAK
case 43:
@@ -1210,12 +1214,12 @@ case 43:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 191 "scanner.l"
+#line 195 "scanner.l"
{ /* ignore */ }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 192 "scanner.l"
+#line 196 "scanner.l"
{ return(TOK_GARBAGE); }
YY_BREAK
case YY_STATE_EOF(INITIAL):
@@ -1223,7 +1227,7 @@ case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(STRING):
case YY_STATE_EOF(INCLUDE):
case YY_STATE_EOF(SCRIPTBLOCK):
-#line 194 "scanner.l"
+#line 198 "scanner.l"
{
YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include(
yyextra);
@@ -1238,10 +1242,10 @@ case YY_STATE_EOF(SCRIPTBLOCK):
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 205 "scanner.l"
+#line 209 "scanner.l"
ECHO;
YY_BREAK
-#line 1245 "scanner.c"
+#line 1249 "scanner.c"
case YY_END_OF_BUFFER:
{
@@ -1496,6 +1500,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
+#ifndef __clang_analyzer__
+ // FIXME: Clang's static analyzer complains about leaking the result of libconfig_yyrealloc
if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
@@ -1503,6 +1509,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
+#endif // __clang_analyzer__
yyg->yy_n_chars += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
@@ -2375,4 +2382,4 @@ void libconfig_yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 205 "scanner.l"
+#line 209 "scanner.l"
diff --git a/3rdparty/libconfig/scanner.h b/3rdparty/libconfig/scanner.h
index 181bc5c94..ac79ff5d1 100644
--- a/3rdparty/libconfig/scanner.h
+++ b/3rdparty/libconfig/scanner.h
@@ -334,7 +334,7 @@ extern int libconfig_yylex \
#undef YY_DECL
#endif
-#line 205 "scanner.l"
+#line 209 "scanner.l"
#line 340 "scanner.h"
#undef libconfig_yyIN_HEADER
diff --git a/Hercules.xcodeproj/project.pbxproj b/Hercules.xcodeproj/project.pbxproj
new file mode 100644
index 000000000..0ecbdd52c
--- /dev/null
+++ b/Hercules.xcodeproj/project.pbxproj
@@ -0,0 +1,1618 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ A5380CD71856CE3C0090CBC4 /* mapcache.c in Sources */ = {isa = PBXBuildFile; fileRef = A5380CD61856CE3C0090CBC4 /* mapcache.c */; };
+ A5380CD81856CE8A0090CBC4 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC692185643BB009EB79C /* console.c */; };
+ A5380CD91856CF4A0090CBC4 /* core.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC694185643BB009EB79C /* core.c */; };
+ A5380CDA1856D0650090CBC4 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BA185643BB009EB79C /* socket.c */; };
+ A5380CDB1856D0690090CBC4 /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
+ A567612D185D11D700997C0D /* nullpo.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B2185643BB009EB79C /* nullpo.c */; };
+ A56CC68918564387009EB79C /* account_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC68118564387009EB79C /* account_sql.c */; };
+ A56CC68A18564387009EB79C /* ipban_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC68318564387009EB79C /* ipban_sql.c */; };
+ A56CC68B18564387009EB79C /* login.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC68518564387009EB79C /* login.c */; };
+ A56CC68C18564387009EB79C /* loginlog_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC68718564387009EB79C /* loginlog_sql.c */; };
+ A56CC6C9185643BB009EB79C /* conf.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC690185643BB009EB79C /* conf.c */; };
+ A56CC6CA185643BB009EB79C /* conf.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC690185643BB009EB79C /* conf.c */; };
+ A56CC6CB185643BB009EB79C /* conf.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC690185643BB009EB79C /* conf.c */; };
+ A56CC6CC185643BB009EB79C /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC692185643BB009EB79C /* console.c */; };
+ A56CC6CD185643BB009EB79C /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC692185643BB009EB79C /* console.c */; };
+ A56CC6CE185643BB009EB79C /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC692185643BB009EB79C /* console.c */; };
+ A56CC6CF185643BB009EB79C /* core.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC694185643BB009EB79C /* core.c */; };
+ A56CC6D0185643BB009EB79C /* core.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC694185643BB009EB79C /* core.c */; };
+ A56CC6D1185643BB009EB79C /* core.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC694185643BB009EB79C /* core.c */; };
+ A56CC6D2185643BB009EB79C /* db.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC696185643BB009EB79C /* db.c */; };
+ A56CC6D3185643BB009EB79C /* db.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC696185643BB009EB79C /* db.c */; };
+ A56CC6D4185643BB009EB79C /* db.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC696185643BB009EB79C /* db.c */; };
+ A56CC6D5185643BB009EB79C /* des.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC698185643BB009EB79C /* des.c */; };
+ A56CC6D6185643BB009EB79C /* des.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC698185643BB009EB79C /* des.c */; };
+ A56CC6D7185643BB009EB79C /* des.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC698185643BB009EB79C /* des.c */; };
+ A56CC6D8185643BB009EB79C /* ers.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC69A185643BB009EB79C /* ers.c */; };
+ A56CC6D9185643BB009EB79C /* ers.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC69A185643BB009EB79C /* ers.c */; };
+ A56CC6DA185643BB009EB79C /* ers.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC69A185643BB009EB79C /* ers.c */; };
+ A56CC6DE185643BB009EB79C /* grfio.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC69E185643BB009EB79C /* grfio.c */; };
+ A56CC6DF185643BB009EB79C /* grfio.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC69E185643BB009EB79C /* grfio.c */; };
+ A56CC6E0185643BB009EB79C /* grfio.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC69E185643BB009EB79C /* grfio.c */; };
+ A56CC6E1185643BB009EB79C /* HPM.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A0185643BB009EB79C /* HPM.c */; };
+ A56CC6E2185643BB009EB79C /* HPM.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A0185643BB009EB79C /* HPM.c */; };
+ A56CC6E3185643BB009EB79C /* HPM.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A0185643BB009EB79C /* HPM.c */; };
+ A56CC6E4185643BB009EB79C /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
+ A56CC6E5185643BB009EB79C /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
+ A56CC6E6185643BB009EB79C /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
+ A56CC6E7185643BB009EB79C /* mapindex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A5185643BB009EB79C /* mapindex.c */; };
+ A56CC6E8185643BB009EB79C /* mapindex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A5185643BB009EB79C /* mapindex.c */; };
+ A56CC6E9185643BB009EB79C /* mapindex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A5185643BB009EB79C /* mapindex.c */; };
+ A56CC6EA185643BB009EB79C /* md5calc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A7185643BB009EB79C /* md5calc.c */; };
+ A56CC6EB185643BB009EB79C /* md5calc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A7185643BB009EB79C /* md5calc.c */; };
+ A56CC6EC185643BB009EB79C /* md5calc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A7185643BB009EB79C /* md5calc.c */; };
+ A56CC6F0185643BB009EB79C /* mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6AC185643BB009EB79C /* mutex.c */; };
+ A56CC6F1185643BB009EB79C /* mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6AC185643BB009EB79C /* mutex.c */; };
+ A56CC6F2185643BB009EB79C /* mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6AC185643BB009EB79C /* mutex.c */; };
+ A56CC6F9185643BB009EB79C /* nullpo.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B2185643BB009EB79C /* nullpo.c */; };
+ A56CC6FA185643BB009EB79C /* nullpo.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B2185643BB009EB79C /* nullpo.c */; };
+ A56CC6FB185643BB009EB79C /* nullpo.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B2185643BB009EB79C /* nullpo.c */; };
+ A56CC6FF185643BB009EB79C /* random.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B6185643BB009EB79C /* random.c */; };
+ A56CC700185643BB009EB79C /* random.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B6185643BB009EB79C /* random.c */; };
+ A56CC701185643BB009EB79C /* random.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B6185643BB009EB79C /* random.c */; };
+ A56CC702185643BB009EB79C /* showmsg.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B8185643BB009EB79C /* showmsg.c */; };
+ A56CC703185643BB009EB79C /* showmsg.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B8185643BB009EB79C /* showmsg.c */; };
+ A56CC704185643BB009EB79C /* showmsg.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B8185643BB009EB79C /* showmsg.c */; };
+ A56CC705185643BB009EB79C /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BA185643BB009EB79C /* socket.c */; };
+ A56CC706185643BB009EB79C /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BA185643BB009EB79C /* socket.c */; };
+ A56CC707185643BB009EB79C /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BA185643BB009EB79C /* socket.c */; };
+ A56CC708185643BB009EB79C /* sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BD185643BB009EB79C /* sql.c */; };
+ A56CC709185643BB009EB79C /* sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BD185643BB009EB79C /* sql.c */; };
+ A56CC70A185643BB009EB79C /* sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BD185643BB009EB79C /* sql.c */; };
+ A56CC70B185643BB009EB79C /* strlib.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BF185643BB009EB79C /* strlib.c */; };
+ A56CC70C185643BB009EB79C /* strlib.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BF185643BB009EB79C /* strlib.c */; };
+ A56CC70D185643BB009EB79C /* strlib.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BF185643BB009EB79C /* strlib.c */; };
+ A56CC711185643BB009EB79C /* thread.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C2185643BB009EB79C /* thread.c */; };
+ A56CC712185643BB009EB79C /* thread.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C2185643BB009EB79C /* thread.c */; };
+ A56CC713185643BB009EB79C /* thread.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C2185643BB009EB79C /* thread.c */; };
+ A56CC714185643BB009EB79C /* timer.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C4185643BB009EB79C /* timer.c */; };
+ A56CC715185643BB009EB79C /* timer.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C4185643BB009EB79C /* timer.c */; };
+ A56CC716185643BB009EB79C /* timer.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C4185643BB009EB79C /* timer.c */; };
+ A56CC717185643BB009EB79C /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C6185643BB009EB79C /* utils.c */; };
+ A56CC718185643BB009EB79C /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C6185643BB009EB79C /* utils.c */; };
+ A56CC719185643BB009EB79C /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C6185643BB009EB79C /* utils.c */; };
+ A56CC72E18564C05009EB79C /* grammar.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72218564C05009EB79C /* grammar.c */; };
+ A56CC72F18564C05009EB79C /* grammar.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72218564C05009EB79C /* grammar.c */; };
+ A56CC73018564C05009EB79C /* grammar.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72218564C05009EB79C /* grammar.c */; };
+ A56CC73118564C05009EB79C /* libconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72418564C05009EB79C /* libconfig.c */; };
+ A56CC73218564C05009EB79C /* libconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72418564C05009EB79C /* libconfig.c */; };
+ A56CC73318564C05009EB79C /* libconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72418564C05009EB79C /* libconfig.c */; };
+ A56CC73418564C05009EB79C /* scanctx.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72718564C05009EB79C /* scanctx.c */; };
+ A56CC73518564C05009EB79C /* scanctx.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72718564C05009EB79C /* scanctx.c */; };
+ A56CC73618564C05009EB79C /* scanctx.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72718564C05009EB79C /* scanctx.c */; };
+ A56CC73718564C05009EB79C /* scanner.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72918564C05009EB79C /* scanner.c */; };
+ A56CC73818564C05009EB79C /* scanner.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72918564C05009EB79C /* scanner.c */; };
+ A56CC73918564C05009EB79C /* scanner.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72918564C05009EB79C /* scanner.c */; };
+ A56CC73A18564C05009EB79C /* strbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72B18564C05009EB79C /* strbuf.c */; };
+ A56CC73B18564C05009EB79C /* strbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72B18564C05009EB79C /* strbuf.c */; };
+ A56CC73C18564C05009EB79C /* strbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC72B18564C05009EB79C /* strbuf.c */; };
+ A56CC74018564C23009EB79C /* mt19937ar.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC73E18564C23009EB79C /* mt19937ar.c */; };
+ A56CC74118564C23009EB79C /* mt19937ar.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC73E18564C23009EB79C /* mt19937ar.c */; };
+ A56CC74218564C23009EB79C /* mt19937ar.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC73E18564C23009EB79C /* mt19937ar.c */; };
+ A56CC75D185657D9009EB79C /* char.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC743185657D9009EB79C /* char.c */; };
+ A56CC75E185657D9009EB79C /* int_auction.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC745185657D9009EB79C /* int_auction.c */; };
+ A56CC75F185657D9009EB79C /* int_elemental.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC747185657D9009EB79C /* int_elemental.c */; };
+ A56CC760185657D9009EB79C /* int_guild.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC749185657D9009EB79C /* int_guild.c */; };
+ A56CC761185657D9009EB79C /* int_homun.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC74B185657D9009EB79C /* int_homun.c */; };
+ A56CC762185657D9009EB79C /* int_mail.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC74D185657D9009EB79C /* int_mail.c */; };
+ A56CC763185657D9009EB79C /* int_mercenary.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC74F185657D9009EB79C /* int_mercenary.c */; };
+ A56CC764185657D9009EB79C /* int_party.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC751185657D9009EB79C /* int_party.c */; };
+ A56CC765185657D9009EB79C /* int_pet.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC753185657D9009EB79C /* int_pet.c */; };
+ A56CC766185657D9009EB79C /* int_quest.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC755185657D9009EB79C /* int_quest.c */; };
+ A56CC767185657D9009EB79C /* int_storage.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC757185657D9009EB79C /* int_storage.c */; };
+ A56CC768185657D9009EB79C /* inter.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC759185657D9009EB79C /* inter.c */; };
+ A56CC769185657D9009EB79C /* pincode.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC75B185657D9009EB79C /* pincode.c */; };
+ A56CC7B918565812009EB79C /* atcommand.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC76A18565812009EB79C /* atcommand.c */; };
+ A56CC7BA18565812009EB79C /* battle.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC76C18565812009EB79C /* battle.c */; };
+ A56CC7BB18565812009EB79C /* battleground.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC76E18565812009EB79C /* battleground.c */; };
+ A56CC7BC18565812009EB79C /* buyingstore.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77018565812009EB79C /* buyingstore.c */; };
+ A56CC7BD18565812009EB79C /* chat.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77218565812009EB79C /* chat.c */; };
+ A56CC7BE18565812009EB79C /* chrif.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77418565812009EB79C /* chrif.c */; };
+ A56CC7BF18565812009EB79C /* clif.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77618565812009EB79C /* clif.c */; };
+ A56CC7C018565812009EB79C /* date.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77818565812009EB79C /* date.c */; };
+ A56CC7C118565812009EB79C /* duel.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77A18565812009EB79C /* duel.c */; };
+ A56CC7C218565812009EB79C /* elemental.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77C18565812009EB79C /* elemental.c */; };
+ A56CC7C318565812009EB79C /* guild.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC77E18565812009EB79C /* guild.c */; };
+ A56CC7C418565812009EB79C /* homunculus.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78018565812009EB79C /* homunculus.c */; };
+ A56CC7C518565812009EB79C /* HPMmap.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78218565812009EB79C /* HPMmap.c */; };
+ A56CC7C618565812009EB79C /* instance.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78418565812009EB79C /* instance.c */; };
+ A56CC7C718565812009EB79C /* intif.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78618565812009EB79C /* intif.c */; };
+ A56CC7C818565812009EB79C /* irc-bot.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78818565812009EB79C /* irc-bot.c */; };
+ A56CC7C918565812009EB79C /* itemdb.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78A18565812009EB79C /* itemdb.c */; };
+ A56CC7CA18565812009EB79C /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78C18565812009EB79C /* log.c */; };
+ A56CC7CB18565812009EB79C /* mail.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC78E18565812009EB79C /* mail.c */; };
+ A56CC7CC18565812009EB79C /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79018565812009EB79C /* map.c */; };
+ A56CC7CD18565812009EB79C /* mapreg_sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79218565812009EB79C /* mapreg_sql.c */; };
+ A56CC7CE18565812009EB79C /* mercenary.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79418565812009EB79C /* mercenary.c */; };
+ A56CC7CF18565812009EB79C /* mob.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79618565812009EB79C /* mob.c */; };
+ A56CC7D018565812009EB79C /* npc_chat.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79818565812009EB79C /* npc_chat.c */; };
+ A56CC7D118565812009EB79C /* npc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79918565812009EB79C /* npc.c */; };
+ A56CC7D218565812009EB79C /* party.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79D18565812009EB79C /* party.c */; };
+ A56CC7D318565812009EB79C /* path.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC79F18565812009EB79C /* path.c */; };
+ A56CC7D418565812009EB79C /* pc_groups.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7A118565812009EB79C /* pc_groups.c */; };
+ A56CC7D518565812009EB79C /* pc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7A318565812009EB79C /* pc.c */; };
+ A56CC7D618565812009EB79C /* pet.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7A518565812009EB79C /* pet.c */; };
+ A56CC7D718565812009EB79C /* quest.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7A718565812009EB79C /* quest.c */; };
+ A56CC7D818565812009EB79C /* script.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7A918565812009EB79C /* script.c */; };
+ A56CC7D918565812009EB79C /* searchstore.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7AB18565812009EB79C /* searchstore.c */; };
+ A56CC7DA18565812009EB79C /* skill.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7AD18565812009EB79C /* skill.c */; };
+ A56CC7DB18565812009EB79C /* status.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7AF18565812009EB79C /* status.c */; };
+ A56CC7DC18565812009EB79C /* storage.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7B118565812009EB79C /* storage.c */; };
+ A56CC7DD18565812009EB79C /* trade.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7B318565812009EB79C /* trade.c */; };
+ A56CC7DE18565812009EB79C /* unit.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7B518565812009EB79C /* unit.c */; };
+ A56CC7DF18565812009EB79C /* vending.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC7B718565812009EB79C /* vending.c */; };
+ A58A5A17185800A40099683E /* showmsg.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6B8185643BB009EB79C /* showmsg.c */; };
+ A58A5A18185800B80099683E /* grfio.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC69E185643BB009EB79C /* grfio.c */; };
+ A58A5A19185800C20099683E /* des.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC698185643BB009EB79C /* des.c */; };
+ A58A5A1A185800CD0099683E /* strlib.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BF185643BB009EB79C /* strlib.c */; };
+ A58A5A1B185800E70099683E /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6C6185643BB009EB79C /* utils.c */; };
+ A58A5A281858025D0099683E /* HPMHooking.c in Sources */ = {isa = PBXBuildFile; fileRef = A58A5A271858025D0099683E /* HPMHooking.c */; };
+ A5AA94EE185796CB00C940C8 /* sample.c in Sources */ = {isa = PBXBuildFile; fileRef = A5AA94ED185796CB00C940C8 /* sample.c */; };
+ A5AA94FA185799E400C940C8 /* db2sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A5AA94F8185799DF00C940C8 /* db2sql.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ A5380CCB1856CE180090CBC4 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ A56CC66818564315009EB79C /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ A56CC6711856434D009EB79C /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ A56CC67A18564356009EB79C /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ A5380CCD1856CE180090CBC4 /* mapcache */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mapcache; sourceTree = BUILT_PRODUCTS_DIR; };
+ A5380CD61856CE3C0090CBC4 /* mapcache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mapcache.c; path = src/tool/mapcache.c; sourceTree = "<group>"; };
+ A56CC66A18564315009EB79C /* login-server */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "login-server"; sourceTree = BUILT_PRODUCTS_DIR; };
+ A56CC6731856434D009EB79C /* char-server */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "char-server"; sourceTree = BUILT_PRODUCTS_DIR; };
+ A56CC67C18564356009EB79C /* map-server */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "map-server"; sourceTree = BUILT_PRODUCTS_DIR; };
+ A56CC68118564387009EB79C /* account_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = account_sql.c; path = src/login/account_sql.c; sourceTree = SOURCE_ROOT; };
+ A56CC68218564387009EB79C /* account.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = account.h; path = src/login/account.h; sourceTree = SOURCE_ROOT; };
+ A56CC68318564387009EB79C /* ipban_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ipban_sql.c; path = src/login/ipban_sql.c; sourceTree = SOURCE_ROOT; };
+ A56CC68418564387009EB79C /* ipban.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ipban.h; path = src/login/ipban.h; sourceTree = SOURCE_ROOT; };
+ A56CC68518564387009EB79C /* login.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = login.c; path = src/login/login.c; sourceTree = SOURCE_ROOT; };
+ A56CC68618564387009EB79C /* login.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = login.h; path = src/login/login.h; sourceTree = SOURCE_ROOT; };
+ A56CC68718564387009EB79C /* loginlog_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loginlog_sql.c; path = src/login/loginlog_sql.c; sourceTree = SOURCE_ROOT; };
+ A56CC68818564387009EB79C /* loginlog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = loginlog.h; path = src/login/loginlog.h; sourceTree = SOURCE_ROOT; };
+ A56CC68E185643BB009EB79C /* atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic.h; path = src/common/atomic.h; sourceTree = "<group>"; };
+ A56CC68F185643BB009EB79C /* cbasetypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cbasetypes.h; path = src/common/cbasetypes.h; sourceTree = "<group>"; };
+ A56CC690185643BB009EB79C /* conf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = conf.c; path = src/common/conf.c; sourceTree = "<group>"; };
+ A56CC691185643BB009EB79C /* conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = conf.h; path = src/common/conf.h; sourceTree = "<group>"; };
+ A56CC692185643BB009EB79C /* console.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = console.c; path = src/common/console.c; sourceTree = "<group>"; };
+ A56CC693185643BB009EB79C /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = console.h; path = src/common/console.h; sourceTree = "<group>"; };
+ A56CC694185643BB009EB79C /* core.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = core.c; path = src/common/core.c; sourceTree = "<group>"; };
+ A56CC695185643BB009EB79C /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = core.h; path = src/common/core.h; sourceTree = "<group>"; };
+ A56CC696185643BB009EB79C /* db.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = db.c; path = src/common/db.c; sourceTree = "<group>"; };
+ A56CC697185643BB009EB79C /* db.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = db.h; path = src/common/db.h; sourceTree = "<group>"; };
+ A56CC698185643BB009EB79C /* des.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = des.c; path = src/common/des.c; sourceTree = "<group>"; };
+ A56CC699185643BB009EB79C /* des.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = des.h; path = src/common/des.h; sourceTree = "<group>"; };
+ A56CC69A185643BB009EB79C /* ers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ers.c; path = src/common/ers.c; sourceTree = "<group>"; };
+ A56CC69B185643BB009EB79C /* ers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ers.h; path = src/common/ers.h; sourceTree = "<group>"; };
+ A56CC69E185643BB009EB79C /* grfio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = grfio.c; path = src/common/grfio.c; sourceTree = "<group>"; };
+ A56CC69F185643BB009EB79C /* grfio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = grfio.h; path = src/common/grfio.h; sourceTree = "<group>"; };
+ A56CC6A0185643BB009EB79C /* HPM.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = HPM.c; path = src/common/HPM.c; sourceTree = "<group>"; };
+ A56CC6A1185643BB009EB79C /* HPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPM.h; path = src/common/HPM.h; sourceTree = "<group>"; };
+ A56CC6A2185643BB009EB79C /* HPMi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPMi.h; path = src/common/HPMi.h; sourceTree = "<group>"; };
+ A56CC6A3185643BB009EB79C /* malloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = malloc.c; path = src/common/malloc.c; sourceTree = "<group>"; };
+ A56CC6A4185643BB009EB79C /* malloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = malloc.h; path = src/common/malloc.h; sourceTree = "<group>"; };
+ A56CC6A5185643BB009EB79C /* mapindex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mapindex.c; path = src/common/mapindex.c; sourceTree = "<group>"; };
+ A56CC6A6185643BB009EB79C /* mapindex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mapindex.h; path = src/common/mapindex.h; sourceTree = "<group>"; };
+ A56CC6A7185643BB009EB79C /* md5calc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5calc.c; path = src/common/md5calc.c; sourceTree = "<group>"; };
+ A56CC6A8185643BB009EB79C /* md5calc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = md5calc.h; path = src/common/md5calc.h; sourceTree = "<group>"; };
+ A56CC6AB185643BB009EB79C /* mmo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mmo.h; path = src/common/mmo.h; sourceTree = "<group>"; };
+ A56CC6AC185643BB009EB79C /* mutex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mutex.c; path = src/common/mutex.c; sourceTree = "<group>"; };
+ A56CC6AD185643BB009EB79C /* mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mutex.h; path = src/common/mutex.h; sourceTree = "<group>"; };
+ A56CC6B2185643BB009EB79C /* nullpo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nullpo.c; path = src/common/nullpo.c; sourceTree = "<group>"; };
+ A56CC6B3185643BB009EB79C /* nullpo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nullpo.h; path = src/common/nullpo.h; sourceTree = "<group>"; };
+ A56CC6B6185643BB009EB79C /* random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = random.c; path = src/common/random.c; sourceTree = "<group>"; };
+ A56CC6B7185643BB009EB79C /* random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = random.h; path = src/common/random.h; sourceTree = "<group>"; };
+ A56CC6B8185643BB009EB79C /* showmsg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = showmsg.c; path = src/common/showmsg.c; sourceTree = "<group>"; };
+ A56CC6B9185643BB009EB79C /* showmsg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = showmsg.h; path = src/common/showmsg.h; sourceTree = "<group>"; };
+ A56CC6BA185643BB009EB79C /* socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = socket.c; path = src/common/socket.c; sourceTree = "<group>"; };
+ A56CC6BB185643BB009EB79C /* socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = socket.h; path = src/common/socket.h; sourceTree = "<group>"; };
+ A56CC6BC185643BB009EB79C /* spinlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spinlock.h; path = src/common/spinlock.h; sourceTree = "<group>"; };
+ A56CC6BD185643BB009EB79C /* sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sql.c; path = src/common/sql.c; sourceTree = "<group>"; };
+ A56CC6BE185643BB009EB79C /* sql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sql.h; path = src/common/sql.h; sourceTree = "<group>"; };
+ A56CC6BF185643BB009EB79C /* strlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = strlib.c; path = src/common/strlib.c; sourceTree = "<group>"; };
+ A56CC6C0185643BB009EB79C /* strlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = strlib.h; path = src/common/strlib.h; sourceTree = "<group>"; };
+ A56CC6C2185643BB009EB79C /* thread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = thread.c; path = src/common/thread.c; sourceTree = "<group>"; };
+ A56CC6C3185643BB009EB79C /* thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = thread.h; path = src/common/thread.h; sourceTree = "<group>"; };
+ A56CC6C4185643BB009EB79C /* timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = timer.c; path = src/common/timer.c; sourceTree = "<group>"; };
+ A56CC6C5185643BB009EB79C /* timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = timer.h; path = src/common/timer.h; sourceTree = "<group>"; };
+ A56CC6C6185643BB009EB79C /* utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = utils.c; path = src/common/utils.c; sourceTree = "<group>"; };
+ A56CC6C7185643BB009EB79C /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = src/common/utils.h; sourceTree = "<group>"; };
+ A56CC6C8185643BB009EB79C /* winapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = winapi.h; path = src/common/winapi.h; sourceTree = "<group>"; };
+ A56CC71B18564AF7009EB79C /* const.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = const.h; path = src/config/const.h; sourceTree = "<group>"; };
+ A56CC71C18564AF7009EB79C /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = core.h; path = src/config/core.h; sourceTree = "<group>"; };
+ A56CC71D18564AF7009EB79C /* renewal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = renewal.h; path = src/config/renewal.h; sourceTree = "<group>"; };
+ A56CC71E18564AF7009EB79C /* secure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = secure.h; path = src/config/secure.h; sourceTree = "<group>"; };
+ A56CC71F18564B00009EB79C /* general.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = general.h; path = src/config/classes/general.h; sourceTree = "<group>"; };
+ A56CC72218564C05009EB79C /* grammar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = grammar.c; path = 3rdparty/libconfig/grammar.c; sourceTree = "<group>"; };
+ A56CC72318564C05009EB79C /* grammar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = grammar.h; path = 3rdparty/libconfig/grammar.h; sourceTree = "<group>"; };
+ A56CC72418564C05009EB79C /* libconfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = libconfig.c; path = 3rdparty/libconfig/libconfig.c; sourceTree = "<group>"; };
+ A56CC72518564C05009EB79C /* libconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libconfig.h; path = 3rdparty/libconfig/libconfig.h; sourceTree = "<group>"; };
+ A56CC72618564C05009EB79C /* parsectx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = parsectx.h; path = 3rdparty/libconfig/parsectx.h; sourceTree = "<group>"; };
+ A56CC72718564C05009EB79C /* scanctx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scanctx.c; path = 3rdparty/libconfig/scanctx.c; sourceTree = "<group>"; };
+ A56CC72818564C05009EB79C /* scanctx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = scanctx.h; path = 3rdparty/libconfig/scanctx.h; sourceTree = "<group>"; };
+ A56CC72918564C05009EB79C /* scanner.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scanner.c; path = 3rdparty/libconfig/scanner.c; sourceTree = "<group>"; };
+ A56CC72A18564C05009EB79C /* scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = scanner.h; path = 3rdparty/libconfig/scanner.h; sourceTree = "<group>"; };
+ A56CC72B18564C05009EB79C /* strbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = strbuf.c; path = 3rdparty/libconfig/strbuf.c; sourceTree = "<group>"; };
+ A56CC72C18564C05009EB79C /* strbuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = strbuf.h; path = 3rdparty/libconfig/strbuf.h; sourceTree = "<group>"; };
+ A56CC72D18564C05009EB79C /* wincompat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wincompat.h; path = 3rdparty/libconfig/wincompat.h; sourceTree = "<group>"; };
+ A56CC73E18564C23009EB79C /* mt19937ar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mt19937ar.c; path = 3rdparty/mt19937ar/mt19937ar.c; sourceTree = "<group>"; };
+ A56CC73F18564C23009EB79C /* mt19937ar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mt19937ar.h; path = 3rdparty/mt19937ar/mt19937ar.h; sourceTree = "<group>"; };
+ A56CC743185657D9009EB79C /* char.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = char.c; path = src/char/char.c; sourceTree = SOURCE_ROOT; };
+ A56CC744185657D9009EB79C /* char.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = char.h; path = src/char/char.h; sourceTree = SOURCE_ROOT; };
+ A56CC745185657D9009EB79C /* int_auction.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_auction.c; path = src/char/int_auction.c; sourceTree = SOURCE_ROOT; };
+ A56CC746185657D9009EB79C /* int_auction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_auction.h; path = src/char/int_auction.h; sourceTree = SOURCE_ROOT; };
+ A56CC747185657D9009EB79C /* int_elemental.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_elemental.c; path = src/char/int_elemental.c; sourceTree = SOURCE_ROOT; };
+ A56CC748185657D9009EB79C /* int_elemental.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_elemental.h; path = src/char/int_elemental.h; sourceTree = SOURCE_ROOT; };
+ A56CC749185657D9009EB79C /* int_guild.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_guild.c; path = src/char/int_guild.c; sourceTree = SOURCE_ROOT; };
+ A56CC74A185657D9009EB79C /* int_guild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_guild.h; path = src/char/int_guild.h; sourceTree = SOURCE_ROOT; };
+ A56CC74B185657D9009EB79C /* int_homun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_homun.c; path = src/char/int_homun.c; sourceTree = SOURCE_ROOT; };
+ A56CC74C185657D9009EB79C /* int_homun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_homun.h; path = src/char/int_homun.h; sourceTree = SOURCE_ROOT; };
+ A56CC74D185657D9009EB79C /* int_mail.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_mail.c; path = src/char/int_mail.c; sourceTree = SOURCE_ROOT; };
+ A56CC74E185657D9009EB79C /* int_mail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_mail.h; path = src/char/int_mail.h; sourceTree = SOURCE_ROOT; };
+ A56CC74F185657D9009EB79C /* int_mercenary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_mercenary.c; path = src/char/int_mercenary.c; sourceTree = SOURCE_ROOT; };
+ A56CC750185657D9009EB79C /* int_mercenary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_mercenary.h; path = src/char/int_mercenary.h; sourceTree = SOURCE_ROOT; };
+ A56CC751185657D9009EB79C /* int_party.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_party.c; path = src/char/int_party.c; sourceTree = SOURCE_ROOT; };
+ A56CC752185657D9009EB79C /* int_party.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_party.h; path = src/char/int_party.h; sourceTree = SOURCE_ROOT; };
+ A56CC753185657D9009EB79C /* int_pet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_pet.c; path = src/char/int_pet.c; sourceTree = SOURCE_ROOT; };
+ A56CC754185657D9009EB79C /* int_pet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_pet.h; path = src/char/int_pet.h; sourceTree = SOURCE_ROOT; };
+ A56CC755185657D9009EB79C /* int_quest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_quest.c; path = src/char/int_quest.c; sourceTree = SOURCE_ROOT; };
+ A56CC756185657D9009EB79C /* int_quest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_quest.h; path = src/char/int_quest.h; sourceTree = SOURCE_ROOT; };
+ A56CC757185657D9009EB79C /* int_storage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = int_storage.c; path = src/char/int_storage.c; sourceTree = SOURCE_ROOT; };
+ A56CC758185657D9009EB79C /* int_storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = int_storage.h; path = src/char/int_storage.h; sourceTree = SOURCE_ROOT; };
+ A56CC759185657D9009EB79C /* inter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = inter.c; path = src/char/inter.c; sourceTree = SOURCE_ROOT; };
+ A56CC75A185657D9009EB79C /* inter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = inter.h; path = src/char/inter.h; sourceTree = SOURCE_ROOT; };
+ A56CC75B185657D9009EB79C /* pincode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pincode.c; path = src/char/pincode.c; sourceTree = SOURCE_ROOT; };
+ A56CC75C185657D9009EB79C /* pincode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pincode.h; path = src/char/pincode.h; sourceTree = SOURCE_ROOT; };
+ A56CC76A18565812009EB79C /* atcommand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = atcommand.c; path = src/map/atcommand.c; sourceTree = SOURCE_ROOT; };
+ A56CC76B18565812009EB79C /* atcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atcommand.h; path = src/map/atcommand.h; sourceTree = SOURCE_ROOT; };
+ A56CC76C18565812009EB79C /* battle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = battle.c; path = src/map/battle.c; sourceTree = SOURCE_ROOT; };
+ A56CC76D18565812009EB79C /* battle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = battle.h; path = src/map/battle.h; sourceTree = SOURCE_ROOT; };
+ A56CC76E18565812009EB79C /* battleground.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = battleground.c; path = src/map/battleground.c; sourceTree = SOURCE_ROOT; };
+ A56CC76F18565812009EB79C /* battleground.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = battleground.h; path = src/map/battleground.h; sourceTree = SOURCE_ROOT; };
+ A56CC77018565812009EB79C /* buyingstore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buyingstore.c; path = src/map/buyingstore.c; sourceTree = SOURCE_ROOT; };
+ A56CC77118565812009EB79C /* buyingstore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = buyingstore.h; path = src/map/buyingstore.h; sourceTree = SOURCE_ROOT; };
+ A56CC77218565812009EB79C /* chat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chat.c; path = src/map/chat.c; sourceTree = SOURCE_ROOT; };
+ A56CC77318565812009EB79C /* chat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chat.h; path = src/map/chat.h; sourceTree = SOURCE_ROOT; };
+ A56CC77418565812009EB79C /* chrif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chrif.c; path = src/map/chrif.c; sourceTree = SOURCE_ROOT; };
+ A56CC77518565812009EB79C /* chrif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chrif.h; path = src/map/chrif.h; sourceTree = SOURCE_ROOT; };
+ A56CC77618565812009EB79C /* clif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = clif.c; path = src/map/clif.c; sourceTree = SOURCE_ROOT; };
+ A56CC77718565812009EB79C /* clif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = clif.h; path = src/map/clif.h; sourceTree = SOURCE_ROOT; };
+ A56CC77818565812009EB79C /* date.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = date.c; path = src/map/date.c; sourceTree = SOURCE_ROOT; };
+ A56CC77918565812009EB79C /* date.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = date.h; path = src/map/date.h; sourceTree = SOURCE_ROOT; };
+ A56CC77A18565812009EB79C /* duel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = duel.c; path = src/map/duel.c; sourceTree = SOURCE_ROOT; };
+ A56CC77B18565812009EB79C /* duel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = duel.h; path = src/map/duel.h; sourceTree = SOURCE_ROOT; };
+ A56CC77C18565812009EB79C /* elemental.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = elemental.c; path = src/map/elemental.c; sourceTree = SOURCE_ROOT; };
+ A56CC77D18565812009EB79C /* elemental.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = elemental.h; path = src/map/elemental.h; sourceTree = SOURCE_ROOT; };
+ A56CC77E18565812009EB79C /* guild.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = guild.c; path = src/map/guild.c; sourceTree = SOURCE_ROOT; };
+ A56CC77F18565812009EB79C /* guild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = guild.h; path = src/map/guild.h; sourceTree = SOURCE_ROOT; };
+ A56CC78018565812009EB79C /* homunculus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = homunculus.c; path = src/map/homunculus.c; sourceTree = SOURCE_ROOT; };
+ A56CC78118565812009EB79C /* homunculus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = homunculus.h; path = src/map/homunculus.h; sourceTree = SOURCE_ROOT; };
+ A56CC78218565812009EB79C /* HPMmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = HPMmap.c; path = src/map/HPMmap.c; sourceTree = SOURCE_ROOT; };
+ A56CC78318565812009EB79C /* HPMmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPMmap.h; path = src/map/HPMmap.h; sourceTree = SOURCE_ROOT; };
+ A56CC78418565812009EB79C /* instance.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = instance.c; path = src/map/instance.c; sourceTree = SOURCE_ROOT; };
+ A56CC78518565812009EB79C /* instance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = instance.h; path = src/map/instance.h; sourceTree = SOURCE_ROOT; };
+ A56CC78618565812009EB79C /* intif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = intif.c; path = src/map/intif.c; sourceTree = SOURCE_ROOT; };
+ A56CC78718565812009EB79C /* intif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = intif.h; path = src/map/intif.h; sourceTree = SOURCE_ROOT; };
+ A56CC78818565812009EB79C /* irc-bot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "irc-bot.c"; path = "src/map/irc-bot.c"; sourceTree = SOURCE_ROOT; };
+ A56CC78918565812009EB79C /* irc-bot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "irc-bot.h"; path = "src/map/irc-bot.h"; sourceTree = SOURCE_ROOT; };
+ A56CC78A18565812009EB79C /* itemdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = itemdb.c; path = src/map/itemdb.c; sourceTree = SOURCE_ROOT; };
+ A56CC78B18565812009EB79C /* itemdb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = itemdb.h; path = src/map/itemdb.h; sourceTree = SOURCE_ROOT; };
+ A56CC78C18565812009EB79C /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = src/map/log.c; sourceTree = SOURCE_ROOT; };
+ A56CC78D18565812009EB79C /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = log.h; path = src/map/log.h; sourceTree = SOURCE_ROOT; };
+ A56CC78E18565812009EB79C /* mail.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mail.c; path = src/map/mail.c; sourceTree = SOURCE_ROOT; };
+ A56CC78F18565812009EB79C /* mail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mail.h; path = src/map/mail.h; sourceTree = SOURCE_ROOT; };
+ A56CC79018565812009EB79C /* map.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = map.c; path = src/map/map.c; sourceTree = SOURCE_ROOT; };
+ A56CC79118565812009EB79C /* map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = map.h; path = src/map/map.h; sourceTree = SOURCE_ROOT; };
+ A56CC79218565812009EB79C /* mapreg_sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mapreg_sql.c; path = src/map/mapreg_sql.c; sourceTree = SOURCE_ROOT; };
+ A56CC79318565812009EB79C /* mapreg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mapreg.h; path = src/map/mapreg.h; sourceTree = SOURCE_ROOT; };
+ A56CC79418565812009EB79C /* mercenary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mercenary.c; path = src/map/mercenary.c; sourceTree = SOURCE_ROOT; };
+ A56CC79518565812009EB79C /* mercenary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mercenary.h; path = src/map/mercenary.h; sourceTree = SOURCE_ROOT; };
+ A56CC79618565812009EB79C /* mob.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mob.c; path = src/map/mob.c; sourceTree = SOURCE_ROOT; };
+ A56CC79718565812009EB79C /* mob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mob.h; path = src/map/mob.h; sourceTree = SOURCE_ROOT; };
+ A56CC79818565812009EB79C /* npc_chat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = npc_chat.c; path = src/map/npc_chat.c; sourceTree = SOURCE_ROOT; };
+ A56CC79918565812009EB79C /* npc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = npc.c; path = src/map/npc.c; sourceTree = SOURCE_ROOT; };
+ A56CC79A18565812009EB79C /* npc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = npc.h; path = src/map/npc.h; sourceTree = SOURCE_ROOT; };
+ A56CC79B18565812009EB79C /* packets_struct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packets_struct.h; path = src/map/packets_struct.h; sourceTree = SOURCE_ROOT; };
+ A56CC79C18565812009EB79C /* packets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packets.h; path = src/map/packets.h; sourceTree = SOURCE_ROOT; };
+ A56CC79D18565812009EB79C /* party.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = party.c; path = src/map/party.c; sourceTree = SOURCE_ROOT; };
+ A56CC79E18565812009EB79C /* party.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = party.h; path = src/map/party.h; sourceTree = SOURCE_ROOT; };
+ A56CC79F18565812009EB79C /* path.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = path.c; path = src/map/path.c; sourceTree = SOURCE_ROOT; };
+ A56CC7A018565812009EB79C /* path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = path.h; path = src/map/path.h; sourceTree = SOURCE_ROOT; };
+ A56CC7A118565812009EB79C /* pc_groups.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pc_groups.c; path = src/map/pc_groups.c; sourceTree = SOURCE_ROOT; };
+ A56CC7A218565812009EB79C /* pc_groups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pc_groups.h; path = src/map/pc_groups.h; sourceTree = SOURCE_ROOT; };
+ A56CC7A318565812009EB79C /* pc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pc.c; path = src/map/pc.c; sourceTree = SOURCE_ROOT; };
+ A56CC7A418565812009EB79C /* pc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pc.h; path = src/map/pc.h; sourceTree = SOURCE_ROOT; };
+ A56CC7A518565812009EB79C /* pet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pet.c; path = src/map/pet.c; sourceTree = SOURCE_ROOT; };
+ A56CC7A618565812009EB79C /* pet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pet.h; path = src/map/pet.h; sourceTree = SOURCE_ROOT; };
+ A56CC7A718565812009EB79C /* quest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = quest.c; path = src/map/quest.c; sourceTree = SOURCE_ROOT; };
+ A56CC7A818565812009EB79C /* quest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quest.h; path = src/map/quest.h; sourceTree = SOURCE_ROOT; };
+ A56CC7A918565812009EB79C /* script.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = script.c; path = src/map/script.c; sourceTree = SOURCE_ROOT; };
+ A56CC7AA18565812009EB79C /* script.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = script.h; path = src/map/script.h; sourceTree = SOURCE_ROOT; };
+ A56CC7AB18565812009EB79C /* searchstore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = searchstore.c; path = src/map/searchstore.c; sourceTree = SOURCE_ROOT; };
+ A56CC7AC18565812009EB79C /* searchstore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = searchstore.h; path = src/map/searchstore.h; sourceTree = SOURCE_ROOT; };
+ A56CC7AD18565812009EB79C /* skill.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = skill.c; path = src/map/skill.c; sourceTree = SOURCE_ROOT; };
+ A56CC7AE18565812009EB79C /* skill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = skill.h; path = src/map/skill.h; sourceTree = SOURCE_ROOT; };
+ A56CC7AF18565812009EB79C /* status.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = status.c; path = src/map/status.c; sourceTree = SOURCE_ROOT; };
+ A56CC7B018565812009EB79C /* status.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = status.h; path = src/map/status.h; sourceTree = SOURCE_ROOT; };
+ A56CC7B118565812009EB79C /* storage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = storage.c; path = src/map/storage.c; sourceTree = SOURCE_ROOT; };
+ A56CC7B218565812009EB79C /* storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = storage.h; path = src/map/storage.h; sourceTree = SOURCE_ROOT; };
+ A56CC7B318565812009EB79C /* trade.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = trade.c; path = src/map/trade.c; sourceTree = SOURCE_ROOT; };
+ A56CC7B418565812009EB79C /* trade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = trade.h; path = src/map/trade.h; sourceTree = SOURCE_ROOT; };
+ A56CC7B518565812009EB79C /* unit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unit.c; path = src/map/unit.c; sourceTree = SOURCE_ROOT; };
+ A56CC7B618565812009EB79C /* unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = unit.h; path = src/map/unit.h; sourceTree = SOURCE_ROOT; };
+ A56CC7B718565812009EB79C /* vending.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vending.c; path = src/map/vending.c; sourceTree = SOURCE_ROOT; };
+ A56CC7B818565812009EB79C /* vending.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vending.h; path = src/map/vending.h; sourceTree = SOURCE_ROOT; };
+ A58A5A26185801FF0099683E /* HPMHooking.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = HPMHooking.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+ A58A5A271858025D0099683E /* HPMHooking.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = HPMHooking.c; path = src/plugins/HPMHooking.c; sourceTree = "<group>"; };
+ A58A5A2A1858028C0099683E /* HPMHooking.GetSymbol.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.GetSymbol.inc; path = src/plugins/HPMHooking/HPMHooking.GetSymbol.inc; sourceTree = "<group>"; };
+ A58A5A2B1858028C0099683E /* HPMHooking.HookingPoints.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.HookingPoints.inc; path = src/plugins/HPMHooking/HPMHooking.HookingPoints.inc; sourceTree = "<group>"; };
+ A58A5A2C1858028C0099683E /* HPMHooking.Hooks.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.Hooks.inc; path = src/plugins/HPMHooking/HPMHooking.Hooks.inc; sourceTree = "<group>"; };
+ A58A5A2D1858028C0099683E /* HPMHooking.HPMHooksCore.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.HPMHooksCore.inc; path = src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc; sourceTree = "<group>"; };
+ A58A5A2E1858028C0099683E /* HPMHooking.sources.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.sources.inc; path = src/plugins/HPMHooking/HPMHooking.sources.inc; sourceTree = "<group>"; };
+ A5AA94E71857956100C940C8 /* sample.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = sample.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+ A5AA94ED185796CB00C940C8 /* sample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sample.c; path = src/plugins/sample.c; sourceTree = "<group>"; };
+ A5AA94F3185799B700C940C8 /* db2sql.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = db2sql.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+ A5AA94F8185799DF00C940C8 /* db2sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = db2sql.c; path = src/plugins/db2sql.c; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ A5380CCA1856CE180090CBC4 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A56CC66718564315009EB79C /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A56CC6701856434D009EB79C /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A56CC67918564356009EB79C /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A58A5A21185801FF0099683E /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A5AA94E41857956100C940C8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A5AA94F0185799B700C940C8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ A5380CC81856CDF70090CBC4 /* tools */ = {
+ isa = PBXGroup;
+ children = (
+ A5380CD61856CE3C0090CBC4 /* mapcache.c */,
+ );
+ name = tools;
+ sourceTree = "<group>";
+ };
+ A56CC651185642B4009EB79C = {
+ isa = PBXGroup;
+ children = (
+ A5AA94EB185796A400C940C8 /* plugins */,
+ A56CC72018564BDF009EB79C /* 3rdparty */,
+ A58A5A1C185801490099683E /* core */,
+ A56CC65B185642B4009EB79C /* Products */,
+ );
+ sourceTree = "<group>";
+ usesTabs = 1;
+ };
+ A56CC65B185642B4009EB79C /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC66A18564315009EB79C /* login-server */,
+ A56CC6731856434D009EB79C /* char-server */,
+ A56CC67C18564356009EB79C /* map-server */,
+ A5380CCD1856CE180090CBC4 /* mapcache */,
+ A5AA94E71857956100C940C8 /* sample.dylib */,
+ A5AA94F3185799B700C940C8 /* db2sql.dylib */,
+ A58A5A26185801FF0099683E /* HPMHooking.dylib */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ A56CC66B18564315009EB79C /* login-server */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC68118564387009EB79C /* account_sql.c */,
+ A56CC68218564387009EB79C /* account.h */,
+ A56CC68318564387009EB79C /* ipban_sql.c */,
+ A56CC68418564387009EB79C /* ipban.h */,
+ A56CC68518564387009EB79C /* login.c */,
+ A56CC68618564387009EB79C /* login.h */,
+ A56CC68718564387009EB79C /* loginlog_sql.c */,
+ A56CC68818564387009EB79C /* loginlog.h */,
+ );
+ path = "login-server";
+ sourceTree = "<group>";
+ };
+ A56CC6741856434D009EB79C /* char-server */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC743185657D9009EB79C /* char.c */,
+ A56CC744185657D9009EB79C /* char.h */,
+ A56CC745185657D9009EB79C /* int_auction.c */,
+ A56CC746185657D9009EB79C /* int_auction.h */,
+ A56CC747185657D9009EB79C /* int_elemental.c */,
+ A56CC748185657D9009EB79C /* int_elemental.h */,
+ A56CC749185657D9009EB79C /* int_guild.c */,
+ A56CC74A185657D9009EB79C /* int_guild.h */,
+ A56CC74B185657D9009EB79C /* int_homun.c */,
+ A56CC74C185657D9009EB79C /* int_homun.h */,
+ A56CC74D185657D9009EB79C /* int_mail.c */,
+ A56CC74E185657D9009EB79C /* int_mail.h */,
+ A56CC74F185657D9009EB79C /* int_mercenary.c */,
+ A56CC750185657D9009EB79C /* int_mercenary.h */,
+ A56CC751185657D9009EB79C /* int_party.c */,
+ A56CC752185657D9009EB79C /* int_party.h */,
+ A56CC753185657D9009EB79C /* int_pet.c */,
+ A56CC754185657D9009EB79C /* int_pet.h */,
+ A56CC755185657D9009EB79C /* int_quest.c */,
+ A56CC756185657D9009EB79C /* int_quest.h */,
+ A56CC757185657D9009EB79C /* int_storage.c */,
+ A56CC758185657D9009EB79C /* int_storage.h */,
+ A56CC759185657D9009EB79C /* inter.c */,
+ A56CC75A185657D9009EB79C /* inter.h */,
+ A56CC75B185657D9009EB79C /* pincode.c */,
+ A56CC75C185657D9009EB79C /* pincode.h */,
+ );
+ path = "char-server";
+ sourceTree = "<group>";
+ };
+ A56CC67D18564357009EB79C /* map-server */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC76A18565812009EB79C /* atcommand.c */,
+ A56CC76B18565812009EB79C /* atcommand.h */,
+ A56CC76C18565812009EB79C /* battle.c */,
+ A56CC76D18565812009EB79C /* battle.h */,
+ A56CC76E18565812009EB79C /* battleground.c */,
+ A56CC76F18565812009EB79C /* battleground.h */,
+ A56CC77018565812009EB79C /* buyingstore.c */,
+ A56CC77118565812009EB79C /* buyingstore.h */,
+ A56CC77218565812009EB79C /* chat.c */,
+ A56CC77318565812009EB79C /* chat.h */,
+ A56CC77418565812009EB79C /* chrif.c */,
+ A56CC77518565812009EB79C /* chrif.h */,
+ A56CC77618565812009EB79C /* clif.c */,
+ A56CC77718565812009EB79C /* clif.h */,
+ A56CC77818565812009EB79C /* date.c */,
+ A56CC77918565812009EB79C /* date.h */,
+ A56CC77A18565812009EB79C /* duel.c */,
+ A56CC77B18565812009EB79C /* duel.h */,
+ A56CC77C18565812009EB79C /* elemental.c */,
+ A56CC77D18565812009EB79C /* elemental.h */,
+ A56CC77E18565812009EB79C /* guild.c */,
+ A56CC77F18565812009EB79C /* guild.h */,
+ A56CC78018565812009EB79C /* homunculus.c */,
+ A56CC78118565812009EB79C /* homunculus.h */,
+ A56CC78218565812009EB79C /* HPMmap.c */,
+ A56CC78318565812009EB79C /* HPMmap.h */,
+ A56CC78418565812009EB79C /* instance.c */,
+ A56CC78518565812009EB79C /* instance.h */,
+ A56CC78618565812009EB79C /* intif.c */,
+ A56CC78718565812009EB79C /* intif.h */,
+ A56CC78818565812009EB79C /* irc-bot.c */,
+ A56CC78918565812009EB79C /* irc-bot.h */,
+ A56CC78A18565812009EB79C /* itemdb.c */,
+ A56CC78B18565812009EB79C /* itemdb.h */,
+ A56CC78C18565812009EB79C /* log.c */,
+ A56CC78D18565812009EB79C /* log.h */,
+ A56CC78E18565812009EB79C /* mail.c */,
+ A56CC78F18565812009EB79C /* mail.h */,
+ A56CC79018565812009EB79C /* map.c */,
+ A56CC79118565812009EB79C /* map.h */,
+ A56CC79218565812009EB79C /* mapreg_sql.c */,
+ A56CC79318565812009EB79C /* mapreg.h */,
+ A56CC79418565812009EB79C /* mercenary.c */,
+ A56CC79518565812009EB79C /* mercenary.h */,
+ A56CC79618565812009EB79C /* mob.c */,
+ A56CC79718565812009EB79C /* mob.h */,
+ A56CC79818565812009EB79C /* npc_chat.c */,
+ A56CC79918565812009EB79C /* npc.c */,
+ A56CC79A18565812009EB79C /* npc.h */,
+ A56CC79B18565812009EB79C /* packets_struct.h */,
+ A56CC79C18565812009EB79C /* packets.h */,
+ A56CC79D18565812009EB79C /* party.c */,
+ A56CC79E18565812009EB79C /* party.h */,
+ A56CC79F18565812009EB79C /* path.c */,
+ A56CC7A018565812009EB79C /* path.h */,
+ A56CC7A118565812009EB79C /* pc_groups.c */,
+ A56CC7A218565812009EB79C /* pc_groups.h */,
+ A56CC7A318565812009EB79C /* pc.c */,
+ A56CC7A418565812009EB79C /* pc.h */,
+ A56CC7A518565812009EB79C /* pet.c */,
+ A56CC7A618565812009EB79C /* pet.h */,
+ A56CC7A718565812009EB79C /* quest.c */,
+ A56CC7A818565812009EB79C /* quest.h */,
+ A56CC7A918565812009EB79C /* script.c */,
+ A56CC7AA18565812009EB79C /* script.h */,
+ A56CC7AB18565812009EB79C /* searchstore.c */,
+ A56CC7AC18565812009EB79C /* searchstore.h */,
+ A56CC7AD18565812009EB79C /* skill.c */,
+ A56CC7AE18565812009EB79C /* skill.h */,
+ A56CC7AF18565812009EB79C /* status.c */,
+ A56CC7B018565812009EB79C /* status.h */,
+ A56CC7B118565812009EB79C /* storage.c */,
+ A56CC7B218565812009EB79C /* storage.h */,
+ A56CC7B318565812009EB79C /* trade.c */,
+ A56CC7B418565812009EB79C /* trade.h */,
+ A56CC7B518565812009EB79C /* unit.c */,
+ A56CC7B618565812009EB79C /* unit.h */,
+ A56CC7B718565812009EB79C /* vending.c */,
+ A56CC7B818565812009EB79C /* vending.h */,
+ );
+ path = "map-server";
+ sourceTree = "<group>";
+ };
+ A56CC68D1856439A009EB79C /* common */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC68E185643BB009EB79C /* atomic.h */,
+ A56CC68F185643BB009EB79C /* cbasetypes.h */,
+ A56CC690185643BB009EB79C /* conf.c */,
+ A56CC691185643BB009EB79C /* conf.h */,
+ A56CC692185643BB009EB79C /* console.c */,
+ A56CC693185643BB009EB79C /* console.h */,
+ A56CC694185643BB009EB79C /* core.c */,
+ A56CC695185643BB009EB79C /* core.h */,
+ A56CC696185643BB009EB79C /* db.c */,
+ A56CC697185643BB009EB79C /* db.h */,
+ A56CC698185643BB009EB79C /* des.c */,
+ A56CC699185643BB009EB79C /* des.h */,
+ A56CC69A185643BB009EB79C /* ers.c */,
+ A56CC69B185643BB009EB79C /* ers.h */,
+ A56CC69E185643BB009EB79C /* grfio.c */,
+ A56CC69F185643BB009EB79C /* grfio.h */,
+ A56CC6A0185643BB009EB79C /* HPM.c */,
+ A56CC6A1185643BB009EB79C /* HPM.h */,
+ A56CC6A2185643BB009EB79C /* HPMi.h */,
+ A56CC6A3185643BB009EB79C /* malloc.c */,
+ A56CC6A4185643BB009EB79C /* malloc.h */,
+ A56CC6A5185643BB009EB79C /* mapindex.c */,
+ A56CC6A6185643BB009EB79C /* mapindex.h */,
+ A56CC6A7185643BB009EB79C /* md5calc.c */,
+ A56CC6A8185643BB009EB79C /* md5calc.h */,
+ A56CC6AB185643BB009EB79C /* mmo.h */,
+ A56CC6AC185643BB009EB79C /* mutex.c */,
+ A56CC6AD185643BB009EB79C /* mutex.h */,
+ A56CC6B2185643BB009EB79C /* nullpo.c */,
+ A56CC6B3185643BB009EB79C /* nullpo.h */,
+ A56CC6B6185643BB009EB79C /* random.c */,
+ A56CC6B7185643BB009EB79C /* random.h */,
+ A56CC6B8185643BB009EB79C /* showmsg.c */,
+ A56CC6B9185643BB009EB79C /* showmsg.h */,
+ A56CC6BA185643BB009EB79C /* socket.c */,
+ A56CC6BB185643BB009EB79C /* socket.h */,
+ A56CC6BC185643BB009EB79C /* spinlock.h */,
+ A56CC6BD185643BB009EB79C /* sql.c */,
+ A56CC6BE185643BB009EB79C /* sql.h */,
+ A56CC6BF185643BB009EB79C /* strlib.c */,
+ A56CC6C0185643BB009EB79C /* strlib.h */,
+ A56CC6C2185643BB009EB79C /* thread.c */,
+ A56CC6C3185643BB009EB79C /* thread.h */,
+ A56CC6C4185643BB009EB79C /* timer.c */,
+ A56CC6C5185643BB009EB79C /* timer.h */,
+ A56CC6C6185643BB009EB79C /* utils.c */,
+ A56CC6C7185643BB009EB79C /* utils.h */,
+ A56CC6C8185643BB009EB79C /* winapi.h */,
+ );
+ name = common;
+ sourceTree = "<group>";
+ };
+ A56CC71A18564AC7009EB79C /* config */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC71F18564B00009EB79C /* general.h */,
+ A56CC71B18564AF7009EB79C /* const.h */,
+ A56CC71C18564AF7009EB79C /* core.h */,
+ A56CC71D18564AF7009EB79C /* renewal.h */,
+ A56CC71E18564AF7009EB79C /* secure.h */,
+ );
+ name = config;
+ sourceTree = "<group>";
+ };
+ A56CC72018564BDF009EB79C /* 3rdparty */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC73D18564C10009EB79C /* mt19937ar */,
+ A56CC72118564BE5009EB79C /* libconfig */,
+ );
+ name = 3rdparty;
+ sourceTree = "<group>";
+ };
+ A56CC72118564BE5009EB79C /* libconfig */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC72218564C05009EB79C /* grammar.c */,
+ A56CC72318564C05009EB79C /* grammar.h */,
+ A56CC72418564C05009EB79C /* libconfig.c */,
+ A56CC72518564C05009EB79C /* libconfig.h */,
+ A56CC72618564C05009EB79C /* parsectx.h */,
+ A56CC72718564C05009EB79C /* scanctx.c */,
+ A56CC72818564C05009EB79C /* scanctx.h */,
+ A56CC72918564C05009EB79C /* scanner.c */,
+ A56CC72A18564C05009EB79C /* scanner.h */,
+ A56CC72B18564C05009EB79C /* strbuf.c */,
+ A56CC72C18564C05009EB79C /* strbuf.h */,
+ A56CC72D18564C05009EB79C /* wincompat.h */,
+ );
+ name = libconfig;
+ sourceTree = "<group>";
+ };
+ A56CC73D18564C10009EB79C /* mt19937ar */ = {
+ isa = PBXGroup;
+ children = (
+ A56CC73E18564C23009EB79C /* mt19937ar.c */,
+ A56CC73F18564C23009EB79C /* mt19937ar.h */,
+ );
+ name = mt19937ar;
+ sourceTree = "<group>";
+ };
+ A58A5A1C185801490099683E /* core */ = {
+ isa = PBXGroup;
+ children = (
+ A5380CC81856CDF70090CBC4 /* tools */,
+ A56CC71A18564AC7009EB79C /* config */,
+ A56CC68D1856439A009EB79C /* common */,
+ A56CC66B18564315009EB79C /* login-server */,
+ A56CC6741856434D009EB79C /* char-server */,
+ A56CC67D18564357009EB79C /* map-server */,
+ );
+ name = core;
+ sourceTree = "<group>";
+ };
+ A58A5A291858026F0099683E /* HPMHooking */ = {
+ isa = PBXGroup;
+ children = (
+ A58A5A2A1858028C0099683E /* HPMHooking.GetSymbol.inc */,
+ A58A5A2B1858028C0099683E /* HPMHooking.HookingPoints.inc */,
+ A58A5A2C1858028C0099683E /* HPMHooking.Hooks.inc */,
+ A58A5A2D1858028C0099683E /* HPMHooking.HPMHooksCore.inc */,
+ A58A5A2E1858028C0099683E /* HPMHooking.sources.inc */,
+ A58A5A271858025D0099683E /* HPMHooking.c */,
+ );
+ name = HPMHooking;
+ sourceTree = "<group>";
+ };
+ A5AA94EB185796A400C940C8 /* plugins */ = {
+ isa = PBXGroup;
+ children = (
+ A58A5A291858026F0099683E /* HPMHooking */,
+ A5AA94F7185799CF00C940C8 /* db2sql */,
+ A5AA94EC185796AB00C940C8 /* sample */,
+ );
+ name = plugins;
+ sourceTree = "<group>";
+ };
+ A5AA94EC185796AB00C940C8 /* sample */ = {
+ isa = PBXGroup;
+ children = (
+ A5AA94ED185796CB00C940C8 /* sample.c */,
+ );
+ name = sample;
+ sourceTree = "<group>";
+ };
+ A5AA94F7185799CF00C940C8 /* db2sql */ = {
+ isa = PBXGroup;
+ children = (
+ A5AA94F8185799DF00C940C8 /* db2sql.c */,
+ );
+ name = db2sql;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ A58A5A22185801FF0099683E /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A5AA94E51857956100C940C8 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A5AA94F1185799B700C940C8 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ A5380CCC1856CE180090CBC4 /* mapcache */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A5380CD31856CE190090CBC4 /* Build configuration list for PBXNativeTarget "mapcache" */;
+ buildPhases = (
+ A5380CC91856CE180090CBC4 /* Sources */,
+ A5380CCA1856CE180090CBC4 /* Frameworks */,
+ A5380CCB1856CE180090CBC4 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = mapcache;
+ productName = mapcache;
+ productReference = A5380CCD1856CE180090CBC4 /* mapcache */;
+ productType = "com.apple.product-type.tool";
+ };
+ A56CC66918564315009EB79C /* login-server */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A56CC66C18564315009EB79C /* Build configuration list for PBXNativeTarget "login-server" */;
+ buildPhases = (
+ A56CC66618564315009EB79C /* Sources */,
+ A56CC66718564315009EB79C /* Frameworks */,
+ A56CC66818564315009EB79C /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "login-server";
+ productName = "login-server";
+ productReference = A56CC66A18564315009EB79C /* login-server */;
+ productType = "com.apple.product-type.tool";
+ };
+ A56CC6721856434D009EB79C /* char-server */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A56CC6751856434D009EB79C /* Build configuration list for PBXNativeTarget "char-server" */;
+ buildPhases = (
+ A56CC66F1856434D009EB79C /* Sources */,
+ A56CC6701856434D009EB79C /* Frameworks */,
+ A56CC6711856434D009EB79C /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "char-server";
+ productName = "char-server";
+ productReference = A56CC6731856434D009EB79C /* char-server */;
+ productType = "com.apple.product-type.tool";
+ };
+ A56CC67B18564356009EB79C /* map-server */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A56CC67E18564357009EB79C /* Build configuration list for PBXNativeTarget "map-server" */;
+ buildPhases = (
+ A56CC67818564356009EB79C /* Sources */,
+ A56CC67918564356009EB79C /* Frameworks */,
+ A56CC67A18564356009EB79C /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "map-server";
+ productName = "map-server";
+ productReference = A56CC67C18564356009EB79C /* map-server */;
+ productType = "com.apple.product-type.tool";
+ };
+ A58A5A1E185801FF0099683E /* HPMHooking */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A58A5A23185801FF0099683E /* Build configuration list for PBXNativeTarget "HPMHooking" */;
+ buildPhases = (
+ A58A5A1F185801FF0099683E /* Sources */,
+ A58A5A21185801FF0099683E /* Frameworks */,
+ A58A5A22185801FF0099683E /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = HPMHooking;
+ productName = sample;
+ productReference = A58A5A26185801FF0099683E /* HPMHooking.dylib */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ A5AA94E61857956100C940C8 /* sample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A5AA94EA1857956100C940C8 /* Build configuration list for PBXNativeTarget "sample" */;
+ buildPhases = (
+ A5AA94E31857956100C940C8 /* Sources */,
+ A5AA94E41857956100C940C8 /* Frameworks */,
+ A5AA94E51857956100C940C8 /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = sample;
+ productName = sample;
+ productReference = A5AA94E71857956100C940C8 /* sample.dylib */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ A5AA94F2185799B700C940C8 /* db2sql */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A5AA94F4185799B700C940C8 /* Build configuration list for PBXNativeTarget "db2sql" */;
+ buildPhases = (
+ A5AA94EF185799B700C940C8 /* Sources */,
+ A5AA94F0185799B700C940C8 /* Frameworks */,
+ A5AA94F1185799B700C940C8 /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = db2sql;
+ productName = db2sql;
+ productReference = A5AA94F3185799B700C940C8 /* db2sql.dylib */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ A56CC652185642B4009EB79C /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0500;
+ ORGANIZATIONNAME = hercules.ws;
+ };
+ buildConfigurationList = A56CC655185642B4009EB79C /* Build configuration list for PBXProject "Hercules" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = A56CC651185642B4009EB79C;
+ productRefGroup = A56CC65B185642B4009EB79C /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ A56CC66918564315009EB79C /* login-server */,
+ A56CC6721856434D009EB79C /* char-server */,
+ A56CC67B18564356009EB79C /* map-server */,
+ A5380CCC1856CE180090CBC4 /* mapcache */,
+ A58A5A1E185801FF0099683E /* HPMHooking */,
+ A5AA94F2185799B700C940C8 /* db2sql */,
+ A5AA94E61857956100C940C8 /* sample */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ A5380CC91856CE180090CBC4 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A58A5A1A185800CD0099683E /* strlib.c in Sources */,
+ A5380CD91856CF4A0090CBC4 /* core.c in Sources */,
+ A567612D185D11D700997C0D /* nullpo.c in Sources */,
+ A5380CD81856CE8A0090CBC4 /* console.c in Sources */,
+ A58A5A19185800C20099683E /* des.c in Sources */,
+ A5380CD71856CE3C0090CBC4 /* mapcache.c in Sources */,
+ A58A5A1B185800E70099683E /* utils.c in Sources */,
+ A58A5A18185800B80099683E /* grfio.c in Sources */,
+ A5380CDA1856D0650090CBC4 /* socket.c in Sources */,
+ A58A5A17185800A40099683E /* showmsg.c in Sources */,
+ A5380CDB1856D0690090CBC4 /* malloc.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A56CC66618564315009EB79C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A56CC6C9185643BB009EB79C /* conf.c in Sources */,
+ A56CC68B18564387009EB79C /* login.c in Sources */,
+ A56CC6D8185643BB009EB79C /* ers.c in Sources */,
+ A56CC73718564C05009EB79C /* scanner.c in Sources */,
+ A56CC6EA185643BB009EB79C /* md5calc.c in Sources */,
+ A56CC74018564C23009EB79C /* mt19937ar.c in Sources */,
+ A56CC6DE185643BB009EB79C /* grfio.c in Sources */,
+ A56CC68C18564387009EB79C /* loginlog_sql.c in Sources */,
+ A56CC73118564C05009EB79C /* libconfig.c in Sources */,
+ A56CC717185643BB009EB79C /* utils.c in Sources */,
+ A56CC708185643BB009EB79C /* sql.c in Sources */,
+ A56CC702185643BB009EB79C /* showmsg.c in Sources */,
+ A56CC6F9185643BB009EB79C /* nullpo.c in Sources */,
+ A56CC6D5185643BB009EB79C /* des.c in Sources */,
+ A56CC6E7185643BB009EB79C /* mapindex.c in Sources */,
+ A56CC73A18564C05009EB79C /* strbuf.c in Sources */,
+ A56CC6F0185643BB009EB79C /* mutex.c in Sources */,
+ A56CC6D2185643BB009EB79C /* db.c in Sources */,
+ A56CC711185643BB009EB79C /* thread.c in Sources */,
+ A56CC70B185643BB009EB79C /* strlib.c in Sources */,
+ A56CC6CF185643BB009EB79C /* core.c in Sources */,
+ A56CC6CC185643BB009EB79C /* console.c in Sources */,
+ A56CC72E18564C05009EB79C /* grammar.c in Sources */,
+ A56CC705185643BB009EB79C /* socket.c in Sources */,
+ A56CC68918564387009EB79C /* account_sql.c in Sources */,
+ A56CC6E4185643BB009EB79C /* malloc.c in Sources */,
+ A56CC6E1185643BB009EB79C /* HPM.c in Sources */,
+ A56CC6FF185643BB009EB79C /* random.c in Sources */,
+ A56CC73418564C05009EB79C /* scanctx.c in Sources */,
+ A56CC714185643BB009EB79C /* timer.c in Sources */,
+ A56CC68A18564387009EB79C /* ipban_sql.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A56CC66F1856434D009EB79C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A56CC766185657D9009EB79C /* int_quest.c in Sources */,
+ A56CC709185643BB009EB79C /* sql.c in Sources */,
+ A56CC75E185657D9009EB79C /* int_auction.c in Sources */,
+ A56CC75D185657D9009EB79C /* char.c in Sources */,
+ A56CC6D9185643BB009EB79C /* ers.c in Sources */,
+ A56CC6CA185643BB009EB79C /* conf.c in Sources */,
+ A56CC718185643BB009EB79C /* utils.c in Sources */,
+ A56CC715185643BB009EB79C /* timer.c in Sources */,
+ A56CC6CD185643BB009EB79C /* console.c in Sources */,
+ A56CC72F18564C05009EB79C /* grammar.c in Sources */,
+ A56CC6EB185643BB009EB79C /* md5calc.c in Sources */,
+ A56CC760185657D9009EB79C /* int_guild.c in Sources */,
+ A56CC768185657D9009EB79C /* inter.c in Sources */,
+ A56CC73818564C05009EB79C /* scanner.c in Sources */,
+ A56CC700185643BB009EB79C /* random.c in Sources */,
+ A56CC761185657D9009EB79C /* int_homun.c in Sources */,
+ A56CC6FA185643BB009EB79C /* nullpo.c in Sources */,
+ A56CC6E5185643BB009EB79C /* malloc.c in Sources */,
+ A56CC6E2185643BB009EB79C /* HPM.c in Sources */,
+ A56CC765185657D9009EB79C /* int_pet.c in Sources */,
+ A56CC769185657D9009EB79C /* pincode.c in Sources */,
+ A56CC6F1185643BB009EB79C /* mutex.c in Sources */,
+ A56CC762185657D9009EB79C /* int_mail.c in Sources */,
+ A56CC706185643BB009EB79C /* socket.c in Sources */,
+ A56CC6D6185643BB009EB79C /* des.c in Sources */,
+ A56CC764185657D9009EB79C /* int_party.c in Sources */,
+ A56CC73B18564C05009EB79C /* strbuf.c in Sources */,
+ A56CC6E8185643BB009EB79C /* mapindex.c in Sources */,
+ A56CC73218564C05009EB79C /* libconfig.c in Sources */,
+ A56CC74118564C23009EB79C /* mt19937ar.c in Sources */,
+ A56CC73518564C05009EB79C /* scanctx.c in Sources */,
+ A56CC712185643BB009EB79C /* thread.c in Sources */,
+ A56CC6D0185643BB009EB79C /* core.c in Sources */,
+ A56CC767185657D9009EB79C /* int_storage.c in Sources */,
+ A56CC763185657D9009EB79C /* int_mercenary.c in Sources */,
+ A56CC6D3185643BB009EB79C /* db.c in Sources */,
+ A56CC703185643BB009EB79C /* showmsg.c in Sources */,
+ A56CC6DF185643BB009EB79C /* grfio.c in Sources */,
+ A56CC70C185643BB009EB79C /* strlib.c in Sources */,
+ A56CC75F185657D9009EB79C /* int_elemental.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A56CC67818564356009EB79C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A56CC7DE18565812009EB79C /* unit.c in Sources */,
+ A56CC7B918565812009EB79C /* atcommand.c in Sources */,
+ A56CC7D218565812009EB79C /* party.c in Sources */,
+ A56CC7C118565812009EB79C /* duel.c in Sources */,
+ A56CC70A185643BB009EB79C /* sql.c in Sources */,
+ A56CC7D718565812009EB79C /* quest.c in Sources */,
+ A56CC7CC18565812009EB79C /* map.c in Sources */,
+ A56CC7C318565812009EB79C /* guild.c in Sources */,
+ A56CC7C518565812009EB79C /* HPMmap.c in Sources */,
+ A56CC6DA185643BB009EB79C /* ers.c in Sources */,
+ A56CC7C418565812009EB79C /* homunculus.c in Sources */,
+ A56CC7D618565812009EB79C /* pet.c in Sources */,
+ A56CC7BC18565812009EB79C /* buyingstore.c in Sources */,
+ A56CC6CB185643BB009EB79C /* conf.c in Sources */,
+ A56CC7DB18565812009EB79C /* status.c in Sources */,
+ A56CC7C018565812009EB79C /* date.c in Sources */,
+ A56CC719185643BB009EB79C /* utils.c in Sources */,
+ A56CC7D818565812009EB79C /* script.c in Sources */,
+ A56CC7C818565812009EB79C /* irc-bot.c in Sources */,
+ A56CC7BE18565812009EB79C /* chrif.c in Sources */,
+ A56CC7CE18565812009EB79C /* mercenary.c in Sources */,
+ A56CC7D518565812009EB79C /* pc.c in Sources */,
+ A56CC7C718565812009EB79C /* intif.c in Sources */,
+ A56CC7C918565812009EB79C /* itemdb.c in Sources */,
+ A56CC716185643BB009EB79C /* timer.c in Sources */,
+ A56CC7DF18565812009EB79C /* vending.c in Sources */,
+ A56CC7BA18565812009EB79C /* battle.c in Sources */,
+ A56CC7BF18565812009EB79C /* clif.c in Sources */,
+ A56CC7D018565812009EB79C /* npc_chat.c in Sources */,
+ A56CC6CE185643BB009EB79C /* console.c in Sources */,
+ A56CC73018564C05009EB79C /* grammar.c in Sources */,
+ A56CC7DA18565812009EB79C /* skill.c in Sources */,
+ A56CC6EC185643BB009EB79C /* md5calc.c in Sources */,
+ A56CC73918564C05009EB79C /* scanner.c in Sources */,
+ A56CC701185643BB009EB79C /* random.c in Sources */,
+ A56CC7CD18565812009EB79C /* mapreg_sql.c in Sources */,
+ A56CC7D318565812009EB79C /* path.c in Sources */,
+ A56CC7C218565812009EB79C /* elemental.c in Sources */,
+ A56CC6FB185643BB009EB79C /* nullpo.c in Sources */,
+ A56CC6E6185643BB009EB79C /* malloc.c in Sources */,
+ A56CC7D418565812009EB79C /* pc_groups.c in Sources */,
+ A56CC6E3185643BB009EB79C /* HPM.c in Sources */,
+ A56CC7DD18565812009EB79C /* trade.c in Sources */,
+ A56CC7CA18565812009EB79C /* log.c in Sources */,
+ A56CC7C618565812009EB79C /* instance.c in Sources */,
+ A56CC6F2185643BB009EB79C /* mutex.c in Sources */,
+ A56CC707185643BB009EB79C /* socket.c in Sources */,
+ A56CC6D7185643BB009EB79C /* des.c in Sources */,
+ A56CC73C18564C05009EB79C /* strbuf.c in Sources */,
+ A56CC7DC18565812009EB79C /* storage.c in Sources */,
+ A56CC6E9185643BB009EB79C /* mapindex.c in Sources */,
+ A56CC7D918565812009EB79C /* searchstore.c in Sources */,
+ A56CC73318564C05009EB79C /* libconfig.c in Sources */,
+ A56CC74218564C23009EB79C /* mt19937ar.c in Sources */,
+ A56CC7BD18565812009EB79C /* chat.c in Sources */,
+ A56CC7CF18565812009EB79C /* mob.c in Sources */,
+ A56CC7BB18565812009EB79C /* battleground.c in Sources */,
+ A56CC73618564C05009EB79C /* scanctx.c in Sources */,
+ A56CC713185643BB009EB79C /* thread.c in Sources */,
+ A56CC7CB18565812009EB79C /* mail.c in Sources */,
+ A56CC6D1185643BB009EB79C /* core.c in Sources */,
+ A56CC7D118565812009EB79C /* npc.c in Sources */,
+ A56CC6D4185643BB009EB79C /* db.c in Sources */,
+ A56CC704185643BB009EB79C /* showmsg.c in Sources */,
+ A56CC6E0185643BB009EB79C /* grfio.c in Sources */,
+ A56CC70D185643BB009EB79C /* strlib.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A58A5A1F185801FF0099683E /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A58A5A281858025D0099683E /* HPMHooking.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A5AA94E31857956100C940C8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A5AA94EE185796CB00C940C8 /* sample.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ A5AA94EF185799B700C940C8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A5AA94FA185799E400C940C8 /* db2sql.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ A5380CD41856CE190090CBC4 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ OTHER_CFLAGS = (
+ "-DMAXCONN=16384",
+ "-DHAS_TLS",
+ "-DHAVE_SETRLIMIT",
+ "-DHAVE_STRNLEN",
+ "-DPACKAGE_NAME=\\\"\\\"",
+ "-DPACKAGE_TARNAME=\\\"\\\"",
+ "-DPACKAGE_VERSION=\\\"\\\"",
+ "-DPACKAGE_STRING=\\\"\\\"",
+ "-DPACKAGE_BUGREPORT=\\\"\\\"",
+ "-DPACKAGE_URL=\\\"\\\"",
+ "-DSTDC_HEADERS=1",
+ "-DHAVE_SYS_TYPES_H=1",
+ "-DHAVE_SYS_STAT_H=1",
+ "-DHAVE_STDLIB_H=1",
+ "-DHAVE_STRING_H=1",
+ "-DHAVE_MEMORY_H=1",
+ "-DHAVE_STRINGS_H=1",
+ "-DHAVE_INTTYPES_H=1",
+ "-DHAVE_STDINT_H=1",
+ "-DHAVE_UNISTD_H=1",
+ "-D__EXTENSIONS__=1",
+ "-D_ALL_SOURCE=1",
+ "-D_GNU_SOURCE=1",
+ "-D_POSIX_PTHREAD_SEMANTICS=1",
+ "-D_TANDEM_SOURCE=1",
+ "-DHAVE_USELOCALE=1",
+ "-DHAVE_NEWLOCALE=1",
+ "-DHAVE_FREELOCALE=1",
+ "-DHAVE_XLOCALE_H=1",
+ "-DHAVE_LIBZ=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DMINICORE",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ A5380CD51856CE190090CBC4 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ OTHER_CFLAGS = (
+ "-DMAXCONN=16384",
+ "-DHAS_TLS",
+ "-DHAVE_SETRLIMIT",
+ "-DHAVE_STRNLEN",
+ "-DPACKAGE_NAME=\\\"\\\"",
+ "-DPACKAGE_TARNAME=\\\"\\\"",
+ "-DPACKAGE_VERSION=\\\"\\\"",
+ "-DPACKAGE_STRING=\\\"\\\"",
+ "-DPACKAGE_BUGREPORT=\\\"\\\"",
+ "-DPACKAGE_URL=\\\"\\\"",
+ "-DSTDC_HEADERS=1",
+ "-DHAVE_SYS_TYPES_H=1",
+ "-DHAVE_SYS_STAT_H=1",
+ "-DHAVE_STDLIB_H=1",
+ "-DHAVE_STRING_H=1",
+ "-DHAVE_MEMORY_H=1",
+ "-DHAVE_STRINGS_H=1",
+ "-DHAVE_INTTYPES_H=1",
+ "-DHAVE_STDINT_H=1",
+ "-DHAVE_UNISTD_H=1",
+ "-D__EXTENSIONS__=1",
+ "-D_ALL_SOURCE=1",
+ "-D_GNU_SOURCE=1",
+ "-D_POSIX_PTHREAD_SEMANTICS=1",
+ "-D_TANDEM_SOURCE=1",
+ "-DHAVE_USELOCALE=1",
+ "-DHAVE_NEWLOCALE=1",
+ "-DHAVE_FREELOCALE=1",
+ "-DHAVE_XLOCALE_H=1",
+ "-DHAVE_LIBZ=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DHAVE_LIBPTHREAD=1",
+ "-DMINICORE",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ A56CC661185642B4009EB79C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_FAST_MATH = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_STRICT_ALIASING = NO;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /usr/include,
+ /usr/local/include,
+ /usr/local/include/mysql,
+ 3rdparty/mt19937ar,
+ 3rdparty/libconfig,
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ );
+ LIBRARY_SEARCH_PATHS = /usr/local/lib;
+ MACOSX_DEPLOYMENT_TARGET = "";
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_CFLAGS = (
+ "-DMAXCONN=16384",
+ "-DHAS_TLS",
+ "-DHAVE_SETRLIMIT",
+ "-DHAVE_STRNLEN",
+ "-DPACKAGE_NAME=\\\"\\\"",
+ "-DPACKAGE_TARNAME=\\\"\\\"",
+ "-DPACKAGE_VERSION=\\\"\\\"",
+ "-DPACKAGE_STRING=\\\"\\\"",
+ "-DPACKAGE_BUGREPORT=\\\"\\\"",
+ "-DPACKAGE_URL=\\\"\\\"",
+ "-DSTDC_HEADERS=1",
+ "-DHAVE_SYS_TYPES_H=1",
+ "-DHAVE_SYS_STAT_H=1",
+ "-DHAVE_STDLIB_H=1",
+ "-DHAVE_STRING_H=1",
+ "-DHAVE_MEMORY_H=1",
+ "-DHAVE_STRINGS_H=1",
+ "-DHAVE_INTTYPES_H=1",
+ "-DHAVE_STDINT_H=1",
+ "-DHAVE_UNISTD_H=1",
+ "-D__EXTENSIONS__=1",
+ "-D_ALL_SOURCE=1",
+ "-D_GNU_SOURCE=1",
+ "-D_POSIX_PTHREAD_SEMANTICS=1",
+ "-D_TANDEM_SOURCE=1",
+ "-DHAVE_USELOCALE=1",
+ "-DHAVE_NEWLOCALE=1",
+ "-DHAVE_FREELOCALE=1",
+ "-DHAVE_XLOCALE_H=1",
+ "-DHAVE_LIBZ=1",
+ "-DHAVE_LIBPTHREAD=1",
+ );
+ OTHER_LDFLAGS = (
+ "-lpthread",
+ "-lz",
+ "-lmysqlclient",
+ );
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ A56CC662185642B4009EB79C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_FAST_MATH = YES;
+ GCC_STRICT_ALIASING = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /usr/include,
+ /usr/local/include,
+ /usr/local/include/mysql,
+ 3rdparty/mt19937ar,
+ 3rdparty/libconfig,
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ );
+ LIBRARY_SEARCH_PATHS = /usr/local/lib;
+ LLVM_LTO = YES;
+ MACOSX_DEPLOYMENT_TARGET = "";
+ OTHER_CFLAGS = (
+ "-DMAXCONN=16384",
+ "-DHAS_TLS",
+ "-DHAVE_SETRLIMIT",
+ "-DHAVE_STRNLEN",
+ "-DPACKAGE_NAME=\\\"\\\"",
+ "-DPACKAGE_TARNAME=\\\"\\\"",
+ "-DPACKAGE_VERSION=\\\"\\\"",
+ "-DPACKAGE_STRING=\\\"\\\"",
+ "-DPACKAGE_BUGREPORT=\\\"\\\"",
+ "-DPACKAGE_URL=\\\"\\\"",
+ "-DSTDC_HEADERS=1",
+ "-DHAVE_SYS_TYPES_H=1",
+ "-DHAVE_SYS_STAT_H=1",
+ "-DHAVE_STDLIB_H=1",
+ "-DHAVE_STRING_H=1",
+ "-DHAVE_MEMORY_H=1",
+ "-DHAVE_STRINGS_H=1",
+ "-DHAVE_INTTYPES_H=1",
+ "-DHAVE_STDINT_H=1",
+ "-DHAVE_UNISTD_H=1",
+ "-D__EXTENSIONS__=1",
+ "-D_ALL_SOURCE=1",
+ "-D_GNU_SOURCE=1",
+ "-D_POSIX_PTHREAD_SEMANTICS=1",
+ "-D_TANDEM_SOURCE=1",
+ "-DHAVE_USELOCALE=1",
+ "-DHAVE_NEWLOCALE=1",
+ "-DHAVE_FREELOCALE=1",
+ "-DHAVE_XLOCALE_H=1",
+ "-DHAVE_LIBZ=1",
+ "-DHAVE_LIBPTHREAD=1",
+ );
+ OTHER_LDFLAGS = (
+ "-lpthread",
+ "-lz",
+ "-lmysqlclient",
+ );
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ A56CC66D18564315009EB79C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ A56CC66E18564315009EB79C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ A56CC6761856434D009EB79C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ A56CC6771856434D009EB79C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ A56CC67F18564357009EB79C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ A56CC68018564357009EB79C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ A58A5A24185801FF0099683E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins";
+ EXECUTABLE_PREFIX = "";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = HPMHooking;
+ };
+ name = Debug;
+ };
+ A58A5A25185801FF0099683E /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins";
+ EXECUTABLE_PREFIX = "";
+ PRODUCT_NAME = HPMHooking;
+ };
+ name = Release;
+ };
+ A5AA94E81857956100C940C8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins";
+ EXECUTABLE_PREFIX = "";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ A5AA94E91857956100C940C8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins";
+ EXECUTABLE_PREFIX = "";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ A5AA94F5185799B700C940C8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins";
+ EXECUTABLE_PREFIX = "";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ A5AA94F6185799B700C940C8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins";
+ EXECUTABLE_PREFIX = "";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ A5380CD31856CE190090CBC4 /* Build configuration list for PBXNativeTarget "mapcache" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A5380CD41856CE190090CBC4 /* Debug */,
+ A5380CD51856CE190090CBC4 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A56CC655185642B4009EB79C /* Build configuration list for PBXProject "Hercules" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A56CC661185642B4009EB79C /* Debug */,
+ A56CC662185642B4009EB79C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A56CC66C18564315009EB79C /* Build configuration list for PBXNativeTarget "login-server" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A56CC66D18564315009EB79C /* Debug */,
+ A56CC66E18564315009EB79C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A56CC6751856434D009EB79C /* Build configuration list for PBXNativeTarget "char-server" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A56CC6761856434D009EB79C /* Debug */,
+ A56CC6771856434D009EB79C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A56CC67E18564357009EB79C /* Build configuration list for PBXNativeTarget "map-server" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A56CC67F18564357009EB79C /* Debug */,
+ A56CC68018564357009EB79C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A58A5A23185801FF0099683E /* Build configuration list for PBXNativeTarget "HPMHooking" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A58A5A24185801FF0099683E /* Debug */,
+ A58A5A25185801FF0099683E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A5AA94EA1857956100C940C8 /* Build configuration list for PBXNativeTarget "sample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A5AA94E81857956100C940C8 /* Debug */,
+ A5AA94E91857956100C940C8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A5AA94F4185799B700C940C8 /* Build configuration list for PBXNativeTarget "db2sql" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A5AA94F5185799B700C940C8 /* Debug */,
+ A5AA94F6185799B700C940C8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = A56CC652185642B4009EB79C /* Project object */;
+}
diff --git a/Hercules.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Hercules.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 000000000..14eee78d6
--- /dev/null
+++ b/Hercules.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:Hercules.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking.xcscheme
new file mode 100644
index 000000000..50337fc91
--- /dev/null
+++ b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking.xcscheme
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A58A5A1E185801FF0099683E"
+ BuildableName = "HPMHooking.dylib"
+ BlueprintName = "HPMHooking"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/char-server.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/char-server.xcscheme
new file mode 100644
index 000000000..0b5101f68
--- /dev/null
+++ b/Hercules.xcodeproj/xcshareddata/xcschemes/char-server.xcscheme
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC6721856434D009EB79C"
+ BuildableName = "char-server"
+ BlueprintName = "char-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC6721856434D009EB79C"
+ BuildableName = "char-server"
+ BlueprintName = "char-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC6721856434D009EB79C"
+ BuildableName = "char-server"
+ BlueprintName = "char-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC6721856434D009EB79C"
+ BuildableName = "char-server"
+ BlueprintName = "char-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/db2sql.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/db2sql.xcscheme
new file mode 100644
index 000000000..8aebe0f38
--- /dev/null
+++ b/Hercules.xcodeproj/xcshareddata/xcschemes/db2sql.xcscheme
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0500"
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A5AA94F2185799B700C940C8"
+ BuildableName = "db2sql.dylib"
+ BlueprintName = "db2sql"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <PreActions>
+ <ExecutionAction
+ ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
+ <ActionContent
+ title = "Run Script"
+ scriptText = "sed -e &apos;s:^\([[:blank:]]*\)//&quot;db2sql&quot;,$:\1&quot;db2sql&quot;,:&apos; -i .db2sql &quot;${PROJECT_DIR}/conf/plugins.conf&quot;"
+ shellToInvoke = "/bin/bash">
+ <EnvironmentBuildable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </EnvironmentBuildable>
+ </ActionContent>
+ </ExecutionAction>
+ </PreActions>
+ <PostActions>
+ <ExecutionAction
+ ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
+ <ActionContent
+ title = "Run Script"
+ scriptText = "mv &quot;${PROJECT_DIR}/conf/plugins.conf.db2sql&quot; &quot;${PROJECT_DIR}/conf/plugins.conf&quot;"
+ shellToInvoke = "/bin/bash">
+ <EnvironmentBuildable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </EnvironmentBuildable>
+ </ActionContent>
+ </ExecutionAction>
+ </PostActions>
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <CommandLineArguments>
+ <CommandLineArgument
+ argument = "--db2sql"
+ isEnabled = "YES">
+ </CommandLineArgument>
+ </CommandLineArguments>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/login-server.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/login-server.xcscheme
new file mode 100644
index 000000000..10b7e424a
--- /dev/null
+++ b/Hercules.xcodeproj/xcshareddata/xcschemes/login-server.xcscheme
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC66918564315009EB79C"
+ BuildableName = "login-server"
+ BlueprintName = "login-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC66918564315009EB79C"
+ BuildableName = "login-server"
+ BlueprintName = "login-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC66918564315009EB79C"
+ BuildableName = "login-server"
+ BlueprintName = "login-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC66918564315009EB79C"
+ BuildableName = "login-server"
+ BlueprintName = "login-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/map-server.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/map-server.xcscheme
new file mode 100644
index 000000000..bb95d0555
--- /dev/null
+++ b/Hercules.xcodeproj/xcshareddata/xcschemes/map-server.xcscheme
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A56CC67B18564356009EB79C"
+ BuildableName = "map-server"
+ BlueprintName = "map-server"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/mapcache.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/mapcache.xcscheme
new file mode 100644
index 000000000..30ab4dc51
--- /dev/null
+++ b/Hercules.xcodeproj/xcshareddata/xcschemes/mapcache.xcscheme
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A5380CCC1856CE180090CBC4"
+ BuildableName = "mapcache"
+ BlueprintName = "mapcache"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A5380CCC1856CE180090CBC4"
+ BuildableName = "mapcache"
+ BlueprintName = "mapcache"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A5380CCC1856CE180090CBC4"
+ BuildableName = "mapcache"
+ BlueprintName = "mapcache"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A5380CCC1856CE180090CBC4"
+ BuildableName = "mapcache"
+ BlueprintName = "mapcache"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/sample.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/sample.xcscheme
new file mode 100644
index 000000000..a9df36929
--- /dev/null
+++ b/Hercules.xcodeproj/xcshareddata/xcschemes/sample.xcscheme
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A5AA94E61857956100C940C8"
+ BuildableName = "sample.dylib"
+ BlueprintName = "sample"
+ ReferencedContainer = "container:Hercules.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/conf/battle/misc.conf b/conf/battle/misc.conf
index 41866056a..dd3d57aaa 100644
--- a/conf/battle/misc.conf
+++ b/conf/battle/misc.conf
@@ -120,3 +120,18 @@ mail_show_status: 0
// Is monster transformation disabled during Guild Wars?
// If set to yes, monster transforming is automatically removed/disabled when entering castles during WoE times
mon_trans_disable_in_gvg: no
+
+// Whether AegisName and SpriteName lookups are case sensitive
+// Default: yes (as in official servers)
+// When this is set to yes, item and monster lookups through atcommands and
+// script commands will match AegisNames and SpriteNames only when the case
+// matches. Display name lookups are not affected by this setting.
+// Example: Given the two items:
+// - { Id: 553, AegisName: "Bun", Name: "Bao" }
+// - { Id: 6115, AegisName: "Bun_", Name: "Bun" }
+// query when 'yes' when 'no'
+// @item bun # 6115 # 553
+// @item Bun # 553 # 553
+// @item Bao # 553 # 553
+// @item Bun_ # 6115 # 6115
+case_sensitive_aegisnames: yes
diff --git a/conf/char-server.conf b/conf/char-server.conf
index a7f26daaa..cbba2fe0b 100644
--- a/conf/char-server.conf
+++ b/conf/char-server.conf
@@ -151,7 +151,7 @@ char_del_delay: 86400
db_path: db
//==================================================================
-// Pincode system -- INCOMPLETE / BROKEN
+// Pincode system
//==================================================================
// A window is opened before you can select your character and you will have to enter a pincode by using only your mouse
diff --git a/conf/messages.conf b/conf/messages.conf
index ba63dc73a..8b3daa684 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -1520,11 +1520,12 @@
//src/map/pc.c::pc_isUseitem
1474: You cannot use this item while sitting
+1475: You cannot use this item while storage is open
1476: You are already mounting something else
//src/map/pc.c::pc_isUseitem
-1477: Item cannot be open when overweight by 90%
+1477: Item cannot be open when inventory is full
//@homlv
1478: Homun reached its maximum level of '%d'
diff --git a/configure b/configure
index bf0a4d8ea..7142ed479 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 0219c4d.
+# From configure.in d0f16b7.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -3643,12 +3643,12 @@ fi
# Check whether --enable-lto was given.
if test "${enable_lto+set}" = set; then :
enableval=$enable_lto;
- enable_lto="$enableval"
- case $enableval in
- "no");;
- "yes");;
- *) as_fn_error $? "invalid argument --enable-lto=$disableval... stopping" "$LINENO" 5;;
- esac
+ enable_lto="$enableval"
+ case $enableval in
+ "no");;
+ "yes");;
+ *) as_fn_error $? "invalid argument --enable-lto=$disableval... stopping" "$LINENO" 5;;
+ esac
else
enable_lto="yes"
@@ -4566,7 +4566,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wno-sign-compare"
+CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare"
CPPFLAGS="$CPPFLAGS -I../common"
@@ -4924,28 +4924,6 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-unused-parameter" >&5
-$as_echo_n "checking whether $CC supports -Wno-unused-parameter... " >&6; }
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-unused-parameter"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$OLD_CFLAGS"
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
#
# LTO Support test
#
@@ -4970,8 +4948,8 @@ else
/* end confdefs.h. */
int main(int argc, char **argv){
- return 0;
- }
+ return 0;
+ }
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -4995,23 +4973,278 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-pointer-sign" >&5
-$as_echo_n "checking whether $CC supports -Wno-pointer-sign... " >&6; }
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-pointer-sign"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-unused-parameter" >&5
+$as_echo_n "checking whether $CC supports -Wno-unused-parameter... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-unused-parameter"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ # Recent versions of gcc don't fail if -Wno-foo is not recognized
+ # (unless there are also other warnings), so we also check for -Wfoo
+ # which always fails if not supported
+ CFLAGS="$OLD_CFLAGS -Werror -Wunused-parameter"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-unused-parameter"
+ # Optionally, run a test
+ if test "xint foo(int bar) { return 0; }" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-unused-parameter" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-unused-parameter... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wunused-parameter"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(int bar) { return 0; }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed but enabled" >&5
+$as_echo "not needed but enabled" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+else
+
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-unused-parameter"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(int bar) { return 0; }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-unused-parameter"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-maybe-uninitialized" >&5
+$as_echo_n "checking whether $CC supports -Wno-maybe-uninitialized... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-maybe-uninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Recent versions of gcc don't fail if -Wno-foo is not recognized
+ # (unless there are also other warnings), so we also check for -Wfoo
+ # which always fails if not supported
+ CFLAGS="$OLD_CFLAGS -Werror -Wmaybe-uninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-maybe-uninitialized"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-maybe-uninitialized" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-maybe-uninitialized... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wmaybe-uninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed but enabled" >&5
+$as_echo "not needed but enabled" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+else
+
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-maybe-uninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-pointer-sign" >&5
-$as_echo_n "checking whether $CC can actually use -Wno-pointer-sign... " >&6; }
- # This option causes warnings in C++ mode
- # Note: -Werror must be before -Wno-pointer-sign, otherwise it does not do anything
- CFLAGS="$OLD_CFLAGS -Werror -Wno-pointer-sign"
+ CFLAGS="$OLD_CFLAGS -Wno-maybe-uninitialized"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-clobbered" >&5
+$as_echo_n "checking whether $CC supports -Wno-clobbered... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-clobbered"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Recent versions of gcc don't fail if -Wno-foo is not recognized
+ # (unless there are also other warnings), so we also check for -Wfoo
+ # which always fails if not supported
+ CFLAGS="$OLD_CFLAGS -Werror -Wclobbered"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-clobbered"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-clobbered" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-clobbered... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wclobbered"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed but enabled" >&5
+$as_echo "not needed but enabled" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+else
+
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-clobbered"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-clobbered"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wempty-body" >&5
+$as_echo_n "checking whether $CC supports -Wempty-body... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wempty-body"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5020,7 +5253,30 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wno-pointer-sign"
+ CFLAGS="$OLD_CFLAGS -Wempty-body"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wempty-body" >&5
+$as_echo_n "checking whether $CC can actually use -Wempty-body... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wempty-body"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wempty-body"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
else
@@ -5032,39 +5288,565 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wnewline-eof" >&5
+$as_echo_n "checking whether $CC supports -Wnewline-eof... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wnewline-eof"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wnewline-eof"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wnewline-eof" >&5
+$as_echo_n "checking whether $CC can actually use -Wnewline-eof... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wnewline-eof"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wnewline-eof"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- CFLAGS="$OLD_CFLAGS"
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wint-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wint-conversion... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wint-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wint-conversion"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wint-conversion" >&5
+$as_echo_n "checking whether $CC can actually use -Wint-conversion... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wint-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wint-conversion"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wenum-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wenum-conversion... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wenum-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wenum-conversion"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wenum-conversion" >&5
+$as_echo_n "checking whether $CC can actually use -Wenum-conversion... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wenum-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wenum-conversion"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wshorten-64-to-32" >&5
+$as_echo_n "checking whether $CC supports -Wshorten-64-to-32... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wshorten-64-to-32"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wshorten-64-to-32" >&5
+$as_echo_n "checking whether $CC can actually use -Wshorten-64-to-32... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wshorten-64-to-32"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wshorten-64-to-32"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wconstant-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wconstant-conversion... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wconstant-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wconstant-conversion"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wconstant-conversion" >&5
+$as_echo_n "checking whether $CC can actually use -Wconstant-conversion... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wconstant-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wconstant-conversion"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wbool-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wbool-conversion... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wbool-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wbool-conversion"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wbool-conversion" >&5
+$as_echo_n "checking whether $CC can actually use -Wbool-conversion... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wbool-conversion"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wbool-conversion"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-switch" >&5
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-switch" >&5
$as_echo_n "checking whether $CC supports -Wno-switch... " >&6; }
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-switch"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+
+ # Recent versions of gcc don't fail if -Wno-foo is not recognized
+ # (unless there are also other warnings), so we also check for -Wfoo
+ # which always fails if not supported
+ CFLAGS="$OLD_CFLAGS -Werror -Wswitch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-switch"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-switch" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-switch... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wswitch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed but enabled" >&5
+$as_echo "not needed but enabled" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-switch"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-switch"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- CFLAGS="$OLD_CFLAGS"
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-missing-field-initializers" >&5
+$as_echo_n "checking whether $CC supports -Wno-missing-field-initializers... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-missing-field-initializers"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Recent versions of gcc don't fail if -Wno-foo is not recognized
+ # (unless there are also other warnings), so we also check for -Wfoo
+ # which always fails if not supported
+ CFLAGS="$OLD_CFLAGS -Werror -Wmissing-field-initializers"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-missing-field-initializers"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-missing-field-initializers" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-missing-field-initializers... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wmissing-field-initializers"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed but enabled" >&5
+$as_echo "not needed but enabled" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+else
+
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-missing-field-initializers"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-missing-field-initializers"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+# Certain versions of gcc make -Wshadow completely useless by making it flood
+# you with unnecessary warnings <https://lkml.org/lkml/2006/11/28/239>
+# Let's check if we can really use it
+SAVED_OLD_CFLAGS="$CFLAGS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wshadow" >&5
+$as_echo_n "checking whether $CC supports -Wshadow... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wshadow"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wshadow"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wshadow" >&5
+$as_echo_n "checking whether $CC can actually use -Wshadow... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wshadow"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wshadow"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+if test "x$CFLAGS" != "x$SAVED_OLD_CFLAGS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can efficiently use -Wshadow" >&5
+$as_echo_n "checking whether $CC can efficiently use -Wshadow... " >&6; }
+ NEW_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wshadow"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int foo(void) {
+ return 0;
+ }
+ int bar(void) {
+ int foo = 0;
+ return foo + 1;
+ }
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$NEW_CFLAGS"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$SAVED_OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fPIC" >&5
$as_echo_n "checking whether $CC supports -fPIC... " >&6; }
OLD_CFLAGS="$CFLAGS"
@@ -5470,7 +6252,7 @@ fi
case $enable_debug in
"no")
# default value
- CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
+# CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
;;
"yes")
CFLAGS="$CFLAGS -g -DDEBUG"
@@ -6473,6 +7255,9 @@ CYGWIN*)
fd_setsize="done"
DLLEXT=".dll"
;;
+Darwin*)
+ DLLEXT=".dylib"
+ ;;
esac
diff --git a/configure.in b/configure.in
index 98c493a03..94bad9ca4 100644
--- a/configure.in
+++ b/configure.in
@@ -248,22 +248,22 @@ AC_ARG_ENABLE(
# LTO
#
AC_ARG_ENABLE(
- [lto],
- AC_HELP_STRING(
- [--enable-lto],
- [
+ [lto],
+ AC_HELP_STRING(
+ [--enable-lto],
+ [
Enables or Disables Linktime Code Optimization (LTO is enabled by default)
- ]
- ),
- [
- enable_lto="$enableval"
- case $enableval in
- "no");;
- "yes");;
- *) AC_MSG_ERROR([[invalid argument --enable-lto=$disableval... stopping]]);;
- esac
- ],
- [enable_lto="yes"]
+ ]
+ ),
+ [
+ enable_lto="$enableval"
+ case $enableval in
+ "no");;
+ "yes");;
+ *) AC_MSG_ERROR([[invalid argument --enable-lto=$disableval... stopping]]);;
+ esac
+ ],
+ [enable_lto="yes"]
)
@@ -433,7 +433,7 @@ AC_PATH_PROG(AR, ar)
AC_LANG([C])
-CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wno-sign-compare"
+CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare"
CPPFLAGS="$CPPFLAGS -I../common"
@@ -517,19 +517,6 @@ AC_RUN_IFELSE(
)
-AC_MSG_CHECKING([whether $CC supports -Wno-unused-parameter])
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-unused-parameter"
-AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([int foo;])],
- [AC_MSG_RESULT([yes])],
- [
- AC_MSG_RESULT([no])
- CFLAGS="$OLD_CFLAGS"
- ]
-)
-
-
#
# LTO Support test
#
@@ -545,8 +532,8 @@ if test "$enable_lto" != "no" ; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([
int main(int argc, char **argv){
- return 0;
- }
+ return 0;
+ }
])],
[
AC_MSG_RESULT([yes])
@@ -563,49 +550,141 @@ if test "$enable_lto" != "no" ; then
fi
-
-AC_MSG_CHECKING([whether $CC supports -Wno-pointer-sign])
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-pointer-sign"
-AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([int foo;])],
+AC_DEFUN(AC_CHECK_COMPILER_WFLAG,
[
- AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([whether $CC can actually use -Wno-pointer-sign])
- # This option causes warnings in C++ mode
- # Note: -Werror must be before -Wno-pointer-sign, otherwise it does not do anything
- CFLAGS="$OLD_CFLAGS -Werror -Wno-pointer-sign"
+ AC_MSG_CHECKING([whether $CC supports -W$1])
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -W$1"
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([int foo;])],
[
AC_MSG_RESULT([yes])
- CFLAGS="$OLD_CFLAGS -Wno-pointer-sign"
+ CFLAGS="$OLD_CFLAGS -W$1"
+ # Optionally, run a test
+ if test "x$2" != "x"; then
+ AC_MSG_CHECKING([whether $CC can actually use -W$1])
+ CFLAGS="$OLD_CFLAGS -Werror -W$1"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([$2])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$OLD_CFLAGS -W$1"
+ ],
+ )
+ fi
],
[
AC_MSG_RESULT([no])
CFLAGS="$OLD_CFLAGS"
]
)
- ],
- [
- AC_MSG_RESULT([no])
- CFLAGS="$OLD_CFLAGS"
]
)
-
-AC_MSG_CHECKING([whether $CC supports -Wno-switch])
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-switch"
-AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([int foo;])],
- [AC_MSG_RESULT([yes])],
+AC_DEFUN(AC_CHECK_COMPILER_WNOFLAG,
[
- AC_MSG_RESULT([no])
- CFLAGS="$OLD_CFLAGS"
+ AC_MSG_CHECKING([whether $CC supports -Wno-$1])
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-$1"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [
+ # Recent versions of gcc don't fail if -Wno-foo is not recognized
+ # (unless there are also other warnings), so we also check for -Wfoo
+ # which always fails if not supported
+ CFLAGS="$OLD_CFLAGS -Werror -W$1"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$OLD_CFLAGS -Wno-$1"
+ # Optionally, run a test
+ if test "x$2" != "x"; then
+ AC_MSG_CHECKING([whether $CC can actually use -Wno-$1])
+ CFLAGS="$OLD_CFLAGS -Werror -W$1"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([$2])],
+ [
+ AC_MSG_RESULT([not needed but enabled])
+ CFLAGS="$OLD_CFLAGS"
+ ],
+ [
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-$1"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([$2])],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$OLD_CFLAGS -Wno-$1"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+ )
+ ]
+ )
+ fi
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+ )
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+ )
]
)
+AC_CHECK_COMPILER_WNOFLAG(unused-parameter, [int foo(int bar) { return 0; }])
+AC_CHECK_COMPILER_WNOFLAG(maybe-uninitialized)
+AC_CHECK_COMPILER_WNOFLAG(clobbered)
+AC_CHECK_COMPILER_WFLAG(empty-body)
+AC_CHECK_COMPILER_WFLAG(newline-eof)
+AC_CHECK_COMPILER_WFLAG(int-conversion)
+AC_CHECK_COMPILER_WFLAG(enum-conversion)
+AC_CHECK_COMPILER_WFLAG(shorten-64-to-32)
+AC_CHECK_COMPILER_WFLAG(constant-conversion)
+AC_CHECK_COMPILER_WFLAG(bool-conversion)
+AC_CHECK_COMPILER_WNOFLAG(switch)
+AC_CHECK_COMPILER_WNOFLAG(missing-field-initializers)
+
+# Certain versions of gcc make -Wshadow completely useless by making it flood
+# you with unnecessary warnings <https://lkml.org/lkml/2006/11/28/239>
+# Let's check if we can really use it
+SAVED_OLD_CFLAGS="$CFLAGS"
+AC_CHECK_COMPILER_WFLAG(shadow)
+if test "x$CFLAGS" != "x$SAVED_OLD_CFLAGS"; then
+ AC_MSG_CHECKING([whether $CC can efficiently use -Wshadow])
+ NEW_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wshadow"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([
+ int foo(void) {
+ return 0;
+ }
+ int bar(void) {
+ int foo = 0;
+ return foo + 1;
+ }
+ ])],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$NEW_CFLAGS"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$SAVED_OLD_CFLAGS"
+ ]
+ )
+fi
AC_MSG_CHECKING([whether $CC supports -fPIC])
OLD_CFLAGS="$CFLAGS"
@@ -870,7 +949,7 @@ fi
case $enable_debug in
"no")
# default value
- CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
+# CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
;;
"yes")
CFLAGS="$CFLAGS -g -DDEBUG"
@@ -1123,6 +1202,9 @@ CYGWIN*)
fd_setsize="done"
DLLEXT=".dll"
;;
+Darwin*)
+ DLLEXT=".dylib"
+ ;;
esac
AC_SUBST([DLLEXT])
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index af919f037..2b0ce1586 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -18884,6 +18884,7 @@ item_db: (
Script: <"
bonus bFlee,5;
bonus bAgi,1;
+ skill ALL_CATCRY, 1;
">
},
{
@@ -22080,6 +22081,7 @@ item_db: (
Buy: 20
Loc: 136
Refine: false
+ Script: <" skill ALL_DREAM_SUMMERNIGHT,1; ">
},
*/
{
@@ -54234,7 +54236,7 @@ item_db: (
Type: 2
Buy: 0
Weight: 20
- Script: <" getitem rand(7361,7370),1; ">
+ Script: <" getrandgroupitem 12035,1; ">
},
{
Id: 12036
@@ -54243,7 +54245,7 @@ item_db: (
Type: 2
Buy: 0
Weight: 20
- Script: <" getitem rand(7371,7380),1; ">
+ Script: <" getrandgroupitem 12036,1; ">
},
{
Id: 12037
@@ -54252,7 +54254,7 @@ item_db: (
Type: 2
Buy: 0
Weight: 20
- Script: <" getitem rand(7381,7390),1; ">
+ Script: <" getrandgroupitem 12037,1; ">
},
{
Id: 12038
@@ -54270,7 +54272,7 @@ item_db: (
Type: 2
Buy: 0
Weight: 20
- Script: <" getitem rand(7542,7546),1; ">
+ Script: <" getrandgroupitem 12039,1; ">
},
{
Id: 12040
@@ -57076,6 +57078,7 @@ item_db: (
Name: "Guardian Angel"
Type: 2
Buy: 0
+ Script: <" itemskill ALL_ANGEL_PROTECT,1; ">
},
{
Id: 12314
@@ -57447,6 +57450,7 @@ item_db: (
Type: 2
Buy: 0
Weight: 10
+ Script: <" callfunc "F_CashDungeon",3; ">
},
{
Id: 12353
@@ -72302,7 +72306,7 @@ item_db: (
Type: 2
Buy: 0
Weight: 10
- Script: <" callfunc "F_CashDungeon"; ">
+ Script: <" callfunc "F_CashDungeon",1; ">
},
{
Id: 14528
@@ -72892,7 +72896,7 @@ item_db: (
Type: 2
Buy: 0
Weight: 10
- Script: <" callfunc "F_CashDungeon"; ">
+ Script: <" callfunc "F_CashDungeon",2; ">
},
{
Id: 14582
diff --git a/db/pre-re/item_group.conf b/db/pre-re/item_group.conf
index e31ffd339..25f9302e0 100644
--- a/db/pre-re/item_group.conf
+++ b/db/pre-re/item_group.conf
@@ -4701,6 +4701,7 @@ Candy_Holder: (
)
*/
Lotto_Box01: (
+ "Lotto01",
"Lotto02",
"Lotto03",
"Lotto04",
@@ -4709,6 +4710,7 @@ Lotto_Box01: (
"Lotto07",
"Lotto08",
"Lotto09",
+ "Lotto10",
)
Lotto_Box02: (
"Lotto11",
@@ -4719,9 +4721,10 @@ Lotto_Box02: (
"Lotto16",
"Lotto17",
"Lotto18",
+ "Lotto19",
+ "Lotto20",
)
Lotto_Box03: (
- "Lotto20",
"Lotto21",
"Lotto22",
"Lotto23",
@@ -4729,21 +4732,23 @@ Lotto_Box03: (
"Lotto25",
"Lotto26",
"Lotto27",
-)
-Lotto_Box04: (
+ "Lotto28",
"Lotto29",
"Lotto30",
+)
+Lotto_Box04: (
"Lotto31",
"Lotto32",
"Lotto33",
"Lotto34",
"Lotto35",
"Lotto36",
-)
-Lotto_Box05: (
+ "Lotto37",
"Lotto38",
"Lotto39",
"Lotto40",
+)
+Lotto_Box05: (
"Lotto41",
"Lotto42",
"Lotto43",
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index a67494ee0..6c6e429b4 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -22191,6 +22191,7 @@ item_db: (
Script: <"
bonus bFlee,5;
bonus bAgi,1;
+ skill ALL_CATCRY, 1;
">
},
{
@@ -26896,6 +26897,7 @@ item_db: (
Upper: 63
Loc: 136
Refine: false
+ Script: <" skill ALL_DREAM_SUMMERNIGHT,1; ">
},
{
Id: 2751
@@ -65822,7 +65824,7 @@ item_db: (
Buy: 0
Weight: 20
Upper: 63
- Script: <" getitem rand(7361,7370),1; ">
+ Script: <" getrandgroupitem 12035,1; ">
},
{
Id: 12036
@@ -65832,7 +65834,7 @@ item_db: (
Buy: 0
Weight: 20
Upper: 63
- Script: <" getitem rand(7371,7380),1; ">
+ Script: <" getrandgroupitem 12036,1; ">
},
{
Id: 12037
@@ -65842,7 +65844,7 @@ item_db: (
Buy: 0
Weight: 20
Upper: 63
- Script: <" getitem rand(7381,7390),1; ">
+ Script: <" getrandgroupitem 12037,1; ">
},
{
Id: 12038
@@ -65862,7 +65864,7 @@ item_db: (
Buy: 0
Weight: 20
Upper: 63
- Script: <" getitem rand(7542,7546),1; ">
+ Script: <" getrandgroupitem 12039,1; ">
},
{
Id: 12040
@@ -68938,6 +68940,7 @@ item_db: (
Type: 2
Buy: 0
Upper: 63
+ Script: <" itemskill ALL_ANGEL_PROTECT,1; ">
},
{
Id: 12314
@@ -69349,6 +69352,7 @@ item_db: (
Buy: 0
Weight: 10
Upper: 63
+ Script: <" callfunc "F_CashDungeon",3; ">
},
{
Id: 12353
@@ -87095,7 +87099,7 @@ item_db: (
Buy: 0
Weight: 10
Upper: 63
- Script: <" callfunc "F_CashDungeon"; ">
+ Script: <" callfunc "F_CashDungeon",1; ">
},
{
Id: 14528
@@ -87739,7 +87743,7 @@ item_db: (
Buy: 0
Weight: 10
Upper: 63
- Script: <" callfunc "F_CashDungeon"; ">
+ Script: <" callfunc "F_CashDungeon",2; ">
},
{
Id: 14582
diff --git a/db/re/item_group.conf b/db/re/item_group.conf
index 9bf1db66d..68ff1dcbf 100644
--- a/db/re/item_group.conf
+++ b/db/re/item_group.conf
@@ -4684,6 +4684,7 @@ Candy_Holder: (
("Pumpkin_Pie",5),
)
Lotto_Box01: (
+ "Lotto01",
"Lotto02",
"Lotto03",
"Lotto04",
@@ -4692,6 +4693,7 @@ Lotto_Box01: (
"Lotto07",
"Lotto08",
"Lotto09",
+ "Lotto10",
)
Lotto_Box02: (
"Lotto11",
@@ -4702,9 +4704,10 @@ Lotto_Box02: (
"Lotto16",
"Lotto17",
"Lotto18",
+ "Lotto19",
+ "Lotto20",
)
Lotto_Box03: (
- "Lotto20",
"Lotto21",
"Lotto22",
"Lotto23",
@@ -4712,21 +4715,23 @@ Lotto_Box03: (
"Lotto25",
"Lotto26",
"Lotto27",
-)
-Lotto_Box04: (
+ "Lotto28",
"Lotto29",
"Lotto30",
+)
+Lotto_Box04: (
"Lotto31",
"Lotto32",
"Lotto33",
"Lotto34",
"Lotto35",
"Lotto36",
-)
-Lotto_Box05: (
+ "Lotto37",
"Lotto38",
"Lotto39",
"Lotto40",
+)
+Lotto_Box05: (
"Lotto41",
"Lotto42",
"Lotto43",
diff --git a/db2sql.bat b/db2sql.bat
new file mode 100644
index 000000000..b23f76bce
--- /dev/null
+++ b/db2sql.bat
@@ -0,0 +1,29 @@
+@ECHO OFF
+
+REM Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+REM See the LICENSE file
+REM Base Author: Mumbles @ http://hercules.ws
+
+COLOR 0F
+
+ECHO.
+ECHO Hercules Development Team presents
+ECHO _ _ _
+ECHO ^| ^| ^| ^| ^| ^|
+ECHO ^| ^|_^| ^| ___ _ __ ___ _ _^| ^| ___ ___
+ECHO ^| _ ^|/ _ \ '__/ __^| ^| ^| ^| ^|/ _ \/ __^|
+ECHO ^| ^| ^| ^| __/ ^| ^| (__^| ^|_^| ^| ^| __/\__ \
+ECHO \_^| ^|_/\___^|_^| \___^|\__,_^|_^|\___^|^|___/
+ECHO.
+ECHO Database to SQL Converter
+ECHO http://hercules.ws/board/
+ECHO.
+ECHO.
+
+ECHO Exporting item databases to 'sql-files' folder...
+PING -n 3 -w 1 127.0.0.1 > nul
+
+map-server.exe --db2sql
+ECHO.
+
+PING -n 10 -w 1 127.0.0.1 > nul
diff --git a/npc/battleground/kvm/kvm01.txt b/npc/battleground/kvm/kvm01.txt
index 4fb84ddc3..f70b3b3fa 100644
--- a/npc/battleground/kvm/kvm01.txt
+++ b/npc/battleground/kvm/kvm01.txt
@@ -357,7 +357,7 @@ OnTimer5000:
mapannounce "bat_c01", "Please be careful.",bc_map,"0x00ff00";
end;
-OnTimer:55000:
+OnTimer55000:
mapannounce "bat_c01", "You will be sent back.",bc_map,"0x00ff00";
end;
diff --git a/npc/battleground/kvm/kvm02.txt b/npc/battleground/kvm/kvm02.txt
index 33982a2c5..d2a5c38c2 100644
--- a/npc/battleground/kvm/kvm02.txt
+++ b/npc/battleground/kvm/kvm02.txt
@@ -359,7 +359,7 @@ OnTimer5000:
mapannounce "bat_c02", "Please be careful.",bc_map,"0x00ff00";
end;
-OnTimer:55000:
+OnTimer55000:
mapannounce "bat_c02", "You will be sent back.",bc_map,"0x00ff00";
end;
diff --git a/npc/battleground/kvm/kvm03.txt b/npc/battleground/kvm/kvm03.txt
index 6866a7147..c821a7db3 100644
--- a/npc/battleground/kvm/kvm03.txt
+++ b/npc/battleground/kvm/kvm03.txt
@@ -358,7 +358,7 @@ OnTimer5000:
mapannounce "bat_c03", "Please be careful.",bc_map,"0x00ff00";
end;
-OnTimer:55000:
+OnTimer55000:
mapannounce "bat_c03", "You will be sent back.",bc_map,"0x00ff00";
end;
diff --git a/npc/custom/quests/bandit_beard.txt b/npc/custom/quests/bandit_beard.txt
index fb28732d7..897464b26 100644
--- a/npc/custom/quests/bandit_beard.txt
+++ b/npc/custom/quests/bandit_beard.txt
@@ -227,8 +227,8 @@ OnDie:
if($@beardmob > 0) end;
set $@beardMobD,1;
end;
-On1201:
-On0001:
+OnClock1201:
+OnClock0001:
set $@beardmob,0;
set $@beardMobD,0;
end;
diff --git a/npc/events/gdevent_aru.txt b/npc/events/gdevent_aru.txt
index 1578127f9..22d30e12c 100644
--- a/npc/events/gdevent_aru.txt
+++ b/npc/events/gdevent_aru.txt
@@ -45,11 +45,11 @@ OnEnable:
end;
OnKill:
- killmonster "arug_dun01","Monster Controler1#aru::OnMyMObDead";
+ killmonster "arug_dun01","Monster Controler1#aru::OnMyMobDead";
end;
OnMyMobDead:
- if (mobcount("arug_dun01","Monster Controler1#aru::OnMyMObDead") == 0) {
+ if (mobcount("arug_dun01","Monster Controler1#aru::OnMyMobDead") == 0) {
mapannounce "arug_dun01", "Kublin: Aargh!",bc_map,"0x99CC00";
mapannounce "arug_dun01", "Morestone: I thought I heard Kublin screaming!! Who is there? What happened to Kublin? Hey you!",bc_map,"0x99CC00";
donpcevent "Dwarf#aru_gd::OnEnable";
diff --git a/npc/events/gdevent_sch.txt b/npc/events/gdevent_sch.txt
index 536b37b79..31537763e 100644
--- a/npc/events/gdevent_sch.txt
+++ b/npc/events/gdevent_sch.txt
@@ -45,11 +45,11 @@ OnEnable:
end;
OnKill:
- killmonster "schg_dun01","Monster Controler1#sch::OnMyMObDead";
+ killmonster "schg_dun01","Monster Controler1#sch::OnMyMobDead";
end;
OnMyMobDead:
- if (mobcount("schg_dun01","Monster Controler1#sch::OnMyMObDead") == 0) {
+ if (mobcount("schg_dun01","Monster Controler1#sch::OnMyMobDead") == 0) {
mapannounce "schg_dun01", "Kublin: Aargh!",bc_map,"0x99CC00";
mapannounce "schg_dun01", "Morestone: I thought I heard Kublin screaming!! Who is there? What happened to Kublin? Hey you!",bc_map,"0x99CC00";
donpcevent "Dwarf#sch_gd::OnEnable";
diff --git a/npc/events/god_se_festival.txt b/npc/events/god_se_festival.txt
index 6fc2bb660..4712d6fd7 100644
--- a/npc/events/god_se_festival.txt
+++ b/npc/events/god_se_festival.txt
@@ -243,7 +243,7 @@ OnTimer308000:
OnTimer600000:
announce "The second 'Valkyrie's Present' has been summoned here in Juno by the Wish maiden.",bc_all,"0x70dbdb";
- donpcevent "Rmimi Ravies#gq_fes01::oncall";
+ donpcevent "Rmimi Ravies#gq_fes01::OnCall";
end;
OnTimer603000:
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index f8f8d541f..456bf590f 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -246,7 +246,7 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
instance_init(.@instance);
close;
case 2:
- callsub L_Enter,0,1;
+ callsub L_Enter,0,1,.@md_name$,.@p_name$;
case 3:
mes "I will move you to Alberta.";
close2;
@@ -258,7 +258,7 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
}
switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
case 1:
- callsub L_Enter,1,1;
+ callsub L_Enter,1,1,.@md_name$,.@p_name$;
case 2:
mes "I will move you to Alberta.";
close2;
@@ -272,7 +272,7 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
next;
switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
case 1:
- callsub L_Enter,0,0;
+ callsub L_Enter,0,0,.@md_name$,.@p_name$;
case 2:
mes "I will move you to Alberta.";
close2;
@@ -308,11 +308,11 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
L_Enter:
if (has_instance("1@tower") == "") {
- mes "The memorial dungeon " + .@md_name$ + " does not exist.";
+ mes "The memorial dungeon " +getarg(2)+ " does not exist.";
mes "The party leader did not generate the dungeon yet.";
close;
} else {
- mapannounce "e_tower", strcharinfo(0)+" of the party, "+.@p_name$+", is entering the dungeon, Endless Tower.",bc_map,"0x00ff99",FW_NORMAL,12;
+ mapannounce "e_tower", strcharinfo(0)+" of the party, " +getarg(3)+", is entering the dungeon, Endless Tower.",bc_map,"0x00ff99",FW_NORMAL,12;
if (getarg(1)) {
set etower_timer,gettimetick(2);
setquest 60200;
diff --git a/npc/jobs/2-1/assassin.txt b/npc/jobs/2-1/assassin.txt
index e4b231fcf..896a19e4e 100644
--- a/npc/jobs/2-1/assassin.txt
+++ b/npc/jobs/2-1/assassin.txt
@@ -1255,7 +1255,7 @@ OnReset:
donpcevent "Standby Room#ASNTEST::OnStart";
end;
-OnResetmob:
+OnResetMob:
killmonster "in_moc_16","Beholder#ASNTEST::OnMyMobDead";
killmonster "in_moc_16","Beholder#ASNTEST::OnMyMobDead2";
stopnpctimer;
@@ -1269,7 +1269,7 @@ OnMyMobDead:
changequest 8003,8004;
donpcevent "timestopper#1::OnEnable";
donpcevent "Keeper of the Door#ASN::OnEnable";
- donpcevent "Beholder#ASNTEST::OnResetmob";
+ donpcevent "Beholder#ASNTEST::OnResetMob";
set .DisableTraps,1;
stopnpctimer;
}
@@ -1354,7 +1354,7 @@ OnTouch:
mapannounce "in_moc_16",strcharinfo(0) + ", you're trapped. You will be sent back.",bc_map;
set ASSIN_Q,2;
warp "in_moc_16",19,161;
- donpcevent "Beholder#ASNTEST::OnResetmob";
+ donpcevent "Beholder#ASNTEST::OnResetMob";
donpcevent "Standby Room#ASNTEST::OnStart";
}
end;
diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt
index b770d93df..1acb63a8b 100644
--- a/npc/jobs/2-1/hunter.txt
+++ b/npc/jobs/2-1/hunter.txt
@@ -1097,7 +1097,7 @@ OnMyMobDead:
if (.MyMobs < 3) {
mapannounce "job_hunte","Okay, good job... Now, find the switch in the center of the map!! Be careful of the traps!!",bc_map;
set HNTR_Q,14;
- donpcevent "switch#hnt::OnEnable";
+ donpcevent "Switch#hnt::OnEnable";
donpcevent "Manager#hnt::OnDisable";
}
else {
diff --git a/npc/jobs/2-2/rogue.txt b/npc/jobs/2-2/rogue.txt
index 842d9cd05..52baaf58d 100644
--- a/npc/jobs/2-2/rogue.txt
+++ b/npc/jobs/2-2/rogue.txt
@@ -1711,7 +1711,7 @@ OnTouch:
end;
OnDisable:
- killmonster "in_rogue","mob_rogue#3::OnMyMObDead";
+ killmonster "in_rogue","mob_rogue#3::OnMyMobDead";
end;
OnMyMobDead:
diff --git a/npc/pre-re/mobs/dungeons/lhz_dun.txt b/npc/pre-re/mobs/dungeons/lhz_dun.txt
index 55e9acbfa..eb544e724 100644
--- a/npc/pre-re/mobs/dungeons/lhz_dun.txt
+++ b/npc/pre-re/mobs/dungeons/lhz_dun.txt
@@ -279,7 +279,7 @@ OnSummon:
case 6: set .@x,175; set .@y,137; break;
}
set .@mob,rand(1646,1651);
- monster "lhz_dun03",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,"summon_boss_lt::OnMyMvPDead";
+ monster "lhz_dun03",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,"summon_boss_lt::OnMyMVPDead";
// Select Coordinates to summon a random 99 on
switch(rand(1,6)) {
@@ -294,7 +294,7 @@ OnSummon:
monster "lhz_dun03",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,"summon_boss_lt::OnMVP";
end;
-OnMyMvPDead:
+OnMyMVPDead:
killmonster "lhz_dun03","summon_boss_lt::OnMVP";
initnpctimer;
end;
diff --git a/npc/quests/bard_quest.txt b/npc/quests/bard_quest.txt
index d9382593e..9b365d0e2 100644
--- a/npc/quests/bard_quest.txt
+++ b/npc/quests/bard_quest.txt
@@ -1927,7 +1927,7 @@ morocc,134,111,3 script Bard#3 2_M_BARD_ORIENT,{
mes "There's no reason to be afraid of this riffraff, your Uncle Kino is here, okay?";
} else if (BaseClass == Job_Assassin) {
mes "There's no reason to be afraid. I know that person looks scary, but you're a good girl, so you'll be okay.";
- } else if (BaeClass == Job_Blacksmith) {
+ } else if (BaseClass == Job_Blacksmith) {
mes "There's no reason to be scared, honey. It's just a Blacksmith.";
} else {
mes "There's no reason to be scared. See...? That person won't hurt you.";
diff --git a/npc/quests/quests_morocc.txt b/npc/quests/quests_morocc.txt
index 86e07aab1..398aa9a97 100644
--- a/npc/quests/quests_morocc.txt
+++ b/npc/quests/quests_morocc.txt
@@ -7772,7 +7772,7 @@ OnTouch:
}
prt_castle,354,276,0 script #peter WARPNPC,1,1,{
-OnTouch:;
+OnTouch:
if (checkquest(10019) == 0 || checkquest(10019) == 1) {
donpcevent "Prince#eisen5::OnEnable";
}
diff --git a/npc/quests/the_sign_quest.txt b/npc/quests/the_sign_quest.txt
index ba0d259e9..9ede5352e 100644
--- a/npc/quests/the_sign_quest.txt
+++ b/npc/quests/the_sign_quest.txt
@@ -3546,7 +3546,7 @@ geffen_in,59,74,4 script Jesqurienne#sign 1_F_SIGNZISK,{
mes "But who's going to";
mes "ask us the questions?";
next;
- donpcevent "Aaron#sign::onSmile";
+ donpcevent "Aaron#sign::OnSmile";
emotion e_gasp;
emotion e_gasp,1;
mes "[Aaron]";
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index b7489e893..e858fc709 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -172,7 +172,7 @@ REPLACE INTO `item_db` VALUES ('642','Book_Of_Devil','Book of the Devil','2','18
REPLACE INTO `item_db` VALUES ('643','Pet_Incubator','Pet Incubator','2','3000','1500','30','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','bpet;','','');
REPLACE INTO `item_db` VALUES ('644','Gift_Box','Gift Box','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 644,1;','','');
REPLACE INTO `item_db` VALUES ('645','Center_Potion','Concentration Potion','2','800','400','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,0;','','');
-REPLACE INTO `item_db` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','4294442735','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
+REPLACE INTO `item_db` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','2147483647','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('657','Berserk_Potion','Berserk Potion','2','3000','1500','200','0','0','0','0','0','31868582','63','2','0','0','85',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('658','Union_Of_Tribe','Union of Tribe','2','2','1','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','guildgetexp rand(600000,1200000);','','');
REPLACE INTO `item_db` VALUES ('659','Heart_Of_Her','Her Heart','2','500','250','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','pet 1188;','','');
@@ -558,24 +558,24 @@ REPLACE INTO `item_db` VALUES ('1187','Krieger_Twohand_Sword1','Glorious Claymor
REPLACE INTO `item_db` VALUES ('1188','Veteran_Sword','Veteran Sword','4','10000','5000','2000','180','0','0','1','1','16514','63','2','34','4','80',NULL,'1','3','0','if(getskilllv(SM_BASH)==10) { bonus2 bSkillAtk,SM_BASH,50; } if(getskilllv(KN_BOWLINGBASH)==10) { bonus2 bSkillAtk,KN_BOWLINGBASH,50; } bonus bStr,1; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('1189','Krasnaya','Krasnaya','4','20','10','3800','200','0','0','2','3','16514','2','2','34','2','50',NULL,'1','3','0','if(readparam(bStr)>=95) { bonus bBaseAtk,20; }','','');
REPLACE INTO `item_db` VALUES ('1190','Claymore_C','Claymore','4','0','0','0','220','0','0','1','0','16512','63','2','34','3','1',NULL,'0','3','0','bonus2 bAddSize,Size_Small,40; bonus2 bAddSize,Size_Medium,40; bonus2 bAddSize,Size_Large,40;','','');
-REPLACE INTO `item_db` VALUES ('1201','Knife','Knife','4','50','25','400','17','0','0','1','3','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1202','Knife_','Knife','4','50','25','400','17','0','0','1','4','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1203','Knife__','Knife','4','50','25','400','17','0','0','1','0','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1204','Cutter','Cutter','4','1250','625','500','30','0','0','1','3','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1205','Cutter_','Cutter','4','1250','625','500','30','0','0','1','4','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1206','Cutter__','Cutter','4','1250','625','500','30','0','0','1','0','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1207','Main_Gauche','Main Gauche','4','2400','1200','600','43','0','0','1','3','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1208','Main_Gauche_','Main Gauche','4','2400','1200','600','43','0','0','1','4','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1209','Main_Gauche__','Main Gauche','4','2400','1200','600','43','0','0','1','0','4271865583','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1210','Dirk','Dirk','4','8500','4250','500','59','0','0','1','2','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1211','Dirk_','Dirk','4','8500','4250','500','59','0','0','1','3','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1212','Dirk__','Dirk','4','8500','4250','500','59','0','0','1','0','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1213','Dagger','Dagger','4','14000','7000','600','73','0','0','1','2','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1214','Dagger_','Dagger','4','14000','7000','600','73','0','0','1','3','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1215','Dagger__','Dagger','4','14000','7000','600','73','0','0','1','0','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1216','Stiletto','Stiletto','4','19500','9750','700','87','0','0','1','2','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1217','Stiletto_','Stiletto','4','19500','9750','700','87','0','0','1','3','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1218','Stiletto__','Stiletto','4','19500','9750','700','87','0','0','1','0','4271865583','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1201','Knife','Knife','4','50','25','400','17','0','0','1','3','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1202','Knife_','Knife','4','50','25','400','17','0','0','1','4','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1203','Knife__','Knife','4','50','25','400','17','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1204','Cutter','Cutter','4','1250','625','500','30','0','0','1','3','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1205','Cutter_','Cutter','4','1250','625','500','30','0','0','1','4','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1206','Cutter__','Cutter','4','1250','625','500','30','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1207','Main_Gauche','Main Gauche','4','2400','1200','600','43','0','0','1','3','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1208','Main_Gauche_','Main Gauche','4','2400','1200','600','43','0','0','1','4','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1209','Main_Gauche__','Main Gauche','4','2400','1200','600','43','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1210','Dirk','Dirk','4','8500','4250','500','59','0','0','1','2','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1211','Dirk_','Dirk','4','8500','4250','500','59','0','0','1','3','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1212','Dirk__','Dirk','4','8500','4250','500','59','0','0','1','0','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1213','Dagger','Dagger','4','14000','7000','600','73','0','0','1','2','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1214','Dagger_','Dagger','4','14000','7000','600','73','0','0','1','3','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1215','Dagger__','Dagger','4','14000','7000','600','73','0','0','1','0','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1216','Stiletto','Stiletto','4','19500','9750','700','87','0','0','1','2','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1217','Stiletto_','Stiletto','4','19500','9750','700','87','0','0','1','3','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1218','Stiletto__','Stiletto','4','19500','9750','700','87','0','0','1','0','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1219','Gladius','Gladius','4','43000','21500','700','105','0','0','1','2','42950382','63','2','2','3','24',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1220','Gladius_','Gladius','4','43000','21500','700','105','0','0','1','3','42950382','63','2','2','3','24',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1221','Gladius__','Gladius','4','43000','21500','700','105','0','0','1','0','42950382','63','2','2','3','24',NULL,'1','1','0','','','');
@@ -604,9 +604,9 @@ REPLACE INTO `item_db` VALUES ('1243','Novice_Knife','Novice Main-Gauche','4','1
REPLACE INTO `item_db` VALUES ('1244','Holy_Dagger','Holy Dagger','4','20','10','800','100','0','0','1','0','33689664','63','2','2','4','55',NULL,'1','1','0','bonus bAtkEle,Ele_Holy; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('1245','Cinquedea','Cinquedea','4','40000','20000','700','110','0','0','1','1','1','63','2','2','3','30',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1246','Cinquedea_','Cinquedea','4','40000','20000','700','110','0','0','1','2','1','63','2','2','3','30',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1247','Kindling_Dagger','Kindle Dagger','4','10000','5000','600','39','0','0','1','0','4271865583','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Fire;','','');
-REPLACE INTO `item_db` VALUES ('1248','Obsidian_Dagger','Obsidian Dagger','4','10000','5000','600','39','0','0','1','0','4271865583','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Earth;','','');
-REPLACE INTO `item_db` VALUES ('1249','Fisherman\'s_Dagger','Fisherman\'s Dagger','4','10000','5000','600','39','0','0','1','0','4271865583','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Water;','','');
+REPLACE INTO `item_db` VALUES ('1247','Kindling_Dagger','Kindle Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Fire;','','');
+REPLACE INTO `item_db` VALUES ('1248','Obsidian_Dagger','Obsidian Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Earth;','','');
+REPLACE INTO `item_db` VALUES ('1249','Fisherman\'s_Dagger','Fisherman\'s Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Water;','','');
REPLACE INTO `item_db` VALUES ('1250','Jur','Jur','4','19500','9750','800','125','0','0','1','2','4096','63','2','34','2','18',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('1251','Jur_','Jur','4','19500','9750','800','125','0','0','1','3','4096','63','2','34','2','18',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('1252','Katar','Katar','4','41000','20500','1200','148','0','0','1','1','4096','63','2','34','3','33',NULL,'1','16','0','bonus bDex,1;','','');
@@ -1078,19 +1078,19 @@ REPLACE INTO `item_db` VALUES ('2110','Holy_Guard','Holy Guard','5','85000','425
REPLACE INTO `item_db` VALUES ('2111','Herald_Of_GOD','Sacred Mission','5','128000','64000','1600','0','0','5','0','0','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db` VALUES ('2112','Novice_Guard','Novice Guard','5','1','0','1','0','0','3','0','0','1','63','2','32','0','0',NULL,'0','1','0','','','');
REPLACE INTO `item_db` VALUES ('2113','Novice_Shield','Novice Shield','5','5000','2500','1000','0','0','3','0','1','1','63','2','32','0','40',NULL,'1','3','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20;','','');
-REPLACE INTO `item_db` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','3','0','1','4294967294','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
-REPLACE INTO `item_db` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','3','0','1','4294967294','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','3','0','1','2147483647','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
+REPLACE INTO `item_db` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','3','0','1','2147483647','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2116','Angel\'s_Safeguard','Angelic Guard','5','10000','5000','400','0','0','3','0','1','1','63','2','32','0','20',NULL,'1','1','0','bonus2 bSubRace,RC_Demon,5;','','');
REPLACE INTO `item_db` VALUES ('2117','Arm_Guard','Arm Guard','5','10000','5000','150','0','0','5','0','0','33554432','63','2','32','0','20',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2118','Arm_Guard_','Arm Guard','5','10000','5000','150','0','0','5','0','1','33554432','63','2','32','0','20',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2119','Improved_Arm_Guard','Advanced Arm Guard','5','40000','20000','150','0','0','4','0','0','33554432','63','2','32','0','50',NULL,'1','1','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2120','Improved_Arm_Guard_','Advanced Arm Guard','5','40000','20000','150','0','0','4','0','1','33554432','63','2','32','0','50',NULL,'1','1','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2121','Memorize_Book_','Memory Book','5','20','10','1000','0','0','3','0','1','8454660','63','2','32','0','0',NULL,'1','5','0','bonus bInt,1; bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2122','Platinum_Shield','Platinum Shield','5','20','10','1200','0','0','5','0','0','4294967294','2','2','32','0','68',NULL,'1','4','0','bonus bMdef,5; bonus2 bSubSize,Size_Medium,15; bonus2 bSubSize,Size_Large,15; bonus2 bSubRace,RC_Undead,10; bonus5 bAutoSpellWhenHit,NPC_MAGICMIRROR,2,150,BF_MAGIC,0;','','');
-REPLACE INTO `item_db` VALUES ('2123','Orleans_Server','Orleans\'s Server','5','20','10','1000','0','0','5','0','1','4294967294','2','2','32','0','55',NULL,'1','4','0','bonus bMdef,2; bonus bMagicDamageReturn,5;','','');
-REPLACE INTO `item_db` VALUES ('2124','Thorny_Buckler','Thorny Buckler','5','20','10','1000','0','0','5','0','1','4294967294','2','2','32','0','55',NULL,'1','2','0','bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2125','Strong_Shield','Strong Shield','5','20','10','2500','0','0','4','0','1','4294967294','2','2','32','0','75',NULL,'1','4','0','bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
-REPLACE INTO `item_db` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','4294967294','63','2','32','0','75',NULL,'1','2','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2122','Platinum_Shield','Platinum Shield','5','20','10','1200','0','0','5','0','0','2147483647','2','2','32','0','68',NULL,'1','4','0','bonus bMdef,5; bonus2 bSubSize,Size_Medium,15; bonus2 bSubSize,Size_Large,15; bonus2 bSubRace,RC_Undead,10; bonus5 bAutoSpellWhenHit,NPC_MAGICMIRROR,2,150,BF_MAGIC,0;','','');
+REPLACE INTO `item_db` VALUES ('2123','Orleans_Server','Orleans\'s Server','5','20','10','1000','0','0','5','0','1','2147483647','2','2','32','0','55',NULL,'1','4','0','bonus bMdef,2; bonus bMagicDamageReturn,5;','','');
+REPLACE INTO `item_db` VALUES ('2124','Thorny_Buckler','Thorny Buckler','5','20','10','1000','0','0','5','0','1','2147483647','2','2','32','0','55',NULL,'1','2','0','bonus bMdef,2;','','');
+REPLACE INTO `item_db` VALUES ('2125','Strong_Shield','Strong Shield','5','20','10','2500','0','0','4','0','1','2147483647','2','2','32','0','75',NULL,'1','4','0','bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
+REPLACE INTO `item_db` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','2147483647','63','2','32','0','75',NULL,'1','2','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2127','Secular_Mission','Secular Mission','5','20','10','0','0','0','10','0','0','4294967295','63','2','32','0','0',NULL,'0','4','0','bonus2 bSubRace,RC_NonBoss,25; bonus2 bSubRace,RC_Boss,25;','','');
REPLACE INTO `item_db` VALUES ('2128','Herald_Of_GOD_','Sacred Mission','5','128000','64000','1600','0','0','5','0','1','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db` VALUES ('2129','Exorcism_Bible','Exorcism Bible','5','20','10','600','0','0','5','0','0','33024','63','2','32','0','50',NULL,'1','5','0','bonus bHPrecovRate,3; bonus bSPrecovRate,3; bonus bInt,1;','','');
@@ -1101,7 +1101,7 @@ REPLACE INTO `item_db` VALUES ('2133','Tournament_Shield','Tournament Shield','5
REPLACE INTO `item_db` VALUES ('2134','Shield_Of_Naga','Shield of Naga','5','20','10','500','0','0','3','0','1','13631360','2','2','32','0','70',NULL,'1','2','0','bonus bMdef,3; autobonus2 \"{ bonus bShortWeaponDamageReturn,(getrefine()*3); }\",10,5000,BF_WEAPON,\"{ specialeffect2 EF_GUARD; }\";','','');
REPLACE INTO `item_db` VALUES ('2135','Shadow_Guard','Shadow Guard','5','20','10','800','0','0','4','0','1','131072','2','2','32','0','70',NULL,'1','2','0','','','');
REPLACE INTO `item_db` VALUES ('2136','Cracked_Buckler','Cracked Buckler','5','0','0','0','0','0','5','0','0','4294967295','63','2','32','0','0',NULL,'0','2','0','bonus bAgi,2; bonus2 bAddEle,Ele_Neutral,-10; bonus3 bAutoSpellWhenHit,PR_KYRIE,1,50; bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2137','Valkyrja\'s_Shield_C','Neo Valkyrja\'s Shield','5','0','0','0','0','0','5','0','0','4294967294','2','2','32','0','95',NULL,'0','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2137','Valkyrja\'s_Shield_C','Neo Valkyrja\'s Shield','5','0','0','0','0','0','5','0','0','2147483647','2','2','32','0','95',NULL,'0','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2138','Bradium_Shield','Bradium Shield','5','20','10','1800','0','0','5','0','1','13631360','2','2','32','0','65',NULL,'1','3','0','bonus2 bSkillAtk,CR_SHIELDBOOMERANG,60; bonus bAgi,-1; bonus bMaxHP,500;','','');
REPLACE INTO `item_db` VALUES ('2199','Ahura_Mazda','Ahura Mazdah','5','1','0','10','0','0','100','0','0','4294967295','63','2','32','0','1',NULL,'1','0','0','bonus bAllStats,50; bonus bMdef,99; bonus bShortWeaponDamageReturn,100; bonus2 bSubRace,RC_DemiHuman,95; skill CR_FULLPROTECTION,5; skill WZ_ESTIMATION,1; skill ST_FULLSTRIP,5; skill HW_MAGICPOWER,10; bonus bMaxHPrate,200; bonus bNoGemStone,0; bonus bSpeedRate,25;','sc_start4 SC_ENDURE,60000,10,0,0,1;','sc_end SC_ENDURE;');
REPLACE INTO `item_db` VALUES ('2201','Sunglasses','Sunglasses','5','5000','2500','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','12','0','bonus2 bResEff,Eff_Blind,500;','','');
@@ -1125,8 +1125,8 @@ REPLACE INTO `item_db` VALUES ('2218','Flu_Mask','Flu Mask','5','300','150','100
REPLACE INTO `item_db` VALUES ('2219','Flu_Mask_','Flu Mask','5','300','150','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus2 bResEff,Eff_Silence,1000;','','');
REPLACE INTO `item_db` VALUES ('2220','Hat','Hat','5','1000','500','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('2221','Hat_','Hat','5','1000','500','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
-REPLACE INTO `item_db` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','7','0','','','');
-REPLACE INTO `item_db` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
REPLACE INTO `item_db` VALUES ('2224','Goggle','Goggles','5','20','10','300','0','0','5','0','0','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2225','Goggle_','Goggles','5','20','10','300','0','0','5','0','1','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2226','Cap','Cap','5','12000','6000','400','0','0','4','0','0','941290','63','2','256','0','0',NULL,'1','14','0','','','');
@@ -1137,8 +1137,8 @@ REPLACE INTO `item_db` VALUES ('2230','Gemmed_Sallet','Gemmed Sallet','5','50000
REPLACE INTO `item_db` VALUES ('2231','Gemmed_Sallet_','Gemmed Sallet','5','50000','25000','500','0','0','4','0','1','414946','63','2','256','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2232','Circlet','Circlet','5','7500','3750','300','0','0','3','0','0','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2233','Circlet_','Circlet','5','7500','3750','300','0','0','3','0','1','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','4','0','0','4294967294','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','4','0','0','4294967294','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','4','0','0','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','4','0','0','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
REPLACE INTO `item_db` VALUES ('2236','Santa\'s_Hat','Santa Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','bonus bMdef,1; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2237','Weird_Goatee','Bandit Beard','5','2','1','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','21','0','','','');
REPLACE INTO `item_db` VALUES ('2239','One_Eyed_Glass','Monocle','5','10000','5000','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','23','0','','','');
@@ -1146,60 +1146,60 @@ REPLACE INTO `item_db` VALUES ('2240','Beard','Beard','5','2','1','100','0','0',
REPLACE INTO `item_db` VALUES ('2241','Granpa_Beard','Grampa Beard','5','5000','2500','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db` VALUES ('2242','Luxury_Sunglasses','Purple Glasses','5','24000','12000','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','26','0','bonus2 bResEff,Eff_Blind,1000;','','');
REPLACE INTO `item_db` VALUES ('2243','Spinning_Eyes','Geek Glasses','5','20000','10000','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','27','0','bonus2 bResEff,Eff_Blind,1500;','','');
-REPLACE INTO `item_db` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','29','0','','','');
-REPLACE INTO `item_db` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','5','0','0','4294967294','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','31','0','','','');
-REPLACE INTO `item_db` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','32','0','','','');
-REPLACE INTO `item_db` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','29','0','','','');
+REPLACE INTO `item_db` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','5','0','0','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','31','0','','','');
+REPLACE INTO `item_db` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','32','0','','','');
+REPLACE INTO `item_db` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('2251','Holy_Bonnet','Monk Hat','5','30000','15000','100','0','0','5','0','0','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2252','Star_Sparkling','Wizard Hat','5','20','10','300','0','0','4','0','0','8454660','63','2','256','0','0',NULL,'1','36','0','bonus bMaxSP,100;','','');
REPLACE INTO `item_db` VALUES ('2253','Sunflower','Sunflower','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db` VALUES ('2256','Magestic_Goat','Majestic Goat','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('2257','Snowy_Horn','Unicorn Horn','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','42','0','','','');
REPLACE INTO `item_db` VALUES ('2258','Sharp_Gear','Spiky Band','5','20','10','1000','0','0','6','0','0','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db` VALUES ('2259','Mini_Propeller','Mini Propeller','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','46','0','','','');
-REPLACE INTO `item_db` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','1','0','0','4294967294','63','2','512','0','0',NULL,'0','47','0','','','');
+REPLACE INTO `item_db` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','1','0','0','2147483647','63','2','512','0','0',NULL,'0','47','0','','','');
REPLACE INTO `item_db` VALUES ('2261','Prontera_Army_Cap','Army Cap','5','20','10','400','0','0','4','0','0','414946','63','2','256','0','0',NULL,'1','48','0','','','');
REPLACE INTO `item_db` VALUES ('2262','Pierrot_Nose','Clown Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','','','');
-REPLACE INTO `item_db` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','50','0','','','');
+REPLACE INTO `item_db` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','50','0','','','');
REPLACE INTO `item_db` VALUES ('2264','Munak_Turban','Munak Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db` VALUES ('2265','Ganster_Mask','Gangster Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','52','0','bonus2 bResEff,Eff_Silence,1500;','','');
REPLACE INTO `item_db` VALUES ('2266','Iron_Cane','Iron Cain','5','20','10','300','0','0','1','0','0','16514','63','2','1','0','50',NULL,'0','53','0','','','');
-REPLACE INTO `item_db` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','58','0','','','');
+REPLACE INTO `item_db` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','58','0','','','');
REPLACE INTO `item_db` VALUES ('2272','Stop_Post','Stop Post','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','59','0','','','');
-REPLACE INTO `item_db` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','4294967294','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
+REPLACE INTO `item_db` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
REPLACE INTO `item_db` VALUES ('2275','Red_Bandana','Red Bandana','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','62','0','','','');
REPLACE INTO `item_db` VALUES ('2276','Eagle_Eyes','Angled Glasses','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','63','0','','','');
REPLACE INTO `item_db` VALUES ('2277','Nurse_Cap','Nurse Cap','5','20','10','100','0','0','2','0','0','33040','63','2','256','0','0',NULL,'1','64','0','bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('2278','Mr_Smile','Mr. Smile','5','60','30','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','65','0','','','');
REPLACE INTO `item_db` VALUES ('2279','Bomb_Wick','Bomb Wick','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','66','0','','','');
REPLACE INTO `item_db` VALUES ('2280','Sahkkat','Sakkat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','67','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','4294967294','63','2','513','0','0',NULL,'0','68','0','','','');
+REPLACE INTO `item_db` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','68','0','','','');
REPLACE INTO `item_db` VALUES ('2282','Spirit_Chain','Halo','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','69','0','bonus2 bSubEle,Ele_Holy,15;','','');
REPLACE INTO `item_db` VALUES ('2283','Ear_Mufs','Ear Muffs','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','70','0','bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','4','0','0','4294967294','63','2','256','0','0',NULL,'1','71','0','','','');
-REPLACE INTO `item_db` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','0','0','0','4294967294','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
-REPLACE INTO `item_db` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','70',NULL,'0','73','0','','','');
-REPLACE INTO `item_db` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','4294967294','63','2','513','0','0',NULL,'0','75','0','','','');
+REPLACE INTO `item_db` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','71','0','','','');
+REPLACE INTO `item_db` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','0','0','0','2147483647','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
+REPLACE INTO `item_db` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','75','0','','','');
REPLACE INTO `item_db` VALUES ('2289','Poo_Poo_Hat','Poo Poo Hat','5','20','10','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','76','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('2290','Funeral_Costume','Funeral Hat','5','3000','1500','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','77','0','','','');
-REPLACE INTO `item_db` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
+REPLACE INTO `item_db` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db` VALUES ('2292','Welding_Mask','Welding Mask','5','20','10','300','0','0','2','0','0','263200','63','2','513','0','50',NULL,'0','79','0','bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db` VALUES ('2293','Pretend_Murdered','Pretend Murdered','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','80','0','','','');
REPLACE INTO `item_db` VALUES ('2294','Star_Dust','Stellar','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','81','0','','','');
-REPLACE INTO `item_db` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
+REPLACE INTO `item_db` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db` VALUES ('2296','Binoculars','Binoculars','5','20','10','100','0','0','1','0','0','526344','63','2','512','0','50',NULL,'0','83','0','bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','4294967294','63','2','513','0','0',NULL,'0','84','0','','','');
+REPLACE INTO `item_db` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','84','0','','','');
REPLACE INTO `item_db` VALUES ('2298','Green_Feeler','Green Feeler','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','85','0','','','');
REPLACE INTO `item_db` VALUES ('2299','Viking_Helm','Orc Helm','5','20','10','500','0','0','5','0','0','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db` VALUES ('2301','Cotton_Shirt','Cotton Shirt','5','10','5','100','0','0','1','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1208,11 +1208,11 @@ REPLACE INTO `item_db` VALUES ('2303','Leather_Jacket','Jacket','5','200','100',
REPLACE INTO `item_db` VALUES ('2304','Leather_Jacket_','Jacket','5','200','100','200','0','0','2','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2305','Adventure_Suit','Adventurer\'s Suit','5','1000','500','300','0','0','3','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2306','Adventurere\'s_Suit_','Adventurer\'s Suit','5','1000','500','300','0','0','3','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','4','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','4','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','5','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','5','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','6','0','1','4294967294','63','2','16','0','30',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','4','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','4','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','5','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','5','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','6','0','1','2147483647','63','2','16','0','30',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2312','Padded_Armor','Padded Armor','5','48000','24000','2800','0','0','7','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2313','Padded_Armor_','Padded Armor','5','48000','24000','2800','0','0','7','0','1','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2314','Chain_Mail','Chain Mail','5','65000','32500','3300','0','0','8','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1220,8 +1220,8 @@ REPLACE INTO `item_db` VALUES ('2315','Chain_Mail_','Chain Mail','5','65000','32
REPLACE INTO `item_db` VALUES ('2316','Plate_Armor','Full Plate','5','80000','40000','4500','0','0','10','0','0','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2317','Plate_Armor_','Full Plate','5','80000','40000','4500','0','0','10','0','1','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2318','Clothes_Of_The_Lord','Lord\'s Clothes','5','20','10','2500','0','0','8','0','1','263200','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','7','0','1','4294967294','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
-REPLACE INTO `item_db` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','5','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','7','0','1','2147483647','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
+REPLACE INTO `item_db` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','5','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2321','Silk_Robe','Silk Robe','5','8000','4000','400','0','0','3','0','0','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db` VALUES ('2322','Silk_Robe_','Silk Robe','5','8000','4000','400','0','0','3','0','1','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db` VALUES ('2323','Scapulare','Scapulare','5','6500','3250','400','0','0','4','0','0','33040','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1239,35 +1239,35 @@ REPLACE INTO `item_db` VALUES ('2334','Mage_Coat','Mage Coat','5','20','10','600
REPLACE INTO `item_db` VALUES ('2335','Thief_Clothes','Thief Clothes','5','74000','37000','100','0','0','6','0','0','33689664','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2336','Thief_Clothes_','Thief Clothes','5','74000','37000','100','0','0','6','0','1','33689664','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2337','Ninja_Suit','Ninja Suit','5','20','10','1500','0','0','7','0','0','33689664','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','0','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
REPLACE INTO `item_db` VALUES ('2339','G_Strings','Pantie','5','1000','500','100','0','0','4','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2340','Novice_Breast','Novice Breastplate','5','89000','44500','500','0','0','4','0','1','1','63','2','16','0','10',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2341','Full_Plate_Armor','Legion Plate Armor','5','94000','47000','5500','0','0','11','0','0','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2342','Full_Plate_Armor_','Legion Plate Armor','5','102500','51250','5500','0','0','11','0','1','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2343','Robe_Of_Casting','Robe of Cast','5','124800','62400','1100','0','0','5','0','0','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bCastrate,-3; bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2344','Flame_Sprits_Armor','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
-REPLACE INTO `item_db` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','4','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
+REPLACE INTO `item_db` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
REPLACE INTO `item_db` VALUES ('2346','Water_Sprits_Armor','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
-REPLACE INTO `item_db` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','4','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
+REPLACE INTO `item_db` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
REPLACE INTO `item_db` VALUES ('2348','Wind_Sprits_Armor','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
-REPLACE INTO `item_db` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','4','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
+REPLACE INTO `item_db` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
REPLACE INTO `item_db` VALUES ('2350','Earth_Sprits_Armor','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
-REPLACE INTO `item_db` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','4','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
+REPLACE INTO `item_db` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
REPLACE INTO `item_db` VALUES ('2352','Novice_Plate','Tattered Novice Ninja Suit','5','1','0','1','0','0','4','0','0','1','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','6','0','1','4294967294','63','2','16','0','65',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','7','0','0','4294967294','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','6','0','1','2147483647','63','2','16','0','65',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','7','0','0','2147483647','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db` VALUES ('2355','Angel\'s_Protection','Angelic Protection','5','10000','5000','600','0','0','4','0','1','1','63','2','16','0','40',NULL,'1','0','0','bonus bMdef,20;','','');
REPLACE INTO `item_db` VALUES ('2356','Vestment_Of_Grace','Blessed Holy Robe','5','20','10','2500','0','0','5','0','1','33024','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus2 bResEff,Eff_Blind,8000;','','');
-REPLACE INTO `item_db` VALUES ('2357','Valkyrie_Armor','Valkyrian Armor','5','0','0','2800','0','0','6','0','1','4294967294','2','2','16','0','1',NULL,'1','0','0','bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;','','');
+REPLACE INTO `item_db` VALUES ('2357','Valkyrie_Armor','Valkyrian Armor','5','0','0','2800','0','0','6','0','1','2147483647','2','2','16','0','1',NULL,'1','0','0','bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;','','');
REPLACE INTO `item_db` VALUES ('2358','Dress_Of_Angel','Angel\'s Dress','5','20','10','1000','0','0','5','0','0','4294967295','63','2','16','0','1',NULL,'0','0','0','bonus bLuk,4;','','');
REPLACE INTO `item_db` VALUES ('2359','Ninja_Suit_','Ninja Suit','5','20','10','1500','0','0','7','0','1','33689664','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2360','Robe_Of_Casting_','Robe of Cast','5','124800','62400','1100','0','0','5','0','1','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bCastrate,-3; bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2364','Meteo_Plate_Armor','Meteo Plate Armor','5','20','10','3000','0','0','10','0','1','279714','2','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Stun,3000; bonus2 bResEff,Eff_Freeze,3000;','','');
-REPLACE INTO `item_db` VALUES ('2365','Orleans_Gown','Orleans\'s Gown','5','20','10','300','0','0','2','0','1','4294967294','2','2','16','0','55',NULL,'1','0','0','bonus bCastrate,15; bonus bNoCastCancel,0;','','');
-REPLACE INTO `item_db` VALUES ('2366','Divine_Cloth','Divine Cloth','5','20','10','1500','0','0','6','0','1','4294967294','2','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Curse,500; bonus2 bResEff,Eff_Silence,500; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; bonus2 bResEff,Eff_Sleep,500;','','');
+REPLACE INTO `item_db` VALUES ('2365','Orleans_Gown','Orleans\'s Gown','5','20','10','300','0','0','2','0','1','2147483647','2','2','16','0','55',NULL,'1','0','0','bonus bCastrate,15; bonus bNoCastCancel,0;','','');
+REPLACE INTO `item_db` VALUES ('2366','Divine_Cloth','Divine Cloth','5','20','10','1500','0','0','6','0','1','2147483647','2','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Curse,500; bonus2 bResEff,Eff_Silence,500; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; bonus2 bResEff,Eff_Sleep,500;','','');
REPLACE INTO `item_db` VALUES ('2367','Sniping_Suit','Sniping Suit','5','20','10','750','0','0','5','0','1','2048','2','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
REPLACE INTO `item_db` VALUES ('2368','Golden_Armor','Golden Armor','5','20','10','2000','0','0','4','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','4294967294','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('2370','Used_Mage_Coat','Used Mage Coat','5','0','0','0','0','0','15','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxHP,300; bonus bMaxSP,30; bonus bBaseAtk,10; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2371','G_Strings_','Pantie','5','1000','500','100','0','0','4','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2372','Mage_Coat_','Mage Coat','5','20','10','600','0','0','5','0','1','8454660','63','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
@@ -1292,139 +1292,139 @@ REPLACE INTO `item_db` VALUES ('2390','Improved_Tights','Improved Tights','5','2
REPLACE INTO `item_db` VALUES ('2391','Life_Link','Life Link','5','20','10','3500','0','0','9','0','1','16514','2','2','16','0','82',NULL,'1','0','0','bonus bVit,2; bonus bMdef,5; bonus bHPrecovRate,50;','','');
REPLACE INTO `item_db` VALUES ('2392','Old_Pant','Old Green Pantie','5','0','0','0','0','0','10','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bStr,2; bonus bVit,2; bonus bMaxHP,200; bonus3 bAutoSpellWhenHit,MO_CALLSPIRITS,5,20; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2393','N_Adventurer\'s_Suit','Novice Adventurer\'s Suit','5','0','0','0','0','0','8','0','1','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','0','0','0','4294967294','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','0','0','0','4294967294','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
-REPLACE INTO `item_db` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','0','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
-REPLACE INTO `item_db` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','2','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','0','0','0','2147483647','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
+REPLACE INTO `item_db` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','0','0','0','2147483647','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
+REPLACE INTO `item_db` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
+REPLACE INTO `item_db` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','2','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2398','Sniping_Suit_M','Sniping Suit','5','20','10','750','0','0','5','0','1','2048','2','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
-REPLACE INTO `item_db` VALUES ('2399','Dragon_Vest','Dragon Vest','5','20','10','500','0','0','3','0','1','4294967294','2','2','16','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2399','Dragon_Vest','Dragon Vest','5','20','10','500','0','0','3','0','1','2147483647','2','2','16','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2401','Sandals','Sandals','5','400','200','200','0','0','1','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2402','Sandals_','Sandals','5','400','200','200','0','0','1','0','1','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','2','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','2','0','1','4294967294','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','2','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','2','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2405','Boots','Boots','5','18000','9000','600','0','0','4','0','0','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2406','Boots_','Boots','5','18000','9000','600','0','0','4','0','1','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','0','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
+REPLACE INTO `item_db` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','0','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
REPLACE INTO `item_db` VALUES ('2408','Cuffs','Shackles','5','5000','2500','3000','0','0','3','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','2','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','2','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2410','Sleipnir','Sleipnir','5','20','10','3500','0','0','5','0','0','4294967295','63','2','64','0','94',NULL,'0','0','0','bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25;','','');
REPLACE INTO `item_db` VALUES ('2411','Grave','Greaves','5','48000','24000','750','0','0','5','0','0','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2412','Grave_','Greaves','5','54000','27000','750','0','0','5','0','1','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2413','Safty_Boots','Safety Boots','5','34000','17000','350','0','0','6','0','0','16514','63','2','64','0','30',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2414','Novice_Boots','Novice Slippers','5','1','0','1','0','0','2','0','0','1','63','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','3','0','1','4294967294','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','3','0','1','2147483647','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2416','Novice_Shoes','Novice Shoes','5','35000','17500','500','0','0','2','0','1','1','63','2','64','0','40',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','3','0','0','4294967294','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
-REPLACE INTO `item_db` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','4','0','0','4294967294','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
-REPLACE INTO `item_db` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','4','0','0','4294967294','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','3','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
+REPLACE INTO `item_db` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','4','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
+REPLACE INTO `item_db` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','4','0','0','2147483647','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
REPLACE INTO `item_db` VALUES ('2420','Angel\'s_Arrival','Angel\'s Reincarnation','5','10000','5000','300','0','0','2','0','1','1','63','2','64','0','25',NULL,'1','0','0','bonus bMaxHP,100;','','');
-REPLACE INTO `item_db` VALUES ('2421','Valkyrie_Shoes','Valkyrian Shoes','5','0','0','500','0','0','4','0','1','4294967294','2','2','64','0','1',NULL,'1','0','0','bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2);','','');
+REPLACE INTO `item_db` VALUES ('2421','Valkyrie_Shoes','Valkyrian Shoes','5','0','0','500','0','0','4','0','1','2147483647','2','2','64','0','1',NULL,'1','0','0','bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db` VALUES ('2422','High_Fashion_Sandals','High Fashion Sandals','5','24000','12000','200','0','0','2','0','1','8487700','63','2','64','0','40',NULL,'1','0','0','bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('2423','Variant_Shoes','Variant Shoes','5','20','10','500','0','0','3','0','0','4294967294','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
-REPLACE INTO `item_db` VALUES ('2424','Tidal_Shoes','Tidal Shoes','5','20','10','300','0','0','3','0','1','4294967294','2','2','64','0','55',NULL,'1','0','0','bonus2 bSubEle,Ele_Water,5;','','');
-REPLACE INTO `item_db` VALUES ('2425','Black_Leather_Boots','Black Leather Boots','5','20','10','500','0','0','4','0','0','4294967294','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('2426','Shadow_Walk','Shadow Walk','5','20','10','2000','0','0','0','0','0','4294967294','2','2','64','0','75',NULL,'1','0','0','bonus bMdef,10; if(getskilllv(AS_CLOAKING)<2) { bonus5 bAutoSpellWhenHit,AS_CLOAKING,2,100,BF_MAGIC,0; } else bonus5 bAutoSpellWhenHit,AS_CLOAKING,getskilllv(AS_CLOAKING),100,BF_MAGIC,0;','','');
+REPLACE INTO `item_db` VALUES ('2423','Variant_Shoes','Variant Shoes','5','20','10','500','0','0','3','0','0','2147483647','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
+REPLACE INTO `item_db` VALUES ('2424','Tidal_Shoes','Tidal Shoes','5','20','10','300','0','0','3','0','1','2147483647','2','2','64','0','55',NULL,'1','0','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db` VALUES ('2425','Black_Leather_Boots','Black Leather Boots','5','20','10','500','0','0','4','0','0','2147483647','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2426','Shadow_Walk','Shadow Walk','5','20','10','2000','0','0','0','0','0','2147483647','2','2','64','0','75',NULL,'1','0','0','bonus bMdef,10; if(getskilllv(AS_CLOAKING)<2) { bonus5 bAutoSpellWhenHit,AS_CLOAKING,2,100,BF_MAGIC,0; } else bonus5 bAutoSpellWhenHit,AS_CLOAKING,getskilllv(AS_CLOAKING),100,BF_MAGIC,0;','','');
REPLACE INTO `item_db` VALUES ('2427','Golden_Shoes','Golden Shoes','5','20','10','300','0','0','4','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2429','Iron_Boots01','Iron Boots','5','0','0','1500','0','0','5','0','0','941290','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2430','Iron_Boots02','Iron Boots','5','0','0','800','0','0','5','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2431','Valley_Shoes','Valley Shoes','5','20','10','0','0','0','10','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMaxHPrate,7; bonus bMaxSPrate,7;','','');
-REPLACE INTO `item_db` VALUES ('2432','Spiky_Heel_','High Heels','5','8500','4250','600','0','0','2','0','1','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2432','Spiky_Heel_','High Heels','5','8500','4250','600','0','0','2','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2433','Diabolus_Boots','Diabolus Boots','5','20','10','250','0','0','4','0','1','13631360','2','2','64','0','0',NULL,'1','0','0','bonus bMaxHP,(BaseLevel*10);','','');
-REPLACE INTO `item_db` VALUES ('2434','Black_Leather_Boots_','Black Leather Boots','5','20','10','500','0','0','4','0','1','4294967294','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2434','Black_Leather_Boots_','Black Leather Boots','5','20','10','500','0','0','4','0','1','2147483647','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2435','Battle_Greave','Battle Greaves','5','10','5','0','0','0','4','0','1','40260834','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2436','Combat_Boots','Combat Boots','5','10','5','0','0','0','3','0','1','9014044','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2437','Battle_Boots','Battle Boots','5','10','5','0','0','0','3','0','1','16777216','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
-REPLACE INTO `item_db` VALUES ('2438','Paw_Of_Cat','Paw Of Cat','5','10','5','300','0','0','0','0','0','4294967295','63','2','64','0','80',NULL,'1','0','0','bonus bFlee,5; bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2438','Paw_Of_Cat','Paw Of Cat','5','10','5','300','0','0','0','0','0','4294967295','63','2','64','0','80',NULL,'1','0','0','bonus bFlee,5; bonus bAgi,1; skill ALL_CATCRY, 1;','','');
REPLACE INTO `item_db` VALUES ('2439','Refresh_Shoes','Refresh Shoes','5','20','10','0','0','0','9','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMaxHPrate,17; bonus bMaxSPrate,8; bonus2 bHPRegenRate,20,10000; bonus2 bSPRegenRate,3,10000;','','');
REPLACE INTO `item_db` VALUES ('2440','Sprint_Shoes','Sprint Shoes','5','20','10','300','0','0','2','0','1','13631360','2','2','64','0','70',NULL,'1','0','0','bonus bAgi,1; bonus bSPrecovRate,5;','','');
REPLACE INTO `item_db` VALUES ('2441','Beach_Sandal','Beach Sandals','5','20','10','200','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db` VALUES ('2442','Boots_Perforated','Red Stocking Boots','5','0','0','0','0','0','7','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bLuk,2; bonus bHPrecovRate,10; bonus bSPrecovRate,10; bonus3 bAutoSpellWhenHit,WZ_QUAGMIRE,3,20; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2443','Fish_Shoes','Fisher\'s Boots','5','10','5','250','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','4294967294','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
-REPLACE INTO `item_db` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','0','0','0','4294967294','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','0','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2447','Military_Boots','Army Boots','5','0','0','1000','0','0','5','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
+REPLACE INTO `item_db` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2447','Military_Boots','Army Boots','5','0','0','1000','0','0','5','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2448','Air_Boss','Air Boss','5','0','0','500','0','0','2','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2449','Variant_Shoes_M','Variant Shoes','5','20','10','500','0','0','3','0','0','4294967294','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
-REPLACE INTO `item_db` VALUES ('2450','Vital_Tree_Shoes','Vital Tree Shoes','5','20','10','500','0','0','4','0','0','4294967294','2','2','64','0','60',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus bHealPower2,5; bonus bAddItemHealRate,5; bonus bMdef,3; bonus bVit,2;','','');
+REPLACE INTO `item_db` VALUES ('2449','Variant_Shoes_M','Variant Shoes','5','20','10','500','0','0','3','0','0','2147483647','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
+REPLACE INTO `item_db` VALUES ('2450','Vital_Tree_Shoes','Vital Tree Shoes','5','20','10','500','0','0','4','0','0','2147483647','2','2','64','0','60',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus bHealPower2,5; bonus bAddItemHealRate,5; bonus bMdef,3; bonus bVit,2;','','');
REPLACE INTO `item_db` VALUES ('2501','Hood','Hood','5','1000','500','200','0','0','1','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2502','Hood_','Hood','5','1000','500','200','0','0','1','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','2','0','0','4294967294','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','2','0','1','4294967294','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','2','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','2','0','1','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2505','Manteau','Manteau','5','32000','16000','600','0','0','4','0','0','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2506','Manteau_','Manteau','5','32000','16000','600','0','0','4','0','1','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','2','0','0','4294967294','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','1','0','0','4294967294','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
+REPLACE INTO `item_db` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','2','0','0','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','1','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
REPLACE INTO `item_db` VALUES ('2509','Clack_Of_Servival','Survivor\'s Manteau','5','20000','10000','550','0','0','0','0','0','8454660','63','2','4','0','75',NULL,'1','0','0','bonus bMdef,5; bonus bVit,10;','','');
REPLACE INTO `item_db` VALUES ('2510','Novice_Hood','Somber Novice Hood','5','1','0','1','0','0','2','0','0','1','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,20;','','');
-REPLACE INTO `item_db` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','1','0','0','4294967294','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
+REPLACE INTO `item_db` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','1','0','0','2147483647','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
REPLACE INTO `item_db` VALUES ('2512','Novice_Manteau','Novice Manteau','5','50000','25000','500','0','0','2','0','1','1','63','2','4','0','40',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,10;','','');
-REPLACE INTO `item_db` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','3','0','1','4294967294','63','2','4','0','80',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','3','0','1','2147483647','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2514','Pauldron','Pauldron','5','20','10','800','0','0','5','0','1','414946','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2515','Wing_Of_Eagle','Eagle Wing','5','20000','10000','300','0','0','1','0','1','8454660','63','2','4','0','85',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','3','0','0','4294967294','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
-REPLACE INTO `item_db` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','4','0','0','4294967294','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
-REPLACE INTO `item_db` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','3','0','0','4294967294','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','3','0','0','4294967294','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
-REPLACE INTO `item_db` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','3','0','0','4294967294','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','3','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
+REPLACE INTO `item_db` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','4','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
+REPLACE INTO `item_db` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','3','0','0','2147483647','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','3','0','0','2147483647','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
+REPLACE INTO `item_db` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','3','0','0','2147483647','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('2521','Angel\'s_Warmth','Angelic Cardigan','5','10000','5000','400','0','0','2','0','1','1','63','2','4','0','20',NULL,'1','0','0','bonus bHPrecovRate,5;','','');
REPLACE INTO `item_db` VALUES ('2522','Undershirt','Undershirt','5','20000','10000','150','0','0','2','0','0','4294967295','63','2','4','0','1',NULL,'1','0','0','bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2523','Undershirt_','Undershirt','5','20000','10000','150','0','0','2','0','1','4294967295','63','2','4','0','1',NULL,'1','0','0','bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2524','Valkyrie_Manteau','Valkyrian Manteau','5','0','0','500','0','0','3','0','1','4294967294','2','2','4','0','1',NULL,'1','0','0','bonus bUnbreakableGarment,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bFlee2,5+(getequiprefinerycnt(EQI_GARMENT)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(EQI_GARMENT)*2);','','');
-REPLACE INTO `item_db` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','2','0','1','4294967294','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2524','Valkyrie_Manteau','Valkyrian Manteau','5','0','0','500','0','0','3','0','1','2147483647','2','2','4','0','1',NULL,'1','0','0','bonus bUnbreakableGarment,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bFlee2,5+(getequiprefinerycnt(EQI_GARMENT)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(EQI_GARMENT)*2);','','');
+REPLACE INTO `item_db` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','2','0','1','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2526','Dragon_Scale_Coat','Coat of Dragon Scale','5','20','10','10','0','0','4','0','0','4294967295','63','2','4','0','50',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2527','Dragon_Breath','Dragon Breath','5','20','10','600','0','0','4','0','1','4294967294','2','2','4','0','48',NULL,'1','0','0','bonus2 bSubRace,RC_Dragon,15;','','');
-REPLACE INTO `item_db` VALUES ('2528','Wool_Scarf','Wool Scarf','5','20','10','500','0','0','3','0','1','4294967294','2','2','4','0','55',NULL,'1','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db` VALUES ('2529','Rider_Insignia','Rider Insignia','5','20','10','500','0','0','4','0','0','4294967294','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('2530','Rider_Insignia_','Rider Insignia','5','20','10','500','0','0','4','0','1','4294967294','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2527','Dragon_Breath','Dragon Breath','5','20','10','600','0','0','4','0','1','2147483647','2','2','4','0','48',NULL,'1','0','0','bonus2 bSubRace,RC_Dragon,15;','','');
+REPLACE INTO `item_db` VALUES ('2528','Wool_Scarf','Wool Scarf','5','20','10','500','0','0','3','0','1','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bMdef,4;','','');
+REPLACE INTO `item_db` VALUES ('2529','Rider_Insignia','Rider Insignia','5','20','10','500','0','0','4','0','0','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2530','Rider_Insignia_','Rider Insignia','5','20','10','500','0','0','4','0','1','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2531','Ulfhedinn','Ulfhedinn','5','20','10','700','0','0','3','0','1','414946','2','2','4','0','70',NULL,'1','0','0','bonus3 bAutoSpellWhenHit,NPC_STONESKIN,1,20;','','');
REPLACE INTO `item_db` VALUES ('2532','Mithril_Magic_Cape','Mithril Magic Cape','5','20','10','400','0','0','3','0','1','625436','2','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
REPLACE INTO `item_db` VALUES ('2534','Ruffler','Ruffler','5','20','10','0','0','0','10','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,17; bonus bFlee,17;','','');
REPLACE INTO `item_db` VALUES ('2535','Cloak_Of_Survival_C','Cloak Of Survival','5','1','0','0','0','0','5','0','0','8454660','63','2','4','0','0',NULL,'0','0','0','bonus bVit,10; bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','2','0','1','4294967294','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
+REPLACE INTO `item_db` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','2','0','1','2147483647','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
REPLACE INTO `item_db` VALUES ('2537','Diabolus_Manteau','Diabolus Manteau','5','20','10','250','0','0','5','0','1','13631360','2','2','4','0','0',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,5; bonus bMaxHP,100; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
REPLACE INTO `item_db` VALUES ('2538','Commander_Manteau','Captain\'s Manteau','5','10','5','0','0','0','4','0','1','40260834','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2539','Commander_Manteau_','Commander\'s Manteau','5','10','5','0','0','0','3','0','1','9014044','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2540','Sheriff_Manteau','Sheriff\'s Manteau','5','10','5','0','0','0','3','0','1','16777216','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2541','Asprika','Asprika','5','20','10','400','0','0','5','0','0','4294967295','63','2','4','0','94',NULL,'0','0','0','bonus bMdef,5; bonus3 bSubEle,Ele_Neutral,30,BF_SHORT; bonus3 bSubEle,Ele_Water,30,BF_SHORT; bonus3 bSubEle,Ele_Earth,30,BF_SHORT; bonus3 bSubEle,Ele_Fire,30,BF_SHORT; bonus3 bSubEle,Ele_Wind,30,BF_SHORT; bonus3 bSubEle,Ele_Poison,30,BF_SHORT; bonus3 bSubEle,Ele_Holy,30,BF_SHORT; bonus3 bSubEle,Ele_Dark,30,BF_SHORT; bonus3 bSubEle,Ele_Ghost,30,BF_SHORT; bonus3 bSubEle,Ele_Undead,30,BF_SHORT; bonus bFlee,30; skill AL_TELEPORT,1; bonus bUnbreakableGarment,0;','','');
-REPLACE INTO `item_db` VALUES ('2542','Flame_Manteau','Flame Manteau of Naght Sieger','5','20','10','70','0','0','4','0','1','4294967294','2','2','4','0','70',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMdef,2; bonus bMatkRate,1; bonus2 bAddEle,Ele_Fire,2;','','');
+REPLACE INTO `item_db` VALUES ('2542','Flame_Manteau','Flame Manteau of Naght Sieger','5','20','10','70','0','0','4','0','1','2147483647','2','2','4','0','70',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMdef,2; bonus bMatkRate,1; bonus2 bAddEle,Ele_Fire,2;','','');
REPLACE INTO `item_db` VALUES ('2543','Sylphid_Manteau','Sylphid Manteau','5','20','10','0','0','0','9','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus bFlee,13; bonus2 bSubEle,Ele_Neutral,13; bonus bFlee2,1;','','');
REPLACE INTO `item_db` VALUES ('2544','Leather_Of_Tendrilion','Leather of Tendrilion','5','20','10','300','0','0','3','0','1','13623168','2','2','4','0','0',NULL,'1','0','0','bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Earth,5; bonus2 bSubRace,RC_Plant,5; bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db` VALUES ('2545','Musika','Musika','5','20','10','500','0','0','2','0','1','33024','2','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus3 bAutoSpellWhenHit,AL_HEAL,getskilllv(AL_HEAL)?getskilllv(AL_HEAL):1,20;','','');
REPLACE INTO `item_db` VALUES ('2546','Beach_Manteau','Beach Manteau','5','20','10','600','0','0','0','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db` VALUES ('2547','Cheap_Running_Shirts','Cheap Undershirt','5','0','0','0','0','0','8','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bDex,2; bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,10; bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2548','Muffler_C','Neo Muffler','5','0','0','0','0','0','5','0','0','4294967294','2','2','4','0','95',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,10; bonus bMaxHPrate,10; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Holy,5; bonus2 bSubEle,Ele_Dark,5;','','');
-REPLACE INTO `item_db` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','0','0','0','4294967294','63','2','4','0','81',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('2548','Muffler_C','Neo Muffler','5','0','0','0','0','0','5','0','0','2147483647','2','2','4','0','95',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,10; bonus bMaxHPrate,10; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Holy,5; bonus2 bSubEle,Ele_Dark,5;','','');
+REPLACE INTO `item_db` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','0','0','0','2147483647','63','2','4','0','81',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('2550','Fisher\'s_Muffler','Fisher\'s Muffler','5','20','10','200','0','0','0','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2551','Rider_Insignia_M','Crest of the Rider','5','20','10','500','0','0','4','0','1','4294967294','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2551','Rider_Insignia_M','Crest of the Rider','5','20','10','500','0','0','4','0','1','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2552','Mithril_Magic_Cape_M','Mithril Magic Manteau','5','20','10','400','0','0','3','0','1','625436','2','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
-REPLACE INTO `item_db` VALUES ('2553','Dragon_Manteau','Dragon Manteau','5','20','10','1000','0','0','5','0','1','4294967294','2','2','4','0','0',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,5;','','');
-REPLACE INTO `item_db` VALUES ('2554','Piece_Of_Angent_Skin','Nydhorgg\'s Shadow Garb','5','20','10','400','0','0','5','0','1','4294967294','2','2','4','0','90',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,7; bonus2 bSubEle,Ele_Water,7; bonus2 bSubEle,Ele_Earth,7; bonus2 bSubEle,Ele_Fire,7; bonus2 bSubEle,Ele_Wind,7; bonus2 bSubEle,Ele_Poison,7; bonus2 bSubEle,Ele_Holy,7; bonus2 bSubEle,Ele_Dark,7; bonus2 bSubEle,Ele_Ghost,7; bonus2 bSubEle,Ele_Undead,7; bonus bMaxSP,(BaseLevel/3)+(getrefine()*10); bonus3 bSPDrainRate,10,1,0; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
-REPLACE INTO `item_db` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
-REPLACE INTO `item_db` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2553','Dragon_Manteau','Dragon Manteau','5','20','10','1000','0','0','5','0','1','2147483647','2','2','4','0','0',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2554','Piece_Of_Angent_Skin','Nydhorgg\'s Shadow Garb','5','20','10','400','0','0','5','0','1','2147483647','2','2','4','0','90',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,7; bonus2 bSubEle,Ele_Water,7; bonus2 bSubEle,Ele_Earth,7; bonus2 bSubEle,Ele_Fire,7; bonus2 bSubEle,Ele_Wind,7; bonus2 bSubEle,Ele_Poison,7; bonus2 bSubEle,Ele_Holy,7; bonus2 bSubEle,Ele_Dark,7; bonus2 bSubEle,Ele_Ghost,7; bonus2 bSubEle,Ele_Undead,7; bonus bMaxSP,(BaseLevel/3)+(getrefine()*10); bonus3 bSPDrainRate,10,1,0; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
+REPLACE INTO `item_db` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
+REPLACE INTO `item_db` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2607','Clip','Clip','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10;','','');
-REPLACE INTO `item_db` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
+REPLACE INTO `item_db` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
REPLACE INTO `item_db` VALUES ('2609','Skul_Ring','Skull Ring','5','10000','5000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2610','Gold_Ring','Gold Ring','5','30000','15000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2611','Silver_Ring','Silver Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2612','Flower_Ring','Flower Ring','5','1500','750','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2613','Diamond_Ring','Diamond Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','4294967294','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
-REPLACE INTO `item_db` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','3','0','0','4294967294','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','4294967294','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
-REPLACE INTO `item_db` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','4294967294','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','4294967294','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','2147483647','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
+REPLACE INTO `item_db` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','3','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2619','Thimble_Of_Archer','Bow Thimble','5','10000','5000','100','0','0','0','0','0','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
REPLACE INTO `item_db` VALUES ('2620','Ring_Of_Rogue','Rogue\'s Treasure','5','10000','5000','100','0','0','0','0','0','33689664','63','2','136','0','70',NULL,'0','0','0','if(readparam(bStr)>=90) { bonus bHit,10; bonus bFlee,10; } if(readparam(bAgi)>=90) { bonus bBaseAtk,10; bonus bCritical,10; }','','');
-REPLACE INTO `item_db` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
-REPLACE INTO `item_db` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
+REPLACE INTO `item_db` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2627','Belt','Belt','5','20000','10000','1200','0','0','0','0','1','4294967295','63','2','136','0','25',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2628','Novice_Armlet','Novice Armlet','5','400','200','200','0','0','0','0','1','1','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2629','Magingiorde','Megingjard','5','20','10','8000','0','0','2','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,40; bonus bMdef,7;','','');
@@ -1436,7 +1436,7 @@ REPLACE INTO `item_db` VALUES ('2636','Gold_Ring_','Gold Christmas Ring','5','30
REPLACE INTO `item_db` VALUES ('2637','Silver_Ring_','Silver Christmas Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2638','Exorcize_Sachet','Sacred Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2639','Purification_Sachet','Occult Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,1; bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
+REPLACE INTO `item_db` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2641','Fashionable_Sack','Fashion Hip Sack','5','20','10','700','0','0','0','0','0','263200','63','2','136','0','50',NULL,'0','0','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('2642','Serin\'s_Gold_Ring','Serin\'s Gold Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2643','Serin\'s_Gold_Ring_','Serin\'s Gold Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1444,14 +1444,14 @@ REPLACE INTO `item_db` VALUES ('2644','The_Sign_','The Sign','5','2','1','0','0'
REPLACE INTO `item_db` VALUES ('2645','Moonlight_Ring','Moonlight Ring','5','40000','20000','200','0','0','0','0','0','33689664','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,2;','','');
REPLACE INTO `item_db` VALUES ('2646','Bunch_Of_Carnation','Bunch of Carnations','5','2','1','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db` VALUES ('2647','Nile_Rose','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
-REPLACE INTO `item_db` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','4294967294','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
-REPLACE INTO `item_db` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','4294967294','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
+REPLACE INTO `item_db` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
+REPLACE INTO `item_db` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
REPLACE INTO `item_db` VALUES ('2652','Cursed_Lucky_Brooch','Goddess of Fortune\'s Cursed Brooch','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,6; bonus2 bAddEff2,Eff_Curse,50;','','');
REPLACE INTO `item_db` VALUES ('2653','Sacrifice_Ring','Sacrifice Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','90',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2654','Shinobi\'s_Sash','Shinobi Sash','5','20000','10000','300','0','0','1','0','0','33689664','63','2','136','0','30',NULL,'0','0','0','bonus bStr,1; bonus bAgi,1; bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2656','Hyper_Changer','Armor Charm','5','20000','10000','1000','0','0','1','0','0','414946','63','2','136','0','1',NULL,'0','0','0','bonus bMaxHP,50;','','');
REPLACE INTO `item_db` VALUES ('2657','Lab_Passport','Laboratory Permit','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2658','Nile_Rose_','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
@@ -1460,16 +1460,16 @@ REPLACE INTO `item_db` VALUES ('2660','Vesper_Core02','Vesper Core 02','5','20',
REPLACE INTO `item_db` VALUES ('2661','Vesper_Core03','Vesper Core 03','5','20','10','100','0','0','1','0','0','13631360','2','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('2662','Vesper_Core04','Vesper Core 04','5','20','10','100','0','0','1','0','0','13631360','2','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db` VALUES ('2663','Gauntlet_Of_Accuracy','Gauntlet of Hit','5','20','10','900','0','0','0','0','0','4294967295','63','2','136','0','75',NULL,'0','0','0','bonus bHit,15; bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','4294967294','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('2665','Ring_Of_Exorcism','Exorcising Ring','5','20','10','500','0','0','0','0','0','33040','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,1; bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5;','','');
REPLACE INTO `item_db` VALUES ('2666','Lamp_Of_Hope','Lantern of Hope','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus bStr,2; bonus2 bResEff,Eff_Blind,1000;','','');
-REPLACE INTO `item_db` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','4294967294','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','2147483647','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('2668','Women\'s_Glory','Woman Glory','5','0','0','500','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2669','Golden_Necklace_','RJC Necklace','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10;','','');
REPLACE INTO `item_db` VALUES ('2670','Ring_Of_Longing','Ring of Longing','5','20','10','100','0','0','1','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('2671','Thimble_Of_Archer_','Bow Thimble','5','10000','5000','100','0','0','0','0','1','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
-REPLACE INTO `item_db` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','4294967294','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','2147483647','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
REPLACE INTO `item_db` VALUES ('2674','Honor_Ring','Ring of Honor','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2675','Lord_Ring','Lord Ring','5','0','0','10','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db` VALUES ('2676','Hunter_Earring','Hunter\'s Earring','5','20','10','300','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bAddMonsterDropItem,7618,100;','','');
@@ -1478,35 +1478,35 @@ REPLACE INTO `item_db` VALUES ('2678','Ring_Of_Flame_Lord','Ring Of Flame Lord',
REPLACE INTO `item_db` VALUES ('2679','Ring_Of_Resonance','Ring Of Resonance','5','20','10','100','0','0','2','0','0','13631360','2','2','136','0','0',NULL,'0','0','0','bonus bAgi,2; bonus bVit,1; bonus bMdef,2; bonus4 bAutoSpellWhenHit,WZ_QUAGMIRE,1,50,0; bonus3 bAutoSpellWhenHit,AS_SPLASHER,10,20; bonus3 bAutoSpellWhenHit,AL_HEAL,10,30; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,3,20; bonus3 bAutoSpellWhenHit,CG_TAROTCARD,5,20;','','');
REPLACE INTO `item_db` VALUES ('2680','Lesser_Elemental_Ring','Lesser Elemental Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1; bonus3 bAutoSpell,WZ_ESTIMATION,1,80; bonus3 bAutoSpell,MC_IDENTIFY,1,50; bonus3 bAutoSpell,TF_PICKSTONE,1,100; bonus3 bAutoSpell,BS_GREED,1,10; bonus3 bAutoSpellWhenHit,TK_RUN,5,20; bonus3 bAutoSpellWhenHit,TK_HIGHJUMP,3,30; bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,100; bonus3 bAutoSpellWhenHit,TF_BACKSLIDING,1,50;','','');
REPLACE INTO `item_db` VALUES ('2681','Republic_Ring','Republic Anniversary Ring','5','20','10','1000','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
-REPLACE INTO `item_db` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
-REPLACE INTO `item_db` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
-REPLACE INTO `item_db` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
-REPLACE INTO `item_db` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
-REPLACE INTO `item_db` VALUES ('2686','Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','4294967294','63','2','512','0','1',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2687','Steel_Flower_C','Steel Flower','5','1','0','0','0','0','1','0','0','4294967294','63','2','1','0','1',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db` VALUES ('2688','Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db` VALUES ('2689','Earring_C','Earring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bInt,3;','','');
-REPLACE INTO `item_db` VALUES ('2690','Ring_C','Ring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db` VALUES ('2691','Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db` VALUES ('2693','Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db` VALUES ('2694','Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
-REPLACE INTO `item_db` VALUES ('2695','Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
-REPLACE INTO `item_db` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
-REPLACE INTO `item_db` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
+REPLACE INTO `item_db` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
+REPLACE INTO `item_db` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
+REPLACE INTO `item_db` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
+REPLACE INTO `item_db` VALUES ('2686','Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','1',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2687','Steel_Flower_C','Steel Flower','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','1',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('2688','Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db` VALUES ('2689','Earring_C','Earring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bInt,3;','','');
+REPLACE INTO `item_db` VALUES ('2690','Ring_C','Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db` VALUES ('2691','Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db` VALUES ('2693','Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db` VALUES ('2694','Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
+REPLACE INTO `item_db` VALUES ('2695','Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
+REPLACE INTO `item_db` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
+REPLACE INTO `item_db` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db` VALUES ('2700','Red_Silk_Seal','Red Silk Seal','5','20','10','100','0','0','0','0','0','16514','2','2','136','0','60',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2701','Orleans_Glove','Orleans\'s Glove','5','20','10','100','0','0','0','0','1','4294967294','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
-REPLACE INTO `item_db` VALUES ('2702','Bison_Horn','Bison Horn','5','20','10','100','0','0','0','0','1','4294967294','2','2','136','0','90',NULL,'0','0','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('2703','Expert_Ring','Expert Ring','5','20','10','150','0','0','0','0','1','4294967294','2','2','136','0','50',NULL,'0','0','0','bonus bDelayrate,-5; bonus bUseSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2701','Orleans_Glove','Orleans\'s Glove','5','20','10','100','0','0','0','0','1','2147483647','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2702','Bison_Horn','Bison Horn','5','20','10','100','0','0','0','0','1','2147483647','2','2','136','0','90',NULL,'0','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2703','Expert_Ring','Expert Ring','5','20','10','150','0','0','0','0','1','2147483647','2','2','136','0','50',NULL,'0','0','0','bonus bDelayrate,-5; bonus bUseSPrate,5;','','');
REPLACE INTO `item_db` VALUES ('2704','Golden_Accessory','Golden Accessories','5','20','10','100','0','0','4','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2705','Golden_Accessory2','Golden Accessories','5','20','10','100','0','0','4','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddMonsterDropItem,12018,500;','','');
REPLACE INTO `item_db` VALUES ('2706','Handcuff','Arrest Handcuffs','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2707','GUSLI','GUSLI','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2708','Chinese_Handicraft','Chinese Handicraft','5','0','0','50','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus3 bAutoSpell,MG_FIREBOLT,5,300;','','');
REPLACE INTO `item_db` VALUES ('2709','5_Anniversary_Coin','5th Anniversary Coin','5','2','1','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5;','','');
-REPLACE INTO `item_db` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
+REPLACE INTO `item_db` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
REPLACE INTO `item_db` VALUES ('2711','Spiritual_Ring_C','Spiritual Ring','5','1','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,2; bonus bDex,2;','','');
REPLACE INTO `item_db` VALUES ('2712','Ragnarok_Limited_Ed','Ragnarok Limited Edition','5','0','0','300','0','0','0','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bVit,3; bonus bAgi,3; bonus bLuk,3;','','');
REPLACE INTO `item_db` VALUES ('2713','Certificate_TW','Certificate','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1524,16 +1524,16 @@ REPLACE INTO `item_db` VALUES ('2724','Medal_Archer','Medal of Honor','5','20','
REPLACE INTO `item_db` VALUES ('2725','Medal_Merchant','Medal of Honor','5','20','10','0','0','0','1','0','0','263200','63','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bAspdRate,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus3 bAddEff,Eff_Curse,100,ATF_SHORT;','','');
REPLACE INTO `item_db` VALUES ('2726','Icarus_Wing','Icarus Wings','5','20','10','100','0','0','0','0','0','2048','2','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
REPLACE INTO `item_db` VALUES ('2727','Bowman_Scarf','Bowman Scarf','5','20','10','200','0','0','0','0','0','2048','2','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
-REPLACE INTO `item_db` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
+REPLACE INTO `item_db` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
REPLACE INTO `item_db` VALUES ('2729','Diabolus_Ring','Diabolus Ring','5','20','10','50','0','0','0','0','1','13631360','2','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,100; bonus bMaxSP,100; bonus bHealPower,5; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
-REPLACE INTO `item_db` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
-REPLACE INTO `item_db` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bCastrate,-1;','','');
-REPLACE INTO `item_db` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bCastrate,-1;','','');
+REPLACE INTO `item_db` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
REPLACE INTO `item_db` VALUES ('2733','Medal_Gunner','Sheriff Badge','5','20','10','0','0','0','1','0','0','16777216','63','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus3 bAddEff,Eff_Blind,100,ATF_LONG;','','');
REPLACE INTO `item_db` VALUES ('2734','Directive_A','Directive','5','0','0','0','0','0','1','0','0','1','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2735','Directive_B','Directive','5','0','0','0','0','0','1','0','0','1','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','4294967294','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','4294967294','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
+REPLACE INTO `item_db` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db` VALUES ('2738','Shiny_Coin','Shiny Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,6; bonus2 bAddRace,RC_Boss,6; bonus bMatkRate,6;','','');
REPLACE INTO `item_db` VALUES ('2739','Ordinary_Coin','Ordinary Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5;','','');
REPLACE INTO `item_db` VALUES ('2740','Rusty_Coin','Rusty Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bMatkRate,3;','','');
@@ -1557,7 +1557,7 @@ REPLACE INTO `item_db` VALUES ('2759','Decussate_Ring','Decussate Ring','5','0',
REPLACE INTO `item_db` VALUES ('2760','Bloody_Ring','Bloody Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bExpAddRace,RC_DemiHuman,15;','','');
REPLACE INTO `item_db` VALUES ('2761','Satanic_Ring','Satanic Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bExpAddRace,RC_Angel,15;','','');
REPLACE INTO `item_db` VALUES ('2762','Dragoon_Ring','Dragon Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bExpAddRace,RC_Dragon,15;','','');
-REPLACE INTO `item_db` VALUES ('2763','Skul_Ring_C','Neo Skull Ring','5','0','0','0','0','0','0','0','0','4294967294','2','2','136','0','95',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5; bonus bMaxHPrate,5; bonus2 bSkillHeal,AL_HEAL,5; skill MG_SIGHT,1;','','');
+REPLACE INTO `item_db` VALUES ('2763','Skul_Ring_C','Neo Skull Ring','5','0','0','0','0','0','0','0','0','2147483647','2','2','136','0','95',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5; bonus bMaxHPrate,5; bonus2 bSkillHeal,AL_HEAL,5; skill MG_SIGHT,1;','','');
REPLACE INTO `item_db` VALUES ('2764','Small_Fishing_Rod','Small Fishing Rod','5','10','5','250','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2765','Novice_Figure','Novice Figure','5','0','0','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,70; if(Class==Job_Novice) bonus bMaxHP,30;','','');
REPLACE INTO `item_db` VALUES ('2766','Swordman_Figure','Swordman Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bVit,1; if(Class==Job_Swordman) bonus bDef,2;','','');
@@ -1566,9 +1566,9 @@ REPLACE INTO `item_db` VALUES ('2768','Mage_Figure','Mage Figure','5','0','0','0
REPLACE INTO `item_db` VALUES ('2769','Archer_Figure','Archer Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bDex,1; if(Class==Job_Archer) bonus bBaseAtk,10;','','');
REPLACE INTO `item_db` VALUES ('2770','Thief_Figure','Thief Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,1; if(Class==Job_Thief) bonus bAspdRate,3;','','');
REPLACE INTO `item_db` VALUES ('2771','Merchant_Figure','Merchant Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; if(Class==Job_Merchant) bonus bCritical,5;','','');
-REPLACE INTO `item_db` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','4294967294','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bCastrate,-3; bonus bHealPower,5;','','');
-REPLACE INTO `item_db` VALUES ('2773','Krieger_Ring2','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','4294967294','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db` VALUES ('2774','Krieger_Ring3','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
+REPLACE INTO `item_db` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bCastrate,-3; bonus bHealPower,5;','','');
+REPLACE INTO `item_db` VALUES ('2773','Krieger_Ring2','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
+REPLACE INTO `item_db` VALUES ('2774','Krieger_Ring3','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db` VALUES ('2775','Lure','Lure','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2776','Cool_Towel','Adventurer\'s Trusty Towel','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','sc_start SC_SUMMER,-1,0;','sc_end SC_SUMMER;');
REPLACE INTO `item_db` VALUES ('2777','Shaman_Ring','Shaman Ring','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bUseSPrate,-5;','','');
@@ -1579,15 +1579,15 @@ REPLACE INTO `item_db` VALUES ('2781','Aumdura\'s_Grace','Aumdura\'s Benefit','5
REPLACE INTO `item_db` VALUES ('2782','Ring_Of_Wise_King','Ring of the Ancient Wise King','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,50; bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('2783','Eyes_Stone_Ring','Eye Stone Ring','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','70',NULL,'0','0','0','bonus bCritical,2; bonus bMaxSP,25;','','');
REPLACE INTO `item_db` VALUES ('2784','Oh_Holy_Night','Christmas Musicbox','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','skill ALL_WEWISH,1;','','');
-REPLACE INTO `item_db` VALUES ('2785','Orleans_Glove_M','Orlean\'s Gloves','5','20','10','100','0','0','0','0','1','4294967294','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2785','Orleans_Glove_M','Orlean\'s Gloves','5','20','10','100','0','0','0','0','1','2147483647','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
REPLACE INTO `item_db` VALUES ('2786','Spiritual_Ring_M','Spiritual Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,2; bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2787','Waterdrop_Brooch','Waterdrop Brooch','5','20','10','200','0','0','0','0','1','4294967294','2','2','136','0','75',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5; bonus bMaxHP,80; bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2788','Bradium_Earing','Bradium Earring','5','20','10','200','0','0','0','0','1','4294967294','2','2','136','0','60',NULL,'0','0','0','bonus bMatkRate,2; bonus bInt,1; bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2789','Bradium_Ring','Bradium Ring','5','20','10','200','0','0','0','0','1','4294967294','2','2','136','0','60',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bStr,1; bonus bVit,1;','','');
-REPLACE INTO `item_db` VALUES ('2790','Bradium_Brooch','Bradium Brooch','5','20','10','200','0','0','0','0','1','4294967294','2','2','136','0','60',NULL,'0','0','0','bonus bFlee,4; bonus bAspdRate,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2787','Waterdrop_Brooch','Waterdrop Brooch','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','75',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5; bonus bMaxHP,80; bonus bMdef,2;','','');
+REPLACE INTO `item_db` VALUES ('2788','Bradium_Earing','Bradium Earring','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','60',NULL,'0','0','0','bonus bMatkRate,2; bonus bInt,1; bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('2789','Bradium_Ring','Bradium Ring','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','60',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bStr,1; bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('2790','Bradium_Brooch','Bradium Brooch','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','60',NULL,'0','0','0','bonus bFlee,4; bonus bAspdRate,2; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2791','Just_Got_Fish','Fresh Fish','5','20','10','500','0','0','0','0','1','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus bHit,3;','','');
REPLACE INTO `item_db` VALUES ('2794','Magic_Stone_Ring','Magic Stone Ring','5','0','0','0','0','0','0','0','1','16514','63','2','136','0','99',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('2795','Green_Apple_Ring','Green Apple Ring','5','0','0','0','0','0','0','0','0','4294967294','63','2','136','0','99',NULL,'0','0','0','bonus bAllStats,6; if(JobLevel <30) { bonus bAllStats,(JobLevel/5); }','','');
+REPLACE INTO `item_db` VALUES ('2795','Green_Apple_Ring','Green Apple Ring','5','0','0','0','0','0','0','0','0','2147483647','63','2','136','0','99',NULL,'0','0','0','bonus bAllStats,6; if(JobLevel <30) { bonus bAllStats,(JobLevel/5); }','','');
REPLACE INTO `item_db` VALUES ('2796','Magical_Stone','Rocks','5','0','0','200','0','0','0','0','0','8454660','63','2','136','0','99',NULL,'0','0','0','bonus2 bAddDamageClass,2047,10; bonus2 bAddDefClass,2048,-10; bonus3 bAddClassDropItem,6152,2047,70;','','');
REPLACE INTO `item_db` VALUES ('2797','Magical_Stone_','Rocks','5','0','0','200','0','0','0','0','0','8454660','63','2','136','0','99',NULL,'0','0','0','bonus2 bAddDamageClass,2049,10; bonus2 bAddDefClass,2050,-10; bonus3 bAddClassDropItem,6151,2049,70;','','');
REPLACE INTO `item_db` VALUES ('2798','Will_Of_Exhausted_Angel','Will Of Exhausted Angel','5','0','0','200','0','0','0','0','0','33024','63','2','136','0','99',NULL,'0','0','0','if(strcharinfo(3)==\"job3_arch02\") { bonus2 bAddDefClass,1761,50; bonus2 bAddDefClass,1762,50; }','','');
@@ -2136,53 +2136,53 @@ REPLACE INTO `item_db` VALUES ('4782','Dex3_J','DEX+3','6','20','10','10','0','0
REPLACE INTO `item_db` VALUES ('4783','Luk1_J','LUK+1','6','20','10','10','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('4784','Luk2_J','LUK+2','6','20','10','10','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('4785','Luk3_J','LUK+3','6','20','10','10','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','3','0','0','4294967294','63','2','256','0','1',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','1',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
REPLACE INTO `item_db` VALUES ('5002','Gemmed_Crown','Jewel Crown','5','20','10','600','0','0','4','0','0','414946','63','2','256','0','60',NULL,'1','88','0','bonus bInt,2; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
-REPLACE INTO `item_db` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
-REPLACE INTO `item_db` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','4294967294','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
-REPLACE INTO `item_db` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','4294967294','63','2','512','0','0',NULL,'0','92','0','','','');
-REPLACE INTO `item_db` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','3','0','0','4294967294','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
-REPLACE INTO `item_db` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','94','0','','','');
-REPLACE INTO `item_db` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
+REPLACE INTO `item_db` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
+REPLACE INTO `item_db` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','2147483647','63','2','512','0','0',NULL,'0','92','0','','','');
+REPLACE INTO `item_db` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
+REPLACE INTO `item_db` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','94','0','','','');
+REPLACE INTO `item_db` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5010','Indian_Hair_Piece','Indian Fillet','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','96','0','','','');
REPLACE INTO `item_db` VALUES ('5011','Antenna','Aerial','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','97','0','','','');
-REPLACE INTO `item_db` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
REPLACE INTO `item_db` VALUES ('5013','Horn_Of_Lord_Kaho','Lord Kaho\'s Horn','5','20','10','100','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','99','0','bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20;','','');
REPLACE INTO `item_db` VALUES ('5014','Fin_Helm','Fin Helm','5','20','10','300','0','0','2','0','0','16514','63','2','512','0','65',NULL,'0','100','0','','','');
REPLACE INTO `item_db` VALUES ('5015','Egg_Shell','Egg Shell','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','101','0','','','');
-REPLACE INTO `item_db` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
REPLACE INTO `item_db` VALUES ('5017','Bone_Helm','Bone Helm','5','20','10','800','0','0','7','0','0','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
REPLACE INTO `item_db` VALUES ('5018','Feather_Bonnet','Feather Bonnet','5','20','10','300','0','0','4','0','0','526344','63','2','256','0','0',NULL,'1','104','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5020','Kafra_Band','Kafra Band','5','20','10','500','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','106','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('5021','Bankruptcy_Of_Heart','Grief for Greed','5','20','10','1200','0','0','4','0','0','263200','63','2','256','0','38',NULL,'1','107','0','bonus bInt,1; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('5022','Helm_Of_Sun','Hat of the Sun God','5','20','10','2400','0','0','4','0','0','13623168','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db` VALUES ('5023','Hat_Of_Bundle','Parcel Hat','5','20','10','1000','0','0','0','0','0','263200','63','2','256','0','0',NULL,'1','108','0','','','');
REPLACE INTO `item_db` VALUES ('5024','Hat_Of_Cake','Cake Hat','5','20','10','1000','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','109','0','','','');
REPLACE INTO `item_db` VALUES ('5025','Helm_Of_Angel','Helm of Angel','5','20','10','1600','0','0','5','0','0','13623168','63','2','256','0','74',NULL,'1','110','0','bonus bAgi,1; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','1','0','0','4294967294','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','1','0','0','2147483647','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('5027','Wizardry_Hat','Mage Hat','5','20','10','300','0','0','1','0','0','8454660','63','2','256','0','0',NULL,'1','112','0','bonus bInt,2; bonus bMaxSP,150;','','');
REPLACE INTO `item_db` VALUES ('5028','Candle','Candle','5','20','10','150','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','113','0','','','');
-REPLACE INTO `item_db` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','3','0','0','4294967294','63','2','256','0','20',NULL,'1','114','0','','','');
-REPLACE INTO `item_db` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','3','0','0','4294967294','63','2','256','0','40',NULL,'1','115','0','','','');
+REPLACE INTO `item_db` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','114','0','','','');
+REPLACE INTO `item_db` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','3','0','0','2147483647','63','2','256','0','40',NULL,'1','115','0','','','');
REPLACE INTO `item_db` VALUES ('5031','Mine_Helm','Mine Hat','5','20','10','1500','0','0','4','0','0','447986','63','2','256','0','55',NULL,'1','116','0','bonus bDex,2;','','');
-REPLACE INTO `item_db` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','117','0','','','');
-REPLACE INTO `item_db` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','3','0','0','4294967294','63','2','256','0','50',NULL,'1','118','0','','','');
-REPLACE INTO `item_db` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','4294967294','63','2','256','0','0',NULL,'1','119','0','','','');
-REPLACE INTO `item_db` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','2','0','0','4294967294','63','2','256','0','38',NULL,'1','120','0','','','');
-REPLACE INTO `item_db` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','1','0','0','4294967294','63','2','256','0','10',NULL,'1','121','0','','','');
+REPLACE INTO `item_db` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','117','0','','','');
+REPLACE INTO `item_db` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','3','0','0','2147483647','63','2','256','0','50',NULL,'1','118','0','','','');
+REPLACE INTO `item_db` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','119','0','','','');
+REPLACE INTO `item_db` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','2','0','0','2147483647','63','2','256','0','38',NULL,'1','120','0','','','');
+REPLACE INTO `item_db` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','1','0','0','2147483647','63','2','256','0','10',NULL,'1','121','0','','','');
REPLACE INTO `item_db` VALUES ('5037','Fruit_Shell','Nut Shell','5','20','10','150','0','0','4','0','0','4294967295','63','2','256','0','5',NULL,'0','122','0','','','');
-REPLACE INTO `item_db` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','2','0','0','4294967294','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('5039','Mottled_Egg_Shell','Rainbow Eggshell','5','20','10','400','0','0','4','0','0','4294967295','63','2','256','0','19',NULL,'0','124','0','','','');
REPLACE INTO `item_db` VALUES ('5040','Blush','Blush','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','125','0','','','');
REPLACE INTO `item_db` VALUES ('5041','Heart_Hair_Pin','Heart Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','126','0','','','');
-REPLACE INTO `item_db` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','4294967294','63','2','256','0','14',NULL,'1','127','0','','','');
-REPLACE INTO `item_db` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','1','0','0','4294967294','63','2','512','0','20',NULL,'0','128','0','','','');
+REPLACE INTO `item_db` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','2147483647','63','2','256','0','14',NULL,'1','127','0','','','');
+REPLACE INTO `item_db` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','1','0','0','2147483647','63','2','512','0','20',NULL,'0','128','0','','','');
REPLACE INTO `item_db` VALUES ('5044','Devil\'s_Wing','Evil Wing Ears','5','20','10','350','0','0','2','0','0','0','63','2','256','0','45',NULL,'1','129','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5045','Magician_Hat','Magician Hat','5','20','10','500','0','0','3','0','0','8487700','63','2','256','0','50',NULL,'1','130','0','bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50;','','');
REPLACE INTO `item_db` VALUES ('5046','Bongun_Hat','Bongun Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
-REPLACE INTO `item_db` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','4294967294','63','2','256','0','0',NULL,'1','131','0','','','');
+REPLACE INTO `item_db` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','131','0','','','');
REPLACE INTO `item_db` VALUES ('5048','First_Moon_Hair_Pin','Cresent Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','132','0','','','');
REPLACE INTO `item_db` VALUES ('5049','Stripe_Band','Striped Hairband','5','20','10','150','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','133','0','','','');
REPLACE INTO `item_db` VALUES ('5050','Mystery_Fruit_Shell','Wonder Nutshell','5','20','10','300','0','0','5','0','0','4294967295','63','2','256','0','30',NULL,'0','134','0','','','');
@@ -2193,22 +2193,22 @@ REPLACE INTO `item_db` VALUES ('5054','Assasin_Mask','Assassin Mask','5','20','1
REPLACE INTO `item_db` VALUES ('5055','Novice_Egg_Cap','Novice False Eggshell','5','1','0','1','0','0','3','0','0','1','63','2','256','0','0',NULL,'0','101','0','','','');
REPLACE INTO `item_db` VALUES ('5056','Love_Berry','Fruit of Love','5','1','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','140','0','','','');
REPLACE INTO `item_db` VALUES ('5057','Ear_Of_Black_Cat','Black Cat Ears','5','16000','8000','200','0','0','2','0','0','4294967295','63','2','256','0','45',NULL,'1','141','0','','','');
-REPLACE INTO `item_db` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
REPLACE INTO `item_db` VALUES ('5059','Brown_Bear_Cap','Teddybear Hat','5','20','10','800','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'1','143','0','','','');
REPLACE INTO `item_db` VALUES ('5060','Party_Hat','Party Hat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5061','Flower_Hairpin','Flower Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','145','0','','','');
REPLACE INTO `item_db` VALUES ('5062','Straw_Hat','Straw Hat','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'1','146','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','147','0','','','');
+REPLACE INTO `item_db` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','147','0','','','');
REPLACE INTO `item_db` VALUES ('5064','Leaf_Headgear','Smokie Leaf','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','148','0','','','');
REPLACE INTO `item_db` VALUES ('5065','Fish_On_Head','Blue Fish','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus2 bAddRace,RC_Fish,10;','','');
-REPLACE INTO `item_db` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','4','0','0','4294967294','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','4','0','0','4294967294','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5068','Ear_Of_Devil\'s_Wing','Evil Wing Ears','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','70',NULL,'0','152','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
-REPLACE INTO `item_db` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','4','0','0','4294967294','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
+REPLACE INTO `item_db` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
+REPLACE INTO `item_db` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
REPLACE INTO `item_db` VALUES ('5074','Ear_Of_Angel\'s_Wing','Angel Wing Ears','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','70',NULL,'0','158','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5075','Cowboy_Hat','Cowboy Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','159','0','','','');
REPLACE INTO `item_db` VALUES ('5076','Fur_Hat','Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','160','0','bonus bLuk,1;','','');
@@ -2216,20 +2216,20 @@ REPLACE INTO `item_db` VALUES ('5077','Tulip_Hairpin','Tulip Hairpin','5','20','
REPLACE INTO `item_db` VALUES ('5078','Sea_Otter_Cap','Sea-Otter Hat','5','20','10','800','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'1','162','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5079','Crossed_Hair_Band','X Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','163','0','','','');
REPLACE INTO `item_db` VALUES ('5080','Headgear_Of_Queen','Crown of Ancient Queen','5','20','10','400','0','0','4','0','0','4294967295','63','2','256','0','45',NULL,'1','164','0','','','');
-REPLACE INTO `item_db` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','0','0','0','4294967294','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5082','Mushroom_Band','Decorative Mushroom','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','166','0','','','');
REPLACE INTO `item_db` VALUES ('5083','Red_Tailed_Ribbon','Red Ribbon','5','20','10','200','0','0','1','0','0','4294967295','63','2','256','0','45',NULL,'1','167','0','bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
+REPLACE INTO `item_db` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
REPLACE INTO `item_db` VALUES ('5085','Pair_Of_Red_Ribbon','Small Ribbons','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
-REPLACE INTO `item_db` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','4294967294','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
+REPLACE INTO `item_db` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
REPLACE INTO `item_db` VALUES ('5087','Goblin_Mask_01','Poker Face','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','171','0','','','');
REPLACE INTO `item_db` VALUES ('5088','Goblin_Mask_02','Surprised Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','172','0','','','');
REPLACE INTO `item_db` VALUES ('5089','Goblin_Mask_03','Annoyed Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','173','0','','','');
REPLACE INTO `item_db` VALUES ('5090','Goblin_Mask_04','Goblin Leader Mask','5','20','10','100','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','174','0','','','');
-REPLACE INTO `item_db` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','4294967294','63','2','768','0','35',NULL,'1','175','0','','','');
+REPLACE INTO `item_db` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','','','');
REPLACE INTO `item_db` VALUES ('5092','Blue_Coif','Coif','5','150000','75000','300','0','0','5','0','0','4352','63','2','768','0','65',NULL,'1','176','0','','','');
REPLACE INTO `item_db` VALUES ('5093','Blue_Coif_','Coif','5','150000','75000','300','0','0','5','0','1','4352','63','2','768','0','65',NULL,'1','177','0','bonus bMaxSP,100;','','');
-REPLACE INTO `item_db` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','4294967294','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5096','Assassin_Mask_','Assassin Mask','5','20','10','100','0','0','0','0','0','4352','63','2','1','0','70',NULL,'0','180','0','','','');
REPLACE INTO `item_db` VALUES ('5097','Cone_Hat_','Holiday Hat','5','0','0','400','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','','','');
REPLACE INTO `item_db` VALUES ('5098','Tiger_Mask','Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','181','0','bonus bStr,3; bonus bMaxHP,100;','','');
@@ -2237,8 +2237,8 @@ REPLACE INTO `item_db` VALUES ('5099','Cat_Hat','Neko Mimi','5','20','10','300',
REPLACE INTO `item_db` VALUES ('5100','Sales_Signboard','Sales Banner','5','20','10','800','0','0','0','0','0','4294967295','63','2','256','0','75',NULL,'1','183','0','bonus bStr,1; bonus bAgi,1; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5101','Takius_Blindfold','Takius\'s Blindfold','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','184','0','','','');
REPLACE INTO `item_db` VALUES ('5102','Round_Eyes','Blank Eyes','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','185','0','','','');
-REPLACE INTO `item_db` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','1','0','0','4294967294','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
-REPLACE INTO `item_db` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
+REPLACE INTO `item_db` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','1','0','0','2147483647','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
+REPLACE INTO `item_db` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
REPLACE INTO `item_db` VALUES ('5105','Hat_Of_Cake_','2nd Anniversary Hat','5','20','10','1000','0','0','1','0','0','4294967295','63','2','256','0','24',NULL,'1','109','0','bonus bDex,1; bonus bMaxSP,80; bonus3 bAddMonsterDropItem,7864,7,50;','','');
REPLACE INTO `item_db` VALUES ('5106','Cone_Hat_INA','2nd Anniversary Hat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','1',NULL,'0','144','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5107','Well_Baked_Toast','Crunch Toast','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','188','0','','','');
@@ -2255,29 +2255,29 @@ REPLACE INTO `item_db` VALUES ('5117','Mistic_Rose','Mystic Rose','5','20','10',
REPLACE INTO `item_db` VALUES ('5118','Ear_Of_Puppy','Puppy Headband','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','199','0','','','');
REPLACE INTO `item_db` VALUES ('5119','Super_Novice_Hat_','Super Novice Hat','5','8500','4250','400','0','0','4','0','1','1','63','2','256','0','40',NULL,'1','193','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db` VALUES ('5120','Fedora_','Bucket Hat','5','6000','3000','300','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','195','0','','','');
-REPLACE INTO `item_db` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','4294967294','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','5','0','0','4294967294','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','3','0','1','4294967294','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','3','0','0','4294967294','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
+REPLACE INTO `item_db` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','2147483647','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','5','0','0','2147483647','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','3','0','1','2147483647','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','3','0','0','2147483647','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
REPLACE INTO `item_db` VALUES ('5125','Kiss_Of_Angel','Angel\'s Kiss','5','10000','5000','300','0','0','3','0','1','1','63','2','256','0','50',NULL,'1','255','0','bonus bSPrecovRate,5;','','');
-REPLACE INTO `item_db` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','1','0','0','4294967294','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','4','0','0','4294967294','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
-REPLACE INTO `item_db` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','5','0','0','4294967294','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','1','0','0','2147483647','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','4','0','0','2147483647','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
+REPLACE INTO `item_db` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','5','0','0','2147483647','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('5129','Bird_Nest','Bird Nest','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','50',NULL,'0','201','0','bonus bAgi,2; bonus2 bSubRace,RC_Brute,10;','','');
REPLACE INTO `item_db` VALUES ('5130','Lion_Mask','Lion Mask','5','20','10','700','0','0','0','0','0','13623168','63','2','768','0','75',NULL,'1','202','0','bonus2 bAddEffWhenHit,Eff_Silence,500; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('5131','Close_Helmet','Close Helmet','5','20','10','1200','0','0','8','0','0','16514','63','2','769','0','75',NULL,'1','203','0','bonus bVit,3; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db` VALUES ('5132','Angeling_Hat','Angeling Hat','5','20','10','700','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','204','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5133','Sheep_Hat','Sheep Hat','5','20','10','150','0','0','1','0','0','33040','63','2','256','0','0',NULL,'0','205','0','bonus bShortWeaponDamageReturn,5;','','');
REPLACE INTO `item_db` VALUES ('5134','Pumpkin_Hat','Pumpkin-Head','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','206','0','bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','4294967294','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
+REPLACE INTO `item_db` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','2147483647','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
REPLACE INTO `item_db` VALUES ('5136','Santa\'s_Hat_','Antonio\'s Santa Hat','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','','','');
-REPLACE INTO `item_db` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','4294967294','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
+REPLACE INTO `item_db` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
REPLACE INTO `item_db` VALUES ('5138','Magic_Eyes','Magic Eyes','5','20','10','300','0','0','1','0','0','8454660','63','2','256','0','30',NULL,'1','209','0','bonus bMdef,5; bonus bCastrate,-10; bonus bUseSPrate,20;','','');
REPLACE INTO `item_db` VALUES ('5139','Hibiscus','Hibiscus','5','20','10','200','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','210','0','bonus bDex,1; bonus bInt,1; bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('5140','Charming_Ribbon','Charming Ribbon','5','20','10','400','0','0','1','0','1','4294967295','63','2','256','0','10',NULL,'1','211','0','bonus2 bSubRace,RC_Undead,5; bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','0','0','1','4294967294','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5142','Crescent_Helm','Crescent Helm','5','20','10','3000','0','0','8','0','0','279714','63','2','768','0','50',NULL,'1','213','0','bonus bVit,1; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','4294967294','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
+REPLACE INTO `item_db` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','2147483647','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
REPLACE INTO `item_db` VALUES ('5144','Gambler_Hat','Gambler Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','bonus bLuk,5;','','');
REPLACE INTO `item_db` VALUES ('5145','Carnival_Joker_Jester','Carnival Joker Jester','5','10','5','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','89','0','','','');
REPLACE INTO `item_db` VALUES ('5146','Elephant_Hat','Elephant Hat','5','0','0','500','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,7; skill WZ_WATERBALL,1;','','');
@@ -2293,19 +2293,19 @@ REPLACE INTO `item_db` VALUES ('5155','Granpa_Beard_F','Father\'s White Moustach
REPLACE INTO `item_db` VALUES ('5156','Flu_Mask_F','Father\'s Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus bMatkRate,1;','','');
REPLACE INTO `item_db` VALUES ('5157','Viking_Helm_','Orc Helm','5','20','10','500','0','0','5','0','1','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db` VALUES ('5158','Holy_Bonnet_','Monk Hat','5','30000','15000','100','0','0','5','0','1','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','5','0','1','4294967294','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','5','0','1','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5160','Magestic_Goat_','Majestic Goat','5','20','10','800','0','0','5','0','1','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5161','Sharp_Gear_','Spiky Band','5','20','10','1000','0','0','6','0','1','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db` VALUES ('5162','Bone_Helm_','Bone Helm','5','20','10','800','0','0','7','0','1','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
-REPLACE INTO `item_db` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','5','0','1','4294967294','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
-REPLACE INTO `item_db` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','4','0','1','4294967294','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','4','0','1','4294967294','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','5','0','1','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','4','0','1','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','4','0','1','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('5166','Spinx_Helm_','Sphinx Hat','5','20','10','3000','0','0','5','0','1','16514','63','2','257','0','65',NULL,'0','137','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('5167','Munak_Turban_','Munak Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db` VALUES ('5168','Bongun_Hat_','Bongun Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
REPLACE INTO `item_db` VALUES ('5169','Bride_Mask','Bride Mask','5','30000','15000','500','0','0','4','0','1','4294967295','63','2','768','0','40',NULL,'1','223','0','if(BaseClass==Job_Taekwon) { bonus bLuk,2; bonus bCritical,5; }','','');
-REPLACE INTO `item_db` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
-REPLACE INTO `item_db` VALUES ('5171','Valkyrie_Helm','Valkyrie Helm','5','100000','50000','1000','0','0','5','0','1','4294967294','2','2','256','0','0',NULL,'1','225','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db` VALUES ('5171','Valkyrie_Helm','Valkyrie Helm','5','100000','50000','1000','0','0','5','0','1','2147483647','2','2','256','0','0',NULL,'1','225','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('5172','Beret','Beret','5','30000','15000','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','226','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5173','Satto_Hat','Magistrate Hat','5','30000','15000','400','0','0','3','0','1','4294967295','63','2','256','0','60',NULL,'1','227','0','if(BaseClass==Job_Taekwon) { bonus bAgi,1; bonus bHPrecovRate,3; }','','');
REPLACE INTO `item_db` VALUES ('5174','Ayam','Ayam','5','30000','15000','400','0','0','3','0','1','4294967295','63','2','256','0','60',NULL,'1','228','0','if(BaseClass==Job_Taekwon) { bonus bInt,1; bonus bSPrecovRate,3; }','','');
@@ -2318,7 +2318,7 @@ REPLACE INTO `item_db` VALUES ('5180','Phrygian_Cap_','France Holiday Hat','5','
REPLACE INTO `item_db` VALUES ('5181','Helm_Of_Darkness','Helm of Darkness','5','20','10','2000','0','0','3','0','1','414946','63','2','768','0','50',NULL,'1','233','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('5182','Puppy_Hat','Puppy Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','30',NULL,'0','234','0','bonus bAgi,1; bonus3 bAutoSpell,PR_GLORIA,1,10+20*(readparam(bAgi)>=77);','','');
REPLACE INTO `item_db` VALUES ('5183','Bird_Nest_Hat','Bird Nest Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'1','235','0','bonus bDex,1; bonus bAgi,1; bonus2 bResEff,Eff_Stun,1000;','','');
-REPLACE INTO `item_db` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','4','0','0','4294967294','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','4','0','0','2147483647','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
REPLACE INTO `item_db` VALUES ('5185','Laurel_Wreath','Laurel Wreath','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','10',NULL,'1','237','0','bonus bLuk,3; bonus2 bResEff,Eff_Blind,500; bonus2 bResEff,Eff_Curse,500;','','');
REPLACE INTO `item_db` VALUES ('5186','Geographer_Band','Geographer Band','5','20','10','500','0','0','1','0','0','4294967295','63','2','256','0','30',NULL,'0','238','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,50;','','');
REPLACE INTO `item_db` VALUES ('5187','Twin_Ribbon','Twin Ribbon','5','20','10','200','0','0','0','0','1','4294967295','63','2','256','0','30',NULL,'1','239','0','bonus bMaxSP,30; bonus bMdef,3; bonus3 bAutoSpellWhenHit,NPC_STONESKIN,6,10; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,6,120,BF_MAGIC,0;','','');
@@ -2340,35 +2340,35 @@ REPLACE INTO `item_db` VALUES ('5202','Pumpkin_Hat_','Fantastic Pumpkin-Head','5
REPLACE INTO `item_db` VALUES ('5203','Tongue_Mask','Smiling Mask','5','20','10','200','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','253','0','bonus bSpeedRate,25;','','');
REPLACE INTO `item_db` VALUES ('5204','Event_Pierrot_Nose','Rudolph\'s Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','bonus2 bResEff,Eff_Blind,3000; bonus2 bAddMonsterDropItem,12130,30;','','');
REPLACE INTO `item_db` VALUES ('5205','Wreath','Emperor\'s Laurel Crown','5','20','10','1000','0','0','3','0','0','4294967295','63','2','768','0','0',NULL,'1','261','0','bonus bAllStats,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
REPLACE INTO `item_db` VALUES ('5207','Gold_Spirit_Chain','Angel Blessing','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','260','0','bonus bLuk,1; bonus2 bSubEle,Ele_Holy,5;','','');
-REPLACE INTO `item_db` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','2','0','1','4294967294','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
+REPLACE INTO `item_db` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','2','0','1','2147483647','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
REPLACE INTO `item_db` VALUES ('5209','Yellow_Baseball_Cap','Love Dad Cap','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','263','0','','','');
REPLACE INTO `item_db` VALUES ('5210','Flying_Angel','Flapping Angel Wing','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bCastrate,-3; bonus bAspdRate,3; bonus bInt,1; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5211','Dress_Hat','Dress Hat','5','0','0','200','0','0','2','0','1','4294967295','63','2','256','0','20',NULL,'1','265','0','bonus bMdef,7; bonus bStr,1; bonus bInt,1; bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bHealPower,5; if(getrefine()>=7) { bonus2 bAddRace,RC_NonBoss,1; bonus2 bAddRace,RC_Boss,1; bonus bMatkRate,1; bonus bHealPower,1; }','','');
REPLACE INTO `item_db` VALUES ('5212','Satellite_Hairband','Satellite Hairband','5','0','0','1000','0','0','3','0','1','4294967295','63','2','256','0','30',NULL,'1','266','0','bonus bMaxHP,50; bonus bMaxSP,10; skill AL_RUWACH,1;','','sc_end SC_RUWACH;');
REPLACE INTO `item_db` VALUES ('5213','Black_Bunny_Band','Sheila Hairnet','5','0','0','200','0','0','2','0','0','4294967295','63','2','256','0','1',NULL,'1','267','0','bonus bAgi,2; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('5214','Moonlight_Flower_Hat','Moonlight Flower Hat','5','0','0','200','0','0','3','0','0','4294967295','63','2','768','0','1',NULL,'1','268','0','bonus bDex,2; bonus3 bAutoSpell,AL_INCAGI,1,50;','','');
-REPLACE INTO `item_db` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db` VALUES ('5217','Magestic_Goat_TW','Evolved Majestic Goat','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('5218','Bunny_Band_','Evolved Bunny Band','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','15','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
-REPLACE INTO `item_db` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
+REPLACE INTO `item_db` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
+REPLACE INTO `item_db` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db` VALUES ('5221','Pair_Of_Red_Ribbon_','Evolved Pair of Red Ribbon','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('5222','Fish_On_Head_','Evolved Blue Fish','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus bAgi,1; bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','4294967294','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','4294967294','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db` VALUES ('5225','Marcher_Hat','Parade Hat','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','10',NULL,'1','269','0','bonus bMdef,2; bonus bStr,2; bonus4 bAutoSpellWhenHit,AL_ANGELUS,5,30,0; bonus4 bAutoSpellWhenHit,HP_ASSUMPTIO,1,1,0; bonus2 bResEff,Eff_Stun,1000; if(BaseClass==Job_Acolyte) bonus4 bAutoSpellOnSkill,AL_HEAL,PR_LEXAETERNA,1,1000;','','');
REPLACE INTO `item_db` VALUES ('5226','Mini_Propeller_','Mini Propeller','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bAgi,2; bonus bDex,1; bonus bFlee,10; bonus bCastrate,-getrefine();','','');
-REPLACE INTO `item_db` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','2','0','0','4294967294','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','4294967294','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','2','0','0','4294967294','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
REPLACE INTO `item_db` VALUES ('5235','Gray_Fur_Hat','Brown Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','279','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5236','Blue_Fur_Hat','Blue Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','280','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5237','Pink_Fur_Hat','Pink Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','281','0','bonus bLuk,1;','','');
@@ -2391,18 +2391,18 @@ REPLACE INTO `item_db` VALUES ('5253','Lif_Doll_Hat','Lif Doll Hat','5','20','10
REPLACE INTO `item_db` VALUES ('5254','Deviling_Hat','Deviling Hat','5','20','10','500','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','298','0','bonus bStr,1; bonus bCritical,3; bonus2 bSubRace,RC_Angel,-20; if(getrefine()>=6) { bonus bCritical,getrefine()-5; }','','');
REPLACE INTO `item_db` VALUES ('5255','Triple_Poring_Hat','Triple Poring Hat','5','20','10','600','0','0','3','0','0','4294967295','63','2','256','0','20',NULL,'0','299','0','bonus bLuk,3; bonus3 bAutoSpell,BS_GREED,1,50;','','');
REPLACE INTO `item_db` VALUES ('5256','Valkyrie_Feather_Band','Valkyrie Feather Band','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','300','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,10;','','');
-REPLACE INTO `item_db` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','2','0','0','4294967294','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
+REPLACE INTO `item_db` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','2','0','0','2147483647','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
REPLACE INTO `item_db` VALUES ('5258','Afro_Wig','Afro Wig','5','20','10','100','0','0','0','0','1','4294967295','63','2','768','0','10',NULL,'1','302','0','bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,300; bonus2 bSubEle,Ele_Neutral,1;','','');
REPLACE INTO `item_db` VALUES ('5259','Elephant_Hat_','Elephant Hat','5','20','10','500','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus3 bAutoSpell,WZ_WATERBALL,3,10; skill AL_HOLYWATER,1;','','');
REPLACE INTO `item_db` VALUES ('5260','Cookie_Hat','Cookie Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','217','0','bonus bAgi,1; bonus bFlee2,5; bonus bCritAtkRate,5;','','');
REPLACE INTO `item_db` VALUES ('5261','Silver_Tiara_','Silver Tiara','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','218','0','bonus bInt,2; if(BaseClass==Job_Mage) bonus bMatkRate,(JobLevel/20); if(BaseClass==Job_Acolyte) bonus bUseSPrate,-(JobLevel/10); if(BaseClass==Job_Archer) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db` VALUES ('5262','Gold_Tiara_','Golden Tiara','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','232','0','bonus bStr,2; bonus bUnbreakableHelm,0; if((readparam(bDex)<56)&&(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief)) bonus bDex,JobLevel/7;','','');
-REPLACE INTO `item_db` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','4294967294','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
+REPLACE INTO `item_db` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','2147483647','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
REPLACE INTO `item_db` VALUES ('5264','Aussie_Flag_Hat','Australian Flag Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','304','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db` VALUES ('5265','Apple_Of_Archer_C','Apple of Archer','5','1','0','0','0','0','7','0','0','4294967294','63','2','256','0','1',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db` VALUES ('5265','Apple_Of_Archer_C','Apple of Archer','5','1','0','0','0','0','7','0','0','2147483647','63','2','256','0','1',NULL,'0','72','0','bonus bDex,4;','','');
REPLACE INTO `item_db` VALUES ('5266','Bunny_Band_C','Bunny Band','5','1','0','0','0','0','9','0','0','4294967295','63','2','256','0','1',NULL,'0','15','0','bonus bMdef,5; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5267','Sahkkat_C','Sakkat','5','1','0','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','bonus bAgi,3;','','');
-REPLACE INTO `item_db` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','10','0','0','4294967294','63','2','256','0','1',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
+REPLACE INTO `item_db` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','10','0','0','2147483647','63','2','256','0','1',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('5269','Flying_Angel_','Flapping Angel Wing','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1; bonus bAspdRate,3; bonus bSpeedRate,25;','','');
REPLACE INTO `item_db` VALUES ('5270','Fallen_Leaves_','Autumn Leaves','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','241','0','bonus bFlee2,5;','','');
REPLACE INTO `item_db` VALUES ('5271','Chinese_Crown_','Phoenix Crown','5','20','10','500','0','0','4','0','1','4294967295','63','2','768','0','0',NULL,'1','221','0','bonus bMdef,3; bonus2 bSubRace,RC_Boss,getrefine();','','');
@@ -2411,11 +2411,11 @@ REPLACE INTO `item_db` VALUES ('5273','Happy_Wig','Happy Wig','5','20','10','100
REPLACE INTO `item_db` VALUES ('5274','Shiny_Wig','Shiny Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','306','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db` VALUES ('5275','Marvelous_Wig','Marvelous Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db` VALUES ('5276','Fantastic_Wig','Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
-REPLACE INTO `item_db` VALUES ('5277','Yellow_Bandana','Yellow Bandana','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db` VALUES ('5277','Yellow_Bandana','Yellow Bandana','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
REPLACE INTO `item_db` VALUES ('5280','Magestic_Goat_C','Baphomet Horns','5','2','1','0','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('5282','euRO_Baseball_Cap','Europe Baseball Cap','5','0','0','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','216','0','','','');
REPLACE INTO `item_db` VALUES ('5283','Chick_Hat','Chick Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2; bonus bMaxHP,50; bonus bMaxSP,50; skill TF_DOUBLE,2; bonus bDoubleRate,10; bonus2 bSubRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db` VALUES ('5284','Water_Lily_Crown','Water Lily Crown','5','20','10','200','0','0','0','0','1','4294967295','63','2','256','0','30',NULL,'0','312','0','bonus bDex,1; bonus bAgi,1; bonus bHPrecovRate,5; bonus bSPrecovRate,3;','','');
@@ -2434,13 +2434,13 @@ REPLACE INTO `item_db` VALUES ('5296','Drooping_Nine_Tail_','Drooping Nine Tail'
REPLACE INTO `item_db` VALUES ('5297','Soulless_Wing_','Soul Wing','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','301','0','bonus bAllStats,1; bonus2 bSPRegenRate,2,10000;','','');
REPLACE INTO `item_db` VALUES ('5298','Marvelous_Wig_','Dokebi\'s Wig','5','20','10','100','0','0','1','0','1','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,-5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db` VALUES ('5299','Ati_Atihan_Hat_','Pagdayaw','5','20','10','100','0','0','1','0','1','4294967295','63','2','769','0','0',NULL,'0','303','0','bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
-REPLACE INTO `item_db` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','2','0','0','4294967294','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
+REPLACE INTO `item_db` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
REPLACE INTO `item_db` VALUES ('5301','Russian_Ribbon','Victory Hairband','5','0','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','323','0','','','');
REPLACE INTO `item_db` VALUES ('5302','Lotus_Flower_Hat','Flower Lily','5','0','0','100','0','0','1','0','0','4294967295','63','2','256','0','30',NULL,'1','324','0','','','');
REPLACE INTO `item_db` VALUES ('5303','Flower_Coronet','Flower Crown','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','325','0','bonus bMdef,3; bonus bMaxHP,50;','','');
REPLACE INTO `item_db` VALUES ('5304','Cap_Of_Blindness','Cap Of Blindness','5','20','10','800','0','0','4','0','1','4294967295','63','2','769','0','50',NULL,'1','326','0','bonus2 bResEff,Eff_Curse,700; bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db` VALUES ('5305','Pirate_Dagger','Pirate Dagger','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','327','0','bonus bBaseAtk,5;','','');
-REPLACE INTO `item_db` VALUES ('5306','Freyja_Crown','Freya\'s Crown','5','0','0','500','0','0','12','0','0','4294967294','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5306','Freyja_Crown','Freya\'s Crown','5','0','0','500','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('5307','Carmen_Miranda\'s_Hat','Carmen Miranda\'s Hat','5','20','10','400','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','329','0','bonus bMdef,3; bonus3 bAutoSpellWhenHit,DC_WINKCHARM,1,50;','','');
REPLACE INTO `item_db` VALUES ('5308','Brazilian_Flag_Hat','Brazil National Flag Hat','5','20','10','300','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','330','0','bonus bSpeedAddRate,25;','','');
REPLACE INTO `item_db` VALUES ('5309','Mahican','Wool Mask','5','20','10','200','0','0','1','0','0','4294967295','63','2','769','0','0',NULL,'1','331','0','skill RG_GRAFFITI,1;','','');
@@ -2453,19 +2453,19 @@ REPLACE INTO `item_db` VALUES ('5315','Observer','Observer','5','20','10','100',
REPLACE INTO `item_db` VALUES ('5316','Umbrella_Hat','Umbrella Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','338','0','bonus2 bSubEle,Ele_Water,3;','','');
REPLACE INTO `item_db` VALUES ('5317','Fisherman_Hat','Fisherman\'s Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','339','0','bonus3 bAutoSpell,WZ_WATERBALL,3,50;','','');
REPLACE INTO `item_db` VALUES ('5318','Poring_Party_Hat','Poring Party Hat','5','20','10','0','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','340','0','bonus bAllStats,3;','','');
-REPLACE INTO `item_db` VALUES ('5319','Hellomother_Hat','Hello Mother Hat','5','20','10','200','0','0','2','0','0','4294967294','63','2','256','0','10',NULL,'1','341','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','4','0','0','4294967294','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
+REPLACE INTO `item_db` VALUES ('5319','Hellomother_Hat','Hello Mother Hat','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','10',NULL,'1','341','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
REPLACE INTO `item_db` VALUES ('5321','Indonesian_Bandana','Bandana Merah Putih','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','342','0','','','');
REPLACE INTO `item_db` VALUES ('5322','Scarf','Kerchief','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','24',NULL,'1','343','0','bonus bMdef,2; bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('5323','Misstrance_Crown','Misstrance Crown','5','20','10','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','165','0','bonus bAllStats,2;','','');
REPLACE INTO `item_db` VALUES ('5324','Little_Angel_Doll','Little Angel Doll','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'1','344','0','bonus bDex,3; bonus4 bAutoSpellWhenHit,CR_GRANDCROSS,3,30,0;','','');
REPLACE INTO `item_db` VALUES ('5325','Robo_Eye','Robo Eye','5','20','10','200','0','0','2','0','0','4294967295','63','2','512','0','10',NULL,'0','345','0','bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('5326','Masquerade_C','Masquerade C','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','4294967294','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
+REPLACE INTO `item_db` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','2147483647','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
REPLACE INTO `item_db` VALUES ('5328','Evil_Wing_Ears_C','Evil Wing Ears C','5','1','0','0','0','0','2','0','0','4294967295','63','2','512','0','0',NULL,'0','152','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5329','Dark_Blindfold_C','Dark Blindfold C','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,500;','','');
-REPLACE INTO `item_db` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','6','0','0','4294967294','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','10','0','0','4294967294','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
+REPLACE INTO `item_db` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','10','0','0','2147483647','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
REPLACE INTO `item_db` VALUES ('5332','Loki_Mask','Loki Mask','5','0','0','200','0','0','0','0','0','4294967295','63','2','513','0','20',NULL,'0','346','0','bonus bFlee2,3;','','');
REPLACE INTO `item_db` VALUES ('5333','Radio_Antenna','Radio Antenna','5','0','0','1500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','347','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; skill MG_LIGHTNINGBOLT,1; bonus4 bAutoSpellWhenHit,MG_THUNDERSTORM,5,30,1;','','');
REPLACE INTO `item_db` VALUES ('5334','Angeling_Wanna_Fly','Flapping Angeling','5','0','0','700','0','0','0','0','0','4294967295','63','2','256','0','38',NULL,'0','348','0','bonus bLuk,2; bonus bMdef,2;','','');
@@ -2481,12 +2481,12 @@ REPLACE INTO `item_db` VALUES ('5343','Tayelin_Doll_Hat','Telling Doll Hat','5',
REPLACE INTO `item_db` VALUES ('5344','Binit_Doll_Hat','Bennit Doll Hat','5','0','0','500','0','0','0','0','1','4294967295','63','2','256','0','60',NULL,'0','358','0','bonus2 bSubRace,RC_DemiHuman,5; bonus bVit,2; autobonus \"{ bonus bAspdRate,5; }\",20,30000,0,\"{ specialeffect2 EF_HASTEUP; }\";','','');
REPLACE INTO `item_db` VALUES ('5345','Debril_Doll_Hat','W Doll Hat','5','0','0','500','0','0','0','0','1','4294967295','63','2','256','0','60',NULL,'0','359','0','bonus2 bSubRace,RC_DemiHuman,5; bonus bLuk,2; bonus2 bAddRace,RC_Undead,5; bonus2 bMagicAddRace,RC_Undead,5; bonus2 bSubRace,RC_Undead,5;','','');
REPLACE INTO `item_db` VALUES ('5346','Gf_Recruiter_Hat','Gf Recruiter Hat','5','0','0','0','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'1','360','0','','','');
-REPLACE INTO `item_db` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','98','0','','','');
-REPLACE INTO `item_db` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','2','0','1','4294967294','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','2','0','1','4294967294','63','2','256','0','0',NULL,'1','102','0','','','');
-REPLACE INTO `item_db` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','2','0','1','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','2','0','1','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5351','Sunflower_','Sunflower','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','2','0','0','4294967294','63','2','256','0','38',NULL,'1','361','0','','','');
+REPLACE INTO `item_db` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','2','0','0','2147483647','63','2','256','0','38',NULL,'1','361','0','','','');
REPLACE INTO `item_db` VALUES ('5353','Helm_Of_Sun_','Hat of the Sun God','5','20','10','2400','0','0','4','0','1','13623168','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db` VALUES ('5354','Muslim_Hat_M','Muslim Hat M','5','0','0','100','0','0','2','0','0','4294967295','63','1','256','0','0',NULL,'0','362','0','bonus bCastrate,-5;','','');
REPLACE INTO `item_db` VALUES ('5355','Muslim_Hat_F','Selendang','5','0','0','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','363','0','bonus bCastrate,-5;','','');
@@ -2517,7 +2517,7 @@ REPLACE INTO `item_db` VALUES ('5379','Balloon_Hat','Tam','5','0','0','800','0',
REPLACE INTO `item_db` VALUES ('5380','Fish_Head_Hat','Fish Head Hat','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','386','0','bonus3 bAutoSpell,SA_FROSTWEAPON,1,5;','','');
REPLACE INTO `item_db` VALUES ('5381','Santa_Poring_Hat','Santa Poring Hat','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'0','387','0','bonus bMdef,2; bonus2 bAddEle,Ele_Dark,3; bonus2 bSubEle,Ele_Dark,3;','','');
REPLACE INTO `item_db` VALUES ('5382','Bell_Ribbon','Bell Ribbon','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','388','0','bonus bVit,1; skill AL_ANGELUS,1;','','sc_end SC_ANGELUS;');
-REPLACE INTO `item_db` VALUES ('5383','Hunting_Cap','Hunter\'s Cap','5','20','10','250','0','0','3','0','1','4294967294','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5383','Hunting_Cap','Hunter\'s Cap','5','20','10','250','0','0','3','0','1','2147483647','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('5384','Santa_Hat_1','Twin Pompom By JB','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','390','0','bonus bLuk,3; skill WZ_ESTIMATION,1; bonus3 bAutoSpell,AL_INCAGI,1,500;','','');
REPLACE INTO `item_db` VALUES ('5385','Yoyo_Hat','Yoyo Hat','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','20',NULL,'1','391','0','skill TF_HIDING, 1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db` VALUES ('5386','Ayam_','Ayam','5','0','0','70','0','0','7','0','0','4294967295','63','2','256','0','1',NULL,'0','228','0','bonus bMdef,7; bonus bFlee,7; bonus2 bAddMonsterDropItem,12198,200;','','');
@@ -2550,12 +2550,12 @@ REPLACE INTO `item_db` VALUES ('5412','Sweet_Candy','Sweet Candy','5','20','10',
REPLACE INTO `item_db` VALUES ('5413','Popcorn_Hat','Pop Corn Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','415','0','bonus2 bSubEle,Ele_Wind, 10;','','');
REPLACE INTO `item_db` VALUES ('5414','Campfire_Hat','Camp Fire Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','416','0','bonus2 bSubEle,Ele_Fire, 10; bonus4 bAutoSpellWhenHit, MG_FIREBALL, 5, 100, 1;','','');
REPLACE INTO `item_db` VALUES ('5415','Poring_Cake_Cap','Poring Cake Hat','5','20','10','1000','0','0','5','0','0','4294967295','63','2','256','0','40',NULL,'1','417','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; bonus bFlee2,5; bonus bAspdRate,5; bonus bCastrate,-5; bonus bDelayrate,-5;','','');
-REPLACE INTO `item_db` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','2','0','0','4294967294','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
+REPLACE INTO `item_db` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','2','0','0','2147483647','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
REPLACE INTO `item_db` VALUES ('5417','Crown_Parrot','Crown Parrots','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'0','419','0','bonus bInt,1; bonus2 bResEff,Eff_Silence,10000; bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
REPLACE INTO `item_db` VALUES ('5418','Soldier_Hat','Legionnaire Hat','5','20','10','400','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','420','0','bonus bStr,1; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bUseSPrate,10;','','');
REPLACE INTO `item_db` VALUES ('5419','Evolved_Leaf','Leaves Of Grass','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','57','0','bonus bVit,1; bonus2 bSubRace,RC_Plant,5;','','');
-REPLACE INTO `item_db` VALUES ('5420','Mask_Of_Ifrit','Mask Of Ifrit','5','0','0','0','0','0','8','0','0','4294967294','63','2','769','0','70',NULL,'0','421','0','bonus bStr,1; bonus bInt,1; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
-REPLACE INTO `item_db` VALUES ('5421','Ifrit\'s_Ear','Ears Of Ifrit','5','20','10','0','0','0','0','0','0','4294967294','63','2','512','0','70',NULL,'0','422','0','bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
+REPLACE INTO `item_db` VALUES ('5420','Mask_Of_Ifrit','Mask Of Ifrit','5','0','0','0','0','0','8','0','0','2147483647','63','2','769','0','70',NULL,'0','421','0','bonus bStr,1; bonus bInt,1; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
+REPLACE INTO `item_db` VALUES ('5421','Ifrit\'s_Ear','Ears Of Ifrit','5','20','10','0','0','0','0','0','0','2147483647','63','2','512','0','70',NULL,'0','422','0','bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db` VALUES ('5422','Linguistic_Book_Cap','Linguistic Book Hat','5','20','10','70','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','423','0','bonus bInt,1; bonus bMdef,2;','','');
REPLACE INTO `item_db` VALUES ('5423','Lovecap_China','I Love China','5','20','10','250','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','424','0','bonus bDex,3; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5424','Fanta_Orange_Can','Fanta Orange Can Hat','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','425','0','','','');
@@ -2571,10 +2571,10 @@ REPLACE INTO `item_db` VALUES ('5433','Golden_Wreath','Golden Laurel','5','20','
REPLACE INTO `item_db` VALUES ('5435','Coke_Hat','Red Minstrel Hat','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','40',NULL,'1','436','0','bonus bInt,1; bonus bMaxSP,80; bonus bMdef,3; if(getrefine()>5) { bonus bMdef,getrefine()-5; bonus bMaxSP,(getrefine()-5)*10; }','','');
REPLACE INTO `item_db` VALUES ('5436','Bride\'s_Corolla','Bride\'s Corolla','5','20','10','200','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','437','0','bonus bLuk,3; bonus bMdef,2;','','');
REPLACE INTO `item_db` VALUES ('5437','Flower_Of_Fairy','Fairy Flower','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','438','0','bonus bInt,1; bonus bMdef,1; bonus2 bSubRace,RC_Insect,5;','','');
-REPLACE INTO `item_db` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('5442','Necktie','Necktie','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','70',NULL,'1','443','0','bonus bVit,1; bonus bHit,-5; bonus bUseSPrate,5;','','');
REPLACE INTO `item_db` VALUES ('5443','Status_Of_Baby_Angel','Statue Of Baby Angel','5','20','10','600','0','0','3','0','1','4294967295','63','2','256','0','70',NULL,'1','444','0','bonus bMdef,2; bonus4 bAutoSpellWhenHit,PR_STRECOVERY,1,20,0;','','');
REPLACE INTO `item_db` VALUES ('5444','Hair_Brush','Hair Brush','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','445','0','bonus bCritical,6;','','');
@@ -2583,7 +2583,7 @@ REPLACE INTO `item_db` VALUES ('5446','Cat_Foot_Hairpin','Catfoot Hairpin','5','
REPLACE INTO `item_db` VALUES ('5447','Frog_Cap','Frog Hat','5','20','10','500','0','0','3','0','0','4294967295','63','2','256','0','70',NULL,'1','448','0','bonus bMdef,1; bonus2 bAddRace,RC_Insect,12; bonus2 bMagicAddRace,RC_Insect,12;','','');
REPLACE INTO `item_db` VALUES ('5448','Solo_Play_Box1','Soloplay Box1','5','0','0','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','449','0','','','');
REPLACE INTO `item_db` VALUES ('5449','Solo_Play_Box2','Soloplay Box2','5','0','0','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','450','0','','','');
-REPLACE INTO `item_db` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','4294967294','63','2','256','0','20',NULL,'1','451','0','','','');
+REPLACE INTO `item_db` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','2147483647','63','2','256','0','20',NULL,'1','451','0','','','');
REPLACE INTO `item_db` VALUES ('5451','Dragonhelm_Gold','RWC 2008 Dragon Helm Gold','5','20','10','2500','0','0','7','0','1','4294967295','63','2','256','0','1',NULL,'0','452','0','bonus bAspdRate,10; bonus bAllStats,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('5452','Dragonhelm_Silver','RWC 2008 Dragon Helm Silver','5','20','10','2500','0','0','5','0','1','4294967295','63','2','256','0','1',NULL,'0','453','0','bonus bAspdRate,7; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db` VALUES ('5453','Dragonhelm_Copper','RWC 2008 Dragon Helm Copper','5','20','10','2500','0','0','0','0','1','4294967295','63','2','256','0','1',NULL,'0','454','0','bonus bAspdRate,5; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,1;','','');
@@ -2614,13 +2614,13 @@ REPLACE INTO `item_db` VALUES ('5488','J_Twin_Santahat','Twin Santa Hat','5','20
REPLACE INTO `item_db` VALUES ('5489','Love_Daddy','Love Daddy Hat','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','484','0','bonus bDex,2;','','');
REPLACE INTO `item_db` VALUES ('5490','Anubis_Helm','Anubis Helm','5','20','10','0','0','0','3','0','0','4294967295','63','2','256','0','70',NULL,'0','485','0','bonus bMdef,5; bonus2 bSubRace,RC_Boss,10; bonus bHealPower2,10; bonus bAddItemHealRate,10;','','');
REPLACE INTO `item_db` VALUES ('5491','Hat_Of_Outlaw','Bandit Hat','5','20','10','800','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','486','0','bonus bStr,2; bonus2 bSubEle,Ele_Fire, 10;','','');
-REPLACE INTO `item_db` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5494','Spinx_Helm_I','Sphinx Hat','5','0','0','0','0','0','5','0','0','16514','63','2','257','0','0',NULL,'0','137','0','bonus bStr,5;','','');
REPLACE INTO `item_db` VALUES ('5495','Power_Of_Thor','Power Of Thor','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','75',NULL,'1','493','0','bonus bInt,1; bonus bDex,1; bonus bMdef,3; bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('5496','Dice_Hat','Dice Hat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'0','494','0','bonus bLuk,4;','','');
-REPLACE INTO `item_db` VALUES ('5497','King_Tiger_Doll_Hat','King Tiger Doll Hat','5','20','10','400','0','0','3','0','1','4294967294','63','2','256','0','30',NULL,'1','495','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('5498','Wondering_Wolf_Helm','Wandering Wolf Helm','5','20','10','600','0','0','5','0','0','4294967294','63','2','768','0','50',NULL,'0','490','0','bonus bVit,5; bonus bFlee,10;','','');
+REPLACE INTO `item_db` VALUES ('5497','King_Tiger_Doll_Hat','King Tiger Doll Hat','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','30',NULL,'1','495','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('5498','Wondering_Wolf_Helm','Wandering Wolf Helm','5','20','10','600','0','0','5','0','0','2147483647','63','2','768','0','50',NULL,'0','490','0','bonus bVit,5; bonus bFlee,10;','','');
REPLACE INTO `item_db` VALUES ('5499','Pizza_Hat','Pizza Hat','5','20','10','600','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','487','0','skill SM_PROVOKE, 1;','','');
REPLACE INTO `item_db` VALUES ('5500','Icecream_Hat','Icecream Hat','5','0','0','300','0','0','6','0','0','4294967295','63','2','256','0','30',NULL,'1','488','0','bonus bMdef,3; skill MG_FROSTDIVER, 3;','','');
REPLACE INTO `item_db` VALUES ('5501','Pirate\'s_Pride','Pirate\'s Pride','5','0','0','100','0','0','6','0','0','4294967295','63','2','256','0','10',NULL,'0','496','0','bonus2 bAddRace2, 6, 5; bonus2 bSubRace2, 6, 5;','','');
@@ -2650,7 +2650,7 @@ REPLACE INTO `item_db` VALUES ('5524','Sakura_Milk_Tea_Hat','Sakura Milk Tea Hat
REPLACE INTO `item_db` VALUES ('5525','First_Leaf_Tea_Hat','Flower Hat','5','20','10','100','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','519','0','bonus bMaxHP,80; bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('5526','Lady_Tanee_Doll','Tanigumi Girl Doll','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','60',NULL,'0','520','0','bonus bAgi,2; bonus bFlee,3; bonus2 bSubEle,Ele_Wind, 5; bonus2 bAddMonsterDropItem, 513, 200;','','');
REPLACE INTO `item_db` VALUES ('5527','Lunatic_Hat','Lunatic Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','1',NULL,'1','521','0','bonus bLuk,5; bonus bMdef,2; bonus bFlee2,5; bonus2 bAddMonsterDropItem,622,50;','','');
-REPLACE INTO `item_db` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','4294967294','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','2147483647','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5529','Evil\'s_Bone_Hat','Satanic Bone Helm','5','20','10','600','0','0','6','0','1','4294967295','63','2','768','0','70',NULL,'1','523','0','bonus bDex,3; bonus2 bSubEle,Ele_Neutral,5; skill WZ_FROSTNOVA,1;','','');
REPLACE INTO `item_db` VALUES ('5530','Raven_Cap','Raven Cap','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','524','0','','','');
REPLACE INTO `item_db` VALUES ('5532','Pirate_Dagger_J','Pirate Dagger','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'1','327','0','bonus bShortWeaponDamageReturn,1;','','');
@@ -2676,7 +2676,7 @@ REPLACE INTO `item_db` VALUES ('5553','Fest_Bunny_Band','Festival Bunny Band','5
REPLACE INTO `item_db` VALUES ('5554','Octopus_Hat','Octopus Hat','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','20',NULL,'1','538','0','bonus3 bAutoSpell,SM_PROVOKE,5,10; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5555','Leaf_Cat_Hat','Leaf Cat Hat','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','539','0','bonus bAgi,1; bonus3 bAutoSpellWhenHit,AL_HEAL,3,10;','','');
REPLACE INTO `item_db` VALUES ('5556','Fur_Seal_Hat','Seal Hat','5','20','10','500','0','0','3','0','0','4294967295','63','2','769','0','55',NULL,'1','540','0','bonus bInt,1; bonus3 bAutoSpell,WZ_FROSTNOVA,1,30;','','');
-REPLACE INTO `item_db` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','4294967294','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
+REPLACE INTO `item_db` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','2147483647','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
REPLACE INTO `item_db` VALUES ('5558','Saci_Hat','Luxury Hat','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','542','0','bonus3 bAddMonsterDropItem,510,RC_Plant,500;','','');
REPLACE INTO `item_db` VALUES ('5559','Piece_Of_White_Cloth_E','Piece Of White Cloth','5','0','0','0','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','543','0','','','');
REPLACE INTO `item_db` VALUES ('5560','Bullock_Helm_J','Bullock Helm','5','20','10','3000','0','0','3','0','0','4294967295','63','2','256','0','75',NULL,'1','322','0','bonus bMaxHP,100; bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
@@ -2760,10 +2760,10 @@ REPLACE INTO `item_db` VALUES ('5803','Flower_Love_Hat','Love Flower Hat','5','2
REPLACE INTO `item_db` VALUES ('5804','Pirate_Eyepatch','Pirate Eye Bandage','5','1000','500','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','13','0','','','');
REPLACE INTO `item_db` VALUES ('5805','Victorious_Coronet','Victorious Coronet','5','0','0','150','0','0','1','0','0','4294967295','63','2','256','0','70',NULL,'0','43','0','bonus bMaxHPrate,15; bonus bSPrecovRate,5;','','');
REPLACE INTO `item_db` VALUES ('5806','Poem_Natalia_Hat','Poet Natalie\'s Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','','','');
-REPLACE INTO `item_db` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','50',NULL,'1','104','0','','','');
+REPLACE INTO `item_db` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','50',NULL,'1','104','0','','','');
REPLACE INTO `item_db` VALUES ('5808','Diabolus_Helmet','Dark Bacilium','5','20','10','250','0','0','5','0','1','1040256','2','2','769','0','0',NULL,'1','364','0','bonus2 bResEff,Eff_Stone,2000+(getrefine()*200); bonus2 bResEff,Eff_Freeze,2000+(getrefine()*200); bonus2 bResEff,Eff_Stun,2000+(getrefine()*200);','','');
REPLACE INTO `item_db` VALUES ('5809','Boom_Boom_Hat','Boom Boom Hat','5','0','0','100','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'0','216','0','bonus bAllStats,5;','','');
-REPLACE INTO `item_db` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
+REPLACE INTO `item_db` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
REPLACE INTO `item_db` VALUES ('5811','Santa_Beard','Santa\'s Beard','5','20','10','100','0','0','5','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db` VALUES ('5812','Hat_Of_Expert','Hat Of Expert','5','0','0','0','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('5815','Cowboy_Hat_J','Purple Cowboy Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','475','0','bonus bStr,1; bonus2 bSubSize, 0, 5; bonus2 bSubSize, 1, 5; bonus2 bSubSize, 2, 5;','','');
@@ -4326,11 +4326,11 @@ REPLACE INTO `item_db` VALUES ('12031','Sleepy_Box','Box of Drowsiness','2','100
REPLACE INTO `item_db` VALUES ('12032','Box_Of_Storm','Box of Storms','11','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill ITEM_ENCHANTARMS,2;','','');
REPLACE INTO `item_db` VALUES ('12033','Box_Of_Sunlight','Box of Sunlight','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CLAIRVOYANCE,30000,0;','','');
REPLACE INTO `item_db` VALUES ('12034','Painting_Box','Box of Panting','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 0,9; if(rand(1000)<300) sc_start SC_SILENCE,30000,0;','','');
-REPLACE INTO `item_db` VALUES ('12035','Lotto_Box01','Lotto Box 01','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7361,7370),1;','','');
-REPLACE INTO `item_db` VALUES ('12036','Lotto_Box02','Lotto Box 02','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7371,7380),1;','','');
-REPLACE INTO `item_db` VALUES ('12037','Lotto_Box03','Lotto Box 03','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7381,7390),1;','','');
+REPLACE INTO `item_db` VALUES ('12035','Lotto_Box01','Lotto Box 01','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12035,1;','','');
+REPLACE INTO `item_db` VALUES ('12036','Lotto_Box02','Lotto Box 02','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12036,1;','','');
+REPLACE INTO `item_db` VALUES ('12037','Lotto_Box03','Lotto Box 03','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12037,1;','','');
REPLACE INTO `item_db` VALUES ('12038','Lotto_Box04','Lotto Box 04','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12038,1;','','');
-REPLACE INTO `item_db` VALUES ('12039','Lotto_Box05','Lotto Box 05','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7542,7546),1;','','');
+REPLACE INTO `item_db` VALUES ('12039','Lotto_Box05','Lotto Box 05','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12039,1;','','');
REPLACE INTO `item_db` VALUES ('12040','Stone_Of_Intelligence_','Stone of Sage','2','100000','50000','300','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','homevolution;','','');
REPLACE INTO `item_db` VALUES ('12041','Str_Dish01','Fried Grasshopper Legs','0','2000','1000','60','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_STR,1200000,1; percentheal 5,0;','','');
REPLACE INTO `item_db` VALUES ('12042','Str_Dish02','Seasoned Sticky Webfoot','0','4000','2000','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_STR,1200000,2; percentheal 5,0;','','');
@@ -4601,7 +4601,7 @@ REPLACE INTO `item_db` VALUES ('12309','Bulging_Head','JJangu Magic Powder','11'
REPLACE INTO `item_db` VALUES ('12310','Spray_Of_Flowers','Spray Of Flowers','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_INCFLEE,600000,10;','','');
REPLACE INTO `item_db` VALUES ('12311','Large_Spray_Of_Flowers','Huge Spray Of Flowers','11','0','0','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill ALL_PARTYFLEE,1;','','');
REPLACE INTO `item_db` VALUES ('12312','Thick_Manual50','Thick Battle Manual','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CASH_PLUSEXP,3600000,50;','','');
-REPLACE INTO `item_db` VALUES ('12313','Protection_Of_Angel','Guardian Angel','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('12313','Protection_Of_Angel','Guardian Angel','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill ALL_ANGEL_PROTECT,1;','','');
REPLACE INTO `item_db` VALUES ('12314','Noive_Box','Noive Box','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('12315','Goddess_Bless','Goddess Of Blessing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('12316','Angel_Bless','Angel Of Blessing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
@@ -4640,7 +4640,7 @@ REPLACE INTO `item_db` VALUES ('12348','Manuk\'s_Faith','Manuk\'s Faith','2','0'
REPLACE INTO `item_db` VALUES ('12349','Cornus\'_Tears','Cornus\' Tears','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','specialeffect2 EF_POTION_BERSERK; sc_start SC_SPL_MATK,600000,10;','','');
REPLACE INTO `item_db` VALUES ('12350','Angeling_Potion','Angeling Potion','11','20','10','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','skilleffect AL_BLESSING,0; sc_start SC_BLESSING,120000,5; itemskill AL_ANGELUS,5;','','');
REPLACE INTO `item_db` VALUES ('12351','Shout_Megaphone','Scream Megaphone','11','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill MC_LOUD,1;','','');
-REPLACE INTO `item_db` VALUES ('12352','Dun_Tele_Scroll3','Dungeon Teleport Scroll 3','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('12352','Dun_Tele_Scroll3','Dungeon Teleport Scroll 3','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\",3;','','');
REPLACE INTO `item_db` VALUES ('12353','Tiny_Waterbottle','Small Bottle','2','800','400','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_PROPERTYWATER,90000,1;','','');
REPLACE INTO `item_db` VALUES ('12354','Buche_De_Noel','Buche De Noel','2','2','1','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','specialeffect2 EF_ANGELUS; sc_start SC_INCMHPRATE,600000,3; sc_start SC_INCMSPRATE,600000,3; sc_start SC_INCHITRATE,600000,3; sc_start SC_CRITICALPERCENT,600000,7;','','');
REPLACE INTO `item_db` VALUES ('12355','Xmas_Gift','Xmas Gift','2','2','1','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12355,1;','','');
@@ -5044,9 +5044,9 @@ REPLACE INTO `item_db` VALUES ('12996','Blue_Herb_Box','Blue Herb Box','18','20'
REPLACE INTO `item_db` VALUES ('12997','Elunium_Box','Elunium Box','18','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem 985,5;','','');
REPLACE INTO `item_db` VALUES ('12998','Oridecon_Box','Oridecon Box','18','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem 984,5;','','');
REPLACE INTO `item_db` VALUES ('12999','Branch_Of_Dead_Tree_Box','Dead Branch Box','18','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem 604,3;','','');
-REPLACE INTO `item_db` VALUES ('13000','Jujube_Dagger','Jujube Dagger','4','10000','5000','600','39','0','0','1','0','4271865583','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Wind;','','');
-REPLACE INTO `item_db` VALUES ('13001','Dragon_Killer','Dragon Killer','4','20','10','900','110','0','0','1','0','4271865583','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
-REPLACE INTO `item_db` VALUES ('13002','Ginnungagap','Ginnungagap','4','20','10','700','148','0','0','1','0','4271865583','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
+REPLACE INTO `item_db` VALUES ('13000','Jujube_Dagger','Jujube Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Wind;','','');
+REPLACE INTO `item_db` VALUES ('13001','Dragon_Killer','Dragon Killer','4','20','10','900','110','0','0','1','0','2147483647','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
+REPLACE INTO `item_db` VALUES ('13002','Ginnungagap','Ginnungagap','4','20','10','700','148','0','0','1','0','2147483647','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
REPLACE INTO `item_db` VALUES ('13003','Coward','Cowardice Blade','4','52000','26000','700','80','0','0','1','1','33689664','63','2','2','3','55',NULL,'1','1','0','bonus bDef,5;','','');
REPLACE INTO `item_db` VALUES ('13004','Coward_','Cowardice Blade','4','52000','26000','700','80','0','0','1','2','33689664','63','2','2','3','55',NULL,'1','1','0','bonus bDef,5;','','');
REPLACE INTO `item_db` VALUES ('13005','Angelwing_Short_Sword','Angelic Wing Dagger','4','20','10','600','120','0','0','1','2','1','63','2','2','4','50',NULL,'1','1','0','','','');
@@ -5063,7 +5063,7 @@ REPLACE INTO `item_db` VALUES ('13015','Hakujin_','Hakujin','4','20','10','800',
REPLACE INTO `item_db` VALUES ('13016','Poison_Knife_','Poison Knife','4','20','10','800','64','0','0','1','2','42950382','63','2','2','3','65',NULL,'1','1','0','bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,3000;','','');
REPLACE INTO `item_db` VALUES ('13017','House_Auger_','Ice Pick','4','20','10','600','70','0','0','1','1','42950382','63','2','2','4','36',NULL,'1','1','0','bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss;','','');
REPLACE INTO `item_db` VALUES ('13018','Sucsamad_','Sucsamad','4','20','10','800','140','0','0','1','1','42950382','63','2','2','4','36',NULL,'1','1','0','bonus2 bAddEle,Ele_Earth,10; bonus2 bAddEle,Ele_Wind,10; bonus bUnbreakableWeapon,0;','','');
-REPLACE INTO `item_db` VALUES ('13019','Ginnungagap_','Ginnungagap','4','20','10','700','148','0','0','1','1','4271865583','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
+REPLACE INTO `item_db` VALUES ('13019','Ginnungagap_','Ginnungagap','4','20','10','700','148','0','0','1','1','2147483647','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
REPLACE INTO `item_db` VALUES ('13020','Warrior_Balmung_','Warrior\'s Balmung','4','20','10','1000','170','0','0','1','0','4294967295','63','2','2','4','48',NULL,'1','1','0','bonus bAllStats,5;','','');
REPLACE INTO `item_db` VALUES ('13021','Combat_Knife_C','Combat Knife','4','1','0','0','129','0','0','1','0','42950382','63','2','2','4','1',NULL,'0','1','0','bonus bIgnoreDefRace,RC_DemiHuman; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Demon,-10; bonus bMaxSPrate,10; bonus bSPDrainValue,3;','','');
REPLACE INTO `item_db` VALUES ('13022','Counter_Dagger_C','Dagger of Counter','4','1','0','0','209','0','0','1','0','8454660','63','2','2','4','1',NULL,'0','1','0','bonus bCritical,90;','','');
@@ -5074,19 +5074,19 @@ REPLACE INTO `item_db` VALUES ('13026','Moonlight_Sword_C','Moonlight Dagger','4
REPLACE INTO `item_db` VALUES ('13027','Scalpel','Scalpel','4','20','10','500','120','0','0','1','3','42950382','2','2','2','4','55',NULL,'1','1','0','bonus2 bAddEff,Eff_Bleeding,500;','','');
REPLACE INTO `item_db` VALUES ('13028','Tooth_Blade','Tooth Blade','4','20','10','700','130','0','0','1','1','42950382','2','2','2','4','55',NULL,'1','1','0','if(getrefine()>=9) { bonus3 bAutoSpell,NPC_SLOWCAST,2,70; } else bonus3 bAutoSpell,NPC_SLOWCAST,1,50;','','');
REPLACE INTO `item_db` VALUES ('13029','Prinsence_Knife','Prinsense Knife','4','20','10','0','120','0','0','1','0','42950382','63','2','2','1','0',NULL,'0','1','0','bonus2 bAddRace,RC_Boss,50; bonus2 bAddRace,RC_NonBoss,50;','','');
-REPLACE INTO `item_db` VALUES ('13030','Dragon_Killer_','Dragon Killer','4','20','10','900','110','0','0','1','2','4271865583','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
+REPLACE INTO `item_db` VALUES ('13030','Dragon_Killer_','Dragon Killer','4','20','10','900','110','0','0','1','2','2147483647','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
REPLACE INTO `item_db` VALUES ('13031','Sword_Breaker_','Swordbreaker','4','20','10','1000','70','0','0','1','3','42950382','63','2','2','4','36',NULL,'1','1','0','bonus bBreakWeaponRate,500;','','');
REPLACE INTO `item_db` VALUES ('13032','Mail_Breaker_','Mailbreaker','4','20','10','1000','70','0','0','1','3','42950382','63','2','2','4','36',NULL,'1','1','0','bonus bBreakArmorRate,500;','','');
REPLACE INTO `item_db` VALUES ('13033','Assasin_Dagger_','Assassin Dagger','4','20','10','600','140','0','0','1','1','4096','63','2','2','4','36',NULL,'1','1','0','bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdRate,2; bonus bAtkEle,Ele_Dark;','','');
REPLACE INTO `item_db` VALUES ('13034','Twilight_Desert','Desert Twilight','4','20','10','600','130','0','0','1','2','4096','2','2','2','2','70',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('13035','Sandstorm','Sandstorm','4','20','10','600','50','0','0','1','4','4096','2','2','2','2','70',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('13036','BF_Dagger1','Brave Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','4271865583','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
-REPLACE INTO `item_db` VALUES ('13037','BF_Dagger2','Valorous Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','4271865583','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; autobonus \"{ bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss; }\",10,6000,BF_WEAPON,\"{ specialeffect2 EF_HASTEUP; }\"; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
+REPLACE INTO `item_db` VALUES ('13036','BF_Dagger1','Brave Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','2147483647','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
+REPLACE INTO `item_db` VALUES ('13037','BF_Dagger2','Valorous Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','2147483647','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; autobonus \"{ bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss; }\",10,6000,BF_WEAPON,\"{ specialeffect2 EF_HASTEUP; }\"; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
REPLACE INTO `item_db` VALUES ('13038','Dagger_Of_Hunter','Dagger of Hunter','4','20','10','700','120','0','0','1','3','131072','2','2','2','3','70',NULL,'1','1','0','bonus bStr,1; bonus bAgi,2; bonus bDex,1; bonus4 bAutoSpellOnSkill,RG_BACKSTAP,SM_BASH,10,100; bonus2 bSkillAtk,RG_BACKSTAP,20;','','');
REPLACE INTO `item_db` VALUES ('13039','Ivory_Knife','Ivory Knife','4','20','10','700','130','0','0','1','2','42950382','2','2','2','3','50',NULL,'1','1','0','bonus bAgi,2; bonus bAspdRate,3; bonus2 bAddEff,Eff_Bleeding,300; bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30;','','');
-REPLACE INTO `item_db` VALUES ('13040','N_Cutter','Novice Cutter','4','0','0','0','50','0','0','1','3','4271865583','63','2','2','1','1',NULL,'0','1','0','','','');
-REPLACE INTO `item_db` VALUES ('13041','N_Main_Gauche','Novice Main Gauche','4','0','0','0','63','0','0','1','3','4271865583','63','2','2','1','1',NULL,'0','1','0','','','');
-REPLACE INTO `item_db` VALUES ('13042','Krieger_Dagger1','Glorious Gladius','4','20','10','0','120','0','0','1','0','4271865583','63','2','2','4','80',NULL,'1','1','0','bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus3 bAutoSpell,PR_LEXDIVINA,1,20; bonus bUnbreakableWeapon,0; if(getrefine()>5) { bonus2 bAddRace,RC_DemiHuman,(getrefine()-4)*(getrefine()-4); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) bonus4 bAutoSpellOnSkill,RG_RAID,NPC_WIDEBLEEDING,1,250;','','');
+REPLACE INTO `item_db` VALUES ('13040','N_Cutter','Novice Cutter','4','0','0','0','50','0','0','1','3','2147483647','63','2','2','1','1',NULL,'0','1','0','','','');
+REPLACE INTO `item_db` VALUES ('13041','N_Main_Gauche','Novice Main Gauche','4','0','0','0','63','0','0','1','3','2147483647','63','2','2','1','1',NULL,'0','1','0','','','');
+REPLACE INTO `item_db` VALUES ('13042','Krieger_Dagger1','Glorious Gladius','4','20','10','0','120','0','0','1','0','2147483647','63','2','2','4','80',NULL,'1','1','0','bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus3 bAutoSpell,PR_LEXDIVINA,1,20; bonus bUnbreakableWeapon,0; if(getrefine()>5) { bonus2 bAddRace,RC_DemiHuman,(getrefine()-4)*(getrefine()-4); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) bonus4 bAutoSpellOnSkill,RG_RAID,NPC_WIDEBLEEDING,1,250;','','');
REPLACE INTO `item_db` VALUES ('13043','Fortune_Sword_I','Fortune Sword','4','0','0','0','120','0','0','1','0','42950382','63','2','2','4','0',NULL,'0','1','0','bonus bLuk,5;','','');
REPLACE INTO `item_db` VALUES ('13044','House_Auger_I','Ice Pick','4','0','0','0','105','0','0','1','0','42950382','63','2','2','4','0',NULL,'0','1','0','','','');
REPLACE INTO `item_db` VALUES ('13045','Kamaitachi_I','Kamaitachi','4','0','0','0','155','0','0','2','0','33554432','63','2','2','4','0',NULL,'0','1','0','','','');
@@ -6020,7 +6020,7 @@ REPLACE INTO `item_db` VALUES ('14469','Ox_Tail_Scroll','Ox Tail Egg','2','20','
REPLACE INTO `item_db` VALUES ('14500','Insurance60','Life Insurrance Certificate','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CASH_DEATHPENALTY,3600000,0;','','');
REPLACE INTO `item_db` VALUES ('14508','Zeny_Scroll','Zeny Pet Egg Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('14509','Light_Center_Pot','Light Concentration Potion','2','800','400','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,0;','','');
-REPLACE INTO `item_db` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','4294442735','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
+REPLACE INTO `item_db` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','2147483647','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('14511','Light_Berserk_Pot','Light Berserk Potion','2','3000','1500','20','0','0','0','0','0','31868582','63','2','0','0','85',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_METEOR,10;','','');
REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_STORMGUST,10;','','');
@@ -6037,7 +6037,7 @@ REPLACE INTO `item_db` VALUES ('14523','Pill_','Pill','0','0','0','10','0','0','
REPLACE INTO `item_db` VALUES ('14524','Superb_Fish_Slice','Superb Fish Slice','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 100,100;','','');
REPLACE INTO `item_db` VALUES ('14525','Chewy_Ricecake','Chewy Ricecake','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_PLUSATTACKPOWER,180000,10;','','');
REPLACE INTO `item_db` VALUES ('14526','Oriental_Pastry','Oriental Pastry','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_PLUSMAGICPOWER,180000,10;','','');
-REPLACE INTO `item_db` VALUES ('14527','Dun_Tele_Scroll1','Dungeon Teleport Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\";','','');
+REPLACE INTO `item_db` VALUES ('14527','Dun_Tele_Scroll1','Dungeon Teleport Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\",1;','','');
REPLACE INTO `item_db` VALUES ('14528','PVP_Tele_Scroll','PVP Teleport Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('14529','Greed_Scroll','Greed Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill BS_GREED,1;','','');
REPLACE INTO `item_db` VALUES ('14530','Flee_30_Scroll','Evasion Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_INCFLEE,1800000,30;','','');
@@ -6091,7 +6091,7 @@ REPLACE INTO `item_db` VALUES ('14577','Vit_Dish05_','Spicy Fried Bao','0','2','
REPLACE INTO `item_db` VALUES ('14578','Agi_Dish05_','Steamed Bat Wing in Pumpkin','0','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_AGI,1200000,5; percentheal 6,2;','','');
REPLACE INTO `item_db` VALUES ('14579','Dex_Dish05_','Green Salad','0','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_DEX,1200000,5; percentheal 5,5;','','');
REPLACE INTO `item_db` VALUES ('14580','Luk_Dish05_','Fried Scorpion Tails','0','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_LUK,1200000,5; percentheal 5,2;','','');
-REPLACE INTO `item_db` VALUES ('14581','Dun_Tele_Scroll2','Dungeon Teleport Scroll II','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\";','','');
+REPLACE INTO `item_db` VALUES ('14581','Dun_Tele_Scroll2','Dungeon Teleport Scroll II','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\",2;','','');
REPLACE INTO `item_db` VALUES ('14582','WOB_Rune','Yellow Butterfly Wing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashCity\",1;','','');
REPLACE INTO `item_db` VALUES ('14583','WOB_Schwaltz','Green Butterfly Wing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashCity\",2;','','');
REPLACE INTO `item_db` VALUES ('14584','WOB_Rachel','Red Butterfly Wing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashCity\",3;','','');
@@ -6121,7 +6121,7 @@ REPLACE INTO `item_db` VALUES ('14607','Luxurious_Dinner_W','Luxurious Western F
REPLACE INTO `item_db` VALUES ('14608','Luxurious_Dinner_E','Manchu-Han Imperial Feast','2','20000','10000','1200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_INCALLSTATUS,3600000,6;','','');
REPLACE INTO `item_db` VALUES ('14609','Spoiled_Cuisine','Spoiled Cuisine','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 10,10;','','');
REPLACE INTO `item_db` VALUES ('15000','Bone_Plate','Bone Plate','5','20','10','1000','0','0','7','0','1','414946','2','2','16','0','85',NULL,'1','0','0','bonus bStr,1; bonus bMdef,3; bonus2 bIgnoreDefRate,RC_DemiHuman,10; bonus2 bIgnoreDefRate,RC_Brute,10; bonus3 bAutoSpellWhenHit,NPC_WIDEBLEEDING,1,10;','','');
-REPLACE INTO `item_db` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','4294967294','63','2','16','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('16000','Erde','Erde','4','20','10','500','130','0','0','1','2','312754','2','2','2','4','50',NULL,'1','8','0','bonus2 bSkillAtk,AM_ACIDTERROR,20; bonus2 bSkillAtk,AM_DEMONSTRATION,20; bonus bMaxSP,50; bonus bHealPower,10;','','');
REPLACE INTO `item_db` VALUES ('16001','Red_Square_Bag','Red Square Bag','4','20','10','500','130','0','0','1','2','312754','2','2','2','3','50',NULL,'1','8','0','bonus bMaxHP,200; bonus2 bSkillAtk,AM_ACIDTERROR,20; bonus2 bSkillAtk,AM_DEMONSTRATION,20; bonus2 bAddMonsterDropItem,501,50; bonus2 bAddMonsterDropItem,502,20; bonus2 bAddMonsterDropItem,503,20; bonus2 bAddMonsterDropItem,504,20; bonus2 bAddMonsterDropItem,505,10; if(readparam(bStr)>=95) bonus2 bAddEff,Eff_Stun,500;','','');
REPLACE INTO `item_db` VALUES ('16002','Stunner_C','Stunner','4','0','0','0','175','0','0','1','0','33040','63','2','2','3','1',NULL,'0','8','0','bonus2 bAddEff,Eff_Stun,1000; bonus2 bAddSize,Size_Small,40; bonus2 bAddSize,Size_Medium,40; bonus2 bAddSize,Size_Large,40;','','');
@@ -6150,7 +6150,7 @@ REPLACE INTO `item_db` VALUES ('18502','Cheer_Scarf10','Cheer Scarf10','5','0','
REPLACE INTO `item_db` VALUES ('18503','Small_Horn_Of_Devil','Small Devil Horns','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','1',NULL,'0','562','0','bonus bAtkRate,5; bonus bMatkRate,5; bonus bMaxHPrate,10; bonus bMaxSPrate,10;','','');
REPLACE INTO `item_db` VALUES ('18505','Umbala_Spirit','Umbala Spirit','5','0','0','200','0','0','1','0','1','4294967295','63','2','1','0','30',NULL,'0','675','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('18506','Hattah_Black','Hattah Black','5','12000','6000','4000','0','0','2','0','1','4294967295','63','2','769','0','1',NULL,'1','676','0','','','');
-REPLACE INTO `item_db` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','4294967294','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
REPLACE INTO `item_db` VALUES ('18539','Skull_Cap','Skull Cap','5','40','20','200','0','0','5','0','1','4294967295','63','2','256','0','10',NULL,'1','713','0','bonus bMatkRate,2; if(getrefine() >= 5) { bonus bMatkRate,3; } if(getrefine() >= 7) { bonus bMatkRate,3; }','','');
REPLACE INTO `item_db` VALUES ('18595','Horn_Of_Ancient','Horn of Ancient','5','40','20','200','0','0','8','0','1','4294967295','63','2','256','0','50',NULL,'1','757','0','autobonus \"{ bonus bBaseAtk,100; }\",5,10000,0,\"{ specialeffect2 EF_POTION_BERSERK; }\";','','');
REPLACE INTO `item_db` VALUES ('18596','Sprout_Hat','Sprout Hat','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','70',NULL,'1','758','0','skill WZ_HEAVENDRIVE,3;','','');
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index d8a5497cc..e0fa911e8 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -174,7 +174,7 @@ REPLACE INTO `item_db_re` VALUES ('642','Book_Of_Devil','Book of the Devil','2',
REPLACE INTO `item_db_re` VALUES ('643','Pet_Incubator','Pet Incubator','2','3000','1500','30','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','bpet;','','');
REPLACE INTO `item_db_re` VALUES ('644','Gift_Box','Gift Box','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 644,1;','','');
REPLACE INTO `item_db_re` VALUES ('645','Center_Potion','Concentration Potion','2','800','400','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,4;','','');
-REPLACE INTO `item_db_re` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','4294442735','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,6;','','');
+REPLACE INTO `item_db_re` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','2147483647','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,6;','','');
REPLACE INTO `item_db_re` VALUES ('657','Berserk_Potion','Berserk Potion','2','3000','1500','200','0','0','0','0','0','31868582','63','2','0','0','85',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,9;','','');
REPLACE INTO `item_db_re` VALUES ('658','Union_Of_Tribe','Tribal Solidarity','2','2','1','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','guildgetexp rand(600000,1200000);','','');
REPLACE INTO `item_db_re` VALUES ('659','Heart_Of_Her','Her Heart','2','500','250','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','pet 1188;','','');
@@ -1172,8 +1172,8 @@ REPLACE INTO `item_db_re` VALUES ('2110','Holy_Guard','Holy Guard','5','85000','
REPLACE INTO `item_db_re` VALUES ('2111','Herald_Of_GOD','Sacred Mission','5','128000','64000','1600','0','0','120','0','0','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db_re` VALUES ('2112','Novice_Guard','Novice Guard','5','1','0','1','0','0','20','0','0','1','47','2','32','0','0',NULL,'0','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2113','Novice_Shield','Novice Shield','5','5000','2500','1000','0','0','20','0','1','1','47','2','32','0','40',NULL,'1','3','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20;','','');
-REPLACE INTO `item_db_re` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','45','0','1','4294967294','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','80','0','1','4294967294','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','45','0','1','2147483647','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','80','0','1','2147483647','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2116','Angel\'s_Safeguard','Angelic Guard','5','10000','5000','400','0','0','30','0','1','1','47','2','32','0','20',NULL,'1','1','0','bonus2 bSubRace,RC_Demon,5;','','');
REPLACE INTO `item_db_re` VALUES ('2117','Arm_Guard','Arm Guard','5','10000','5000','150','0','0','50','0','0','570425344','1','2','32','0','20',NULL,'1','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2118','Arm_Guard_','Arm Guard','5','10000','5000','150','0','0','50','0','1','570425344','1','2','32','0','20',NULL,'1','1','0','','','');
@@ -1184,7 +1184,7 @@ REPLACE INTO `item_db_re` VALUES ('2122','Platinum_Shield','Platinum Shield','5'
REPLACE INTO `item_db_re` VALUES ('2123','Orleans_Server','Orleans\'s Server','5','20','10','1000','0','0','75','0','1','1040382','58','2','32','0','55',NULL,'1','4','0','bonus bMdef,2; bonus bMagicDamageReturn,5;','','');
REPLACE INTO `item_db_re` VALUES ('2124','Thorny_Buckler','Thorny Buckler','5','20','10','1000','0','0','85','0','1','1040382','58','2','32','0','55',NULL,'1','2','0','bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('2125','Strong_Shield','Strong Shield','5','20','10','2500','0','0','90','0','1','414946','58','2','32','0','75',NULL,'1','4','0','bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
-REPLACE INTO `item_db_re` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','4294967294','63','2','32','0','0',NULL,'1','2','0','bonus bMdef,2; bonus bMagicDamageReturn,2; autobonus2 \"{ bonus bShortWeaponDamageReturn,5; }\",20,1000,BF_WEAPON,\"{ specialeffect2 EF_REFLECTSHIELD; }\";','','');
+REPLACE INTO `item_db_re` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','2147483647','63','2','32','0','0',NULL,'1','2','0','bonus bMdef,2; bonus bMagicDamageReturn,2; autobonus2 \"{ bonus bShortWeaponDamageReturn,5; }\",20,1000,BF_WEAPON,\"{ specialeffect2 EF_REFLECTSHIELD; }\";','','');
REPLACE INTO `item_db_re` VALUES ('2127','Secular_Mission','Secular Mission','5','20','10','0','0','0','10','0','0','4294967295','63','2','32','0','0',NULL,'0','4','0','bonus2 bSubRace,RC_NonBoss,25; bonus2 bSubRace,RC_Boss,25;','','');
REPLACE INTO `item_db_re` VALUES ('2128','Herald_Of_GOD_','Sacred Mission','5','128000','64000','1600','0','0','120','0','1','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db_re` VALUES ('2129','Exorcism_Bible','Exorcism Bible','5','20','10','600','0','0','80','0','0','33024','63','2','32','0','50',NULL,'1','5','0','bonus bHPrecovRate,3; bonus bSPrecovRate,3; bonus bInt,1;','','');
@@ -1213,7 +1213,7 @@ REPLACE INTO `item_db_re` VALUES ('2151','Upg_Shield','Reinforcement Shield','5'
REPLACE INTO `item_db_re` VALUES ('2152','Anti_Demon_Shield_C','Anti Demon Shield','5','0','0','0','0','0','120','0','0','4294967295','63','2','32','0','0',NULL,'0','3','0','bonus2 bSubRace,RC_DemiHuman,25; bonus2 bSubRace,RC_Demon,25; bonus bMaxHP,400;','','');
REPLACE INTO `item_db_re` VALUES ('2153','Imperial_Guard','Imperial Guard','5','20','10','2500','0','0','120','0','1','16384','56','2','32','0','102',NULL,'1','4','0','bonus bMdef,5; if(getrefine()>=6) { bonus2 bSkillAtk,LG_SHIELDPRESS,20+((getrefine()-5)*2); } else { bonus2 bSkillAtk,LG_SHIELDPRESS,20; }','','');
REPLACE INTO `item_db_re` VALUES ('2154','Toy_Shield','Toy Shield','5','0','0','500','0','0','1','0','1','4294967295','63','2','32','0','10',NULL,'1','1','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2155','Academy_Shield','Academy Shield','5','0','0','1500','0','0','3','0','1','4294967294','63','2','32','0','0',NULL,'1','4','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2155','Academy_Shield','Academy Shield','5','0','0','1500','0','0','3','0','1','2147483647','63','2','32','0','0',NULL,'1','4','0','','','');
REPLACE INTO `item_db_re` VALUES ('2156','Bible_Of_Promise1','Bible of Promise(1st Vol.)','5','20','10','500','0','0','10','0','1','256','56','2','32','0','110',NULL,'1','5','0','bonus bMdef,2; skill ALL_ODINS_POWER,1;','','');
REPLACE INTO `item_db_re` VALUES ('2157','Insecticide','Pesticide','5','20','10','100','0','0','0','0','0','4294967295','63','2','32','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2158','Ramor_Shield_Undead','Ramorushirudo','5','20','10','1300','0','0','50','0','1','4294967295','63','2','32','0','65',NULL,'1','3','0','','','');
@@ -1258,8 +1258,8 @@ REPLACE INTO `item_db_re` VALUES ('2218','Flu_Mask','Flu Mask','5','300','150','
REPLACE INTO `item_db_re` VALUES ('2219','Flu_Mask_','Flu Mask','5','300','150','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus2 bResEff,Eff_Silence,1000;','','');
REPLACE INTO `item_db_re` VALUES ('2220','Hat','Hat','5','1000','500','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
REPLACE INTO `item_db_re` VALUES ('2221','Hat_','Hat','5','1000','500','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','7','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','5','0','1','4294967294','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','5','0','1','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
REPLACE INTO `item_db_re` VALUES ('2224','Goggle','Goggles','5','20','10','300','0','0','5','0','0','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2225','Goggle_','Goggles','5','20','10','300','0','0','5','0','1','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2226','Cap','Cap','5','12000','6000','400','0','0','7','0','0','941290','63','2','256','0','0',NULL,'1','14','0','','','');
@@ -1270,8 +1270,8 @@ REPLACE INTO `item_db_re` VALUES ('2230','Gemmed_Sallet','Gemmed Sallet','5','50
REPLACE INTO `item_db_re` VALUES ('2231','Gemmed_Sallet_','Gemmed Sallet','5','50000','25000','500','0','0','8','0','1','414946','63','2','256','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2232','Circlet','Circlet','5','7500','3750','300','0','0','6','0','0','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2233','Circlet_','Circlet','5','7500','3750','300','0','0','6','0','1','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','7','0','0','4294967294','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','7','0','0','4294967294','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','7','0','0','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','7','0','0','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
REPLACE INTO `item_db_re` VALUES ('2236','Santa\'s_Hat','Santa Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','bonus bMdef,1; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2237','Weird_Goatee','Bandit Beard','5','2','1','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','21','0','','','');
REPLACE INTO `item_db_re` VALUES ('2238','Weird_Moustache','Moustache','5','2','1','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','22','0','','','');
@@ -1280,60 +1280,60 @@ REPLACE INTO `item_db_re` VALUES ('2240','Beard','Beard','5','2','1','100','0','
REPLACE INTO `item_db_re` VALUES ('2241','Granpa_Beard','Grampa Beard','5','5000','2500','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db_re` VALUES ('2242','Luxury_Sunglasses','Purple Glasses','5','24000','12000','100','0','0','2','0','0','4294967295','63','2','512','0','0',NULL,'0','26','0','bonus2 bResEff,Eff_Blind,1000;','','');
REPLACE INTO `item_db_re` VALUES ('2243','Spinning_Eyes','Geek Glasses','5','20000','10000','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','27','0','bonus2 bResEff,Eff_Blind,1500;','','');
-REPLACE INTO `item_db_re` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','29','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','9','0','0','4294967294','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db_re` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','31','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','32','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','29','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','9','0','0','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','31','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','32','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db_re` VALUES ('2251','Holy_Bonnet','Monk Hat','5','30000','15000','100','0','0','10','0','0','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2252','Star_Sparkling','Wizard Hat','5','20','10','300','0','0','7','0','0','8454660','63','2','256','0','0',NULL,'1','36','0','bonus bMaxSP,100;','','');
REPLACE INTO `item_db_re` VALUES ('2253','Sunflower','Sunflower','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','4','0','0','4294967294','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','6','0','0','4294967294','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db_re` VALUES ('2256','Magestic_Goat','Magestic Goat','5','20','10','800','0','0','9','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('2257','Snowy_Horn','Unicorn Horn','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','42','0','','','');
REPLACE INTO `item_db_re` VALUES ('2258','Sharp_Gear','Spiky Band','5','20','10','1000','0','0','12','0','0','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db_re` VALUES ('2259','Mini_Propeller','Mini Propeller','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','46','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','2','0','0','4294967294','63','2','512','0','0',NULL,'0','47','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','47','0','','','');
REPLACE INTO `item_db_re` VALUES ('2261','Prontera_Army_Cap','Army Cap','5','20','10','400','0','0','8','0','0','414946','63','2','256','0','0',NULL,'1','48','0','','','');
REPLACE INTO `item_db_re` VALUES ('2262','Pierrot_Nose','Clown Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','50','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','50','0','','','');
REPLACE INTO `item_db_re` VALUES ('2264','Munak_Turban','Munak Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db_re` VALUES ('2265','Ganster_Mask','Gangster Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','52','0','bonus2 bResEff,Eff_Silence,1500;','','');
REPLACE INTO `item_db_re` VALUES ('2266','Iron_Cane','Iron Cain','5','20','10','300','0','0','4','0','0','16514','63','2','1','0','50',NULL,'0','53','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','58','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','58','0','','','');
REPLACE INTO `item_db_re` VALUES ('2272','Stop_Post','Stop Post','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','59','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','4294967294','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
REPLACE INTO `item_db_re` VALUES ('2275','Red_Bandana','Red Bandana','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','62','0','','','');
REPLACE INTO `item_db_re` VALUES ('2276','Eagle_Eyes','Angled Glasses','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','0',NULL,'0','63','0','','','');
REPLACE INTO `item_db_re` VALUES ('2277','Nurse_Cap','Nurse Cap','5','20','10','100','0','0','4','0','0','33040','63','2','256','0','0',NULL,'1','64','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2278','Mr_Smile','Mr. Smile','5','60','30','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','65','0','','','');
REPLACE INTO `item_db_re` VALUES ('2279','Bomb_Wick','Bomb Wick','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','66','0','','','');
REPLACE INTO `item_db_re` VALUES ('2280','Sahkkat','Sakkat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','67','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','4294967294','63','2','513','0','0',NULL,'0','68','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','68','0','','','');
REPLACE INTO `item_db_re` VALUES ('2282','Spirit_Chain','Halo','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','69','0','bonus2 bSubEle,Ele_Holy,15;','','');
REPLACE INTO `item_db_re` VALUES ('2283','Ear_Mufs','Ear Muffs','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','70','0','bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','8','0','0','4294967294','63','2','256','0','0',NULL,'1','71','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','1','0','0','4294967294','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','70',NULL,'0','73','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','4','0','0','4294967294','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','4294967294','63','2','513','0','0',NULL,'0','75','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','8','0','0','2147483647','63','2','256','0','0',NULL,'1','71','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','1','0','0','2147483647','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','75','0','','','');
REPLACE INTO `item_db_re` VALUES ('2289','Poo_Poo_Hat','Poo Poo Hat','5','20','10','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','76','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('2290','Funeral_Costume','Funeral Hat','5','3000','1500','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','77','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db_re` VALUES ('2292','Welding_Mask','Welding Mask','5','20','10','300','0','0','2','0','0','263200','63','2','513','0','50',NULL,'0','79','0','bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2293','Pretend_Murdered','Pretend Murdered','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','80','0','','','');
REPLACE INTO `item_db_re` VALUES ('2294','Star_Dust','Stellar','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','81','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
+REPLACE INTO `item_db_re` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db_re` VALUES ('2296','Binoculars','Binoculars','5','20','10','100','0','0','2','0','0','526344','63','2','512','0','50',NULL,'0','83','0','bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','4294967294','63','2','513','0','0',NULL,'0','84','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','84','0','','','');
REPLACE INTO `item_db_re` VALUES ('2298','Green_Feeler','Green Feeler','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','85','0','','','');
REPLACE INTO `item_db_re` VALUES ('2299','Viking_Helm','Orc Helm','5','20','10','500','0','0','9','0','0','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db_re` VALUES ('2301','Cotton_Shirt','Cotton Shirt','5','10','5','100','0','0','10','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1342,11 +1342,11 @@ REPLACE INTO `item_db_re` VALUES ('2303','Leather_Jacket','Jacket','5','200','10
REPLACE INTO `item_db_re` VALUES ('2304','Leather_Jacket_','Jacket','5','200','100','200','0','0','15','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2305','Adventure_Suit','Adventurer\'s Suit','5','1000','500','300','0','0','20','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2306','Adventurere\'s_Suit_','Adventurer\'s Suit','5','1000','500','300','0','0','20','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','37','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','37','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','42','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','42','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','30','0','1','4294967294','63','2','16','0','30',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','37','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','37','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','42','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','42','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','30','0','1','2147483647','63','2','16','0','30',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2312','Padded_Armor','Padded Armor','5','48000','24000','2800','0','0','35','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2313','Padded_Armor_','Padded Armor','5','48000','24000','2800','0','0','35','0','1','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2314','Chain_Mail','Chain Mail','5','65000','32500','3300','0','0','55','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1354,8 +1354,8 @@ REPLACE INTO `item_db_re` VALUES ('2315','Chain_Mail_','Chain Mail','5','65000',
REPLACE INTO `item_db_re` VALUES ('2316','Plate_Armor','Full Plate','5','80000','40000','4500','0','0','70','0','0','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2317','Plate_Armor_','Full Plate','5','80000','40000','4500','0','0','70','0','1','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2318','Clothes_Of_The_Lord','Lord\'s Clothes','5','20','10','2500','0','0','59','0','1','263200','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','58','0','1','4294967294','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
-REPLACE INTO `item_db_re` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','40','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','58','0','1','2147483647','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
+REPLACE INTO `item_db_re` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','40','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2321','Silk_Robe','Silk Robe','5','8000','4000','400','0','0','20','0','0','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2322','Silk_Robe_','Silk Robe','5','8000','4000','400','0','0','20','0','1','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2323','Scapulare','Scapulare','5','6500','3250','400','0','0','24','0','0','33040','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1373,38 +1373,38 @@ REPLACE INTO `item_db_re` VALUES ('2334','Mage_Coat','Mage Coat','5','20','10','
REPLACE INTO `item_db_re` VALUES ('2335','Thief_Clothes','Thief Clothes','5','74000','37000','100','0','0','40','0','0','570560576','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2336','Thief_Clothes_','Thief Clothes','5','74000','37000','100','0','0','40','0','1','570560576','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2337','Ninja_Suit','Ninja Suit','5','20','10','1500','0','0','58','0','0','570560576','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','10','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('2339','G_Strings','Pantie','5','1000','500','100','0','0','22','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2340','Novice_Breast','Novice Breastplate','5','89000','44500','500','0','0','32','0','1','1','47','2','16','0','10',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2341','Full_Plate_Armor','Legion Plate Armor','5','94000','47000','5500','0','0','79','0','0','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2342','Full_Plate_Armor_','Legion Plate Armor','5','102500','51250','5500','0','0','79','0','1','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2343','Robe_Of_Casting','Robe of Cast','5','124800','62400','1100','0','0','40','0','0','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bVariableCastrate,-3; bonus bMdef,4;','','');
REPLACE INTO `item_db_re` VALUES ('2344','Flame_Sprits_Armor','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
-REPLACE INTO `item_db_re` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','25','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
+REPLACE INTO `item_db_re` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
REPLACE INTO `item_db_re` VALUES ('2346','Water_Sprits_Armor','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
-REPLACE INTO `item_db_re` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','25','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
+REPLACE INTO `item_db_re` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
REPLACE INTO `item_db_re` VALUES ('2348','Wind_Sprits_Armor','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
-REPLACE INTO `item_db_re` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','25','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
+REPLACE INTO `item_db_re` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
REPLACE INTO `item_db_re` VALUES ('2350','Earth_Sprits_Armor','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
-REPLACE INTO `item_db_re` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','25','0','1','4294967294','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
+REPLACE INTO `item_db_re` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
REPLACE INTO `item_db_re` VALUES ('2352','Novice_Plate','Tattered Novice Ninja Suit','5','1','0','1','0','0','25','0','0','1','47','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','53','0','1','4294967294','63','2','16','0','65',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','58','0','0','4294967294','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','53','0','1','2147483647','63','2','16','0','65',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','58','0','0','2147483647','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('2355','Angel\'s_Protection','Angelic Protection','5','10000','5000','600','0','0','25','0','1','1','47','2','16','0','40',NULL,'1','0','0','bonus bMdef,20;','','');
REPLACE INTO `item_db_re` VALUES ('2356','Vestment_Of_Grace','Blessed Holy Robe','5','20','10','2500','0','0','45','0','1','33024','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus2 bResEff,Eff_Blind,8000;','','');
REPLACE INTO `item_db_re` VALUES ('2357','Valkyrie_Armor','Valkyrian Armor','5','0','0','2800','0','0','55','0','1','1040382','58','2','16','0','0',NULL,'1','0','0','bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;','','');
REPLACE INTO `item_db_re` VALUES ('2358','Dress_Of_Angel','Angel\'s Dress','5','20','10','1000','0','0','5','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bLuk,4;','','');
REPLACE INTO `item_db_re` VALUES ('2359','Ninja_Suit_','Ninja Suit','5','20','10','1500','0','0','58','0','1','570560576','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2360','Robe_Of_Casting_','Robe of Cast','5','124800','62400','1100','0','0','40','0','1','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bVariableCastrate,-3; bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2361','Blue_Aodai','Blue Robe','5','20','10','500','0','0','0','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2362','Red_Aodai','Red Robe','5','20','10','500','0','0','0','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2361','Blue_Aodai','Blue Robe','5','20','10','500','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2362','Red_Aodai','Red Robe','5','20','10','500','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2363','White_Aodai','White Robe','5','20','10','500','0','0','0','0','0','1','47','2','16','0','0',NULL,'1','0','0','bonus bStr,3; bonus bInt,3; bonus bVit,3; bonus bDex,3; bonus bAgi,3; bonus bLuk,3; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2364','Meteo_Plate_Armor','Meteo Plate Armor','5','20','10','3000','0','0','85','0','1','279714','58','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Stun,3000; bonus2 bResEff,Eff_Freeze,3000;','','');
REPLACE INTO `item_db_re` VALUES ('2365','Orleans_Gown','Orleans\'s Gown','5','20','10','300','0','0','15','0','1','1040382','58','2','16','0','55',NULL,'1','0','0','bonus bVariableCastrate,15; bonus bNoCastCancel,0;','','');
REPLACE INTO `item_db_re` VALUES ('2366','Divine_Cloth','Divine Cloth','5','20','10','1500','0','0','50','0','1','1040382','58','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Curse,500; bonus2 bResEff,Eff_Silence,500; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; bonus2 bResEff,Eff_Sleep,500;','','');
REPLACE INTO `item_db_re` VALUES ('2367','Sniping_Suit','Sniping Suit','5','20','10','750','0','0','42','0','1','2048','58','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
REPLACE INTO `item_db_re` VALUES ('2368','Golden_Armor','Golden Armor','5','20','10','2000','0','0','4','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','4294967294','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('2370','Used_Mage_Coat','Used Mage Coat','5','0','0','0','0','0','15','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bAgi,1; bonus bMaxHP,300; bonus bMaxSP,30; bonus bBaseAtk,10; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2371','G_Strings_','Pantie','5','1000','500','100','0','0','22','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2372','Mage_Coat_','Mage Coat','5','20','10','600','0','0','40','0','1','8454660','63','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
@@ -1429,31 +1429,31 @@ REPLACE INTO `item_db_re` VALUES ('2390','Improved_Tights','Improved Tights','5'
REPLACE INTO `item_db_re` VALUES ('2391','Life_Link','Life Link','5','20','10','3500','0','0','75','0','1','16514','58','2','16','0','82',NULL,'1','0','0','bonus bVit,2; bonus bMdef,5; bonus bHPrecovRate,50;','','');
REPLACE INTO `item_db_re` VALUES ('2392','Old_Pant','Old Green Pantie','5','0','0','0','0','0','60','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bStr,2; bonus bVit,2; bonus bMaxHP,200; bonus3 bAutoSpellWhenHit,MO_CALLSPIRITS,5,20; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2393','N_Adventurer\'s_Suit','Novice Adventurer\'s Suit','5','0','0','0','0','0','45','0','1','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','10','0','0','4294967294','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db_re` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','10','0','0','4294967294','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','10','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
-REPLACE INTO `item_db_re` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','10','0','0','4294967294','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','10','0','0','2147483647','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
+REPLACE INTO `item_db_re` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','10','0','0','2147483647','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
+REPLACE INTO `item_db_re` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2398','Sniping_Suit_M','Sniping Suit','5','20','10','750','0','0','5','0','1','2048','58','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
REPLACE INTO `item_db_re` VALUES ('2399','Dragon_Vest','Dragon Vest','5','20','10','500','0','0','20','0','1','1040382','58','2','16','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2401','Sandals','Sandals','5','400','200','200','0','0','5','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2402','Sandals_','Sandals','5','400','200','200','0','0','5','0','1','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','10','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','10','0','1','4294967294','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','10','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','10','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2405','Boots','Boots','5','18000','9000','600','0','0','16','0','0','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2406','Boots_','Boots','5','18000','9000','600','0','0','16','0','1','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','5','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','5','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('2408','Cuffs','Shackles','5','5000','2500','3000','0','0','18','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','10','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','10','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2410','Sleipnir','Sleipnir','5','20','10','3500','0','0','40','0','0','4294967295','63','2','64','0','94',NULL,'0','0','0','bonus bUnbreakableShoes,0; bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,25; bonus bSpeedRate,25; bonus bInt,25;','','');
REPLACE INTO `item_db_re` VALUES ('2411','Grave','Greaves','5','48000','24000','750','0','0','27','0','0','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2412','Grave_','Greaves','5','54000','27000','750','0','0','27','0','1','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2413','Safty_Boots','Safety Boots','5','34000','17000','350','0','0','22','0','0','16514','63','2','64','0','30',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2414','Novice_Boots','Novice Slippers','5','1','0','1','0','0','5','0','0','1','47','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','9','0','1','4294967294','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','9','0','1','2147483647','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2416','Novice_Shoes','Novice Shoes','5','35000','17500','500','0','0','8','0','1','1','47','2','64','0','40',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','12','0','0','4294967294','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
-REPLACE INTO `item_db_re` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','0','4294967294','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
-REPLACE INTO `item_db_re` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','13','0','0','4294967294','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','12','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
+REPLACE INTO `item_db_re` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
+REPLACE INTO `item_db_re` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','13','0','0','2147483647','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2420','Angel\'s_Arrival','Angel\'s Reincarnation','5','10000','5000','300','0','0','8','0','1','1','47','2','64','0','25',NULL,'1','0','0','bonus bMaxHP,100;','','');
REPLACE INTO `item_db_re` VALUES ('2421','Valkyrie_Shoes','Valkyrian Shoes','5','0','0','500','0','0','13','0','1','1040382','58','2','64','0','0',NULL,'1','0','0','bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db_re` VALUES ('2422','High_Fashion_Sandals','High Fashion Sandals','5','24000','12000','200','0','0','7','0','1','8487700','63','2','64','0','40',NULL,'1','0','0','bonus bMdef,10;','','');
@@ -1462,26 +1462,26 @@ REPLACE INTO `item_db_re` VALUES ('2424','Tidal_Shoes','Tidal Shoes','5','20','1
REPLACE INTO `item_db_re` VALUES ('2425','Black_Leather_Boots','Black Leather Boots','5','20','10','500','0','0','16','0','0','1040382','58','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2426','Shadow_Walk','Shadow Walk','5','20','10','2000','0','0','0','0','0','1040382','58','2','64','0','75',NULL,'1','0','0','bonus bMdef,10; if(getskilllv(AS_CLOAKING)<2) { bonus5 bAutoSpellWhenHit,AS_CLOAKING,2,100,BF_MAGIC,0; } else bonus5 bAutoSpellWhenHit,AS_CLOAKING,getskilllv(AS_CLOAKING),100,BF_MAGIC,0;','','');
REPLACE INTO `item_db_re` VALUES ('2427','Golden_Shoes','Golden Shoes','5','20','10','300','0','0','4','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2428','Freyja_Boots','Freyja Boots','5','0','0','300','0','0','22','0','0','4294967294','63','2','64','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2428','Freyja_Boots','Freyja Boots','5','0','0','300','0','0','22','0','0','2147483647','63','2','64','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('2429','Iron_Boots01','Iron Boots','5','0','0','1500','0','0','5','0','0','941290','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2430','Iron_Boots02','Iron Boots','5','0','0','800','0','0','5','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2431','Valley_Shoes','Valley Shoes','5','20','10','0','0','0','10','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMaxHPrate,7; bonus bMaxSPrate,7;','','');
-REPLACE INTO `item_db_re` VALUES ('2432','Spiky_Heel_','Highheels','5','8500','4250','600','0','0','10','0','1','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2432','Spiky_Heel_','Highheels','5','8500','4250','600','0','0','10','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2433','Diabolus_Boots','Diabolus Boots','5','20','10','250','0','0','15','0','1','1040256','58','2','64','0','0',NULL,'1','0','0','bonus bMaxHP,(BaseLevel*10);','','');
REPLACE INTO `item_db_re` VALUES ('2434','Black_Leather_Boots_','Black Leather Boots','5','20','10','500','0','0','16','0','1','1040382','58','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2435','Battle_Greave','Battle Greave','5','10','5','0','0','0','15','0','1','577131746','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db_re` VALUES ('2436','Combat_Boots','Combat Boots','5','10','5','0','0','0','9','0','1','9014044','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db_re` VALUES ('2437','Battle_Boots','Battle Boots','5','10','5','0','0','0','9','0','1','16777216','1','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2438','Paw_Of_Cat','Paw Of Cat','5','10','5','300','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bFlee,5; bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2438','Paw_Of_Cat','Paw Of Cat','5','10','5','300','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bFlee,5; bonus bAgi,1; skill ALL_CATCRY, 1;','','');
REPLACE INTO `item_db_re` VALUES ('2439','Refresh_Shoes','Refresh Shoes','5','20','10','0','0','0','20','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMaxHPrate,17; bonus bMaxSPrate,8; bonus2 bHPRegenRate,20,10000; bonus2 bSPRegenRate,3,10000;','','');
REPLACE INTO `item_db_re` VALUES ('2440','Sprint_Shoes','Sprint Shoes','5','20','10','300','0','0','10','0','1','1040256','58','2','64','0','0',NULL,'1','0','0','bonus bAgi,1; bonus bSPrecovRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2441','Beach_Sandal','Beach Sandals','5','20','10','200','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2442','Boots_Perforated','Red Stocking Boots','5','0','0','0','0','0','18','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bLuk,2; bonus bHPrecovRate,10; bonus bSPrecovRate,10; bonus3 bAutoSpellWhenHit,WZ_QUAGMIRE,3,30; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2443','Fish_Shoes','Fisher\'s Boots','5','10','5','250','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','4294967294','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','5','0','0','4294967294','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','10','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2447','Military_Boots','Army Boots','5','1000','500','1000','0','0','5','0','0','4294967294','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','5','0','0','2147483647','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','10','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2447','Military_Boots','Army Boots','5','1000','500','1000','0','0','5','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2448','Air_Boss','Air Boss','5','0','0','500','0','0','2','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2449','Variant_Shoes_M','Variant Shoes','5','20','10','500','0','0','3','0','0','1040382','58','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
REPLACE INTO `item_db_re` VALUES ('2450','Vital_Tree_Shoes','Vital Tree Shoes','5','20','10','500','0','0','16','0','0','1040382','58','2','64','0','60',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus bHealPower2,5; bonus bAddItemHealRate,5; bonus bMdef,3; bonus bVit,2;','','');
@@ -1493,7 +1493,7 @@ REPLACE INTO `item_db_re` VALUES ('2455','Time_Keepr_Boots','Guardian Boots','5'
REPLACE INTO `item_db_re` VALUES ('2456','Para_Team_Boots1','Eden Group Boots I','5','0','0','0','0','0','14','0','0','4294967295','63','2','64','0','12',NULL,'0','0','0','bonus bHPrecovRate,10; bonus bSPrecovRate,2;','','');
REPLACE INTO `item_db_re` VALUES ('2457','Para_Team_Boots2','Eden Group Boots II','5','0','0','0','0','0','16','0','0','4294967295','63','2','64','0','26',NULL,'0','0','0','bonus bHPrecovRate,12; bonus bSPrecovRate,4;','','');
REPLACE INTO `item_db_re` VALUES ('2458','Para_Team_Boots3','Eden Group Boots III','5','0','0','0','0','0','18','0','0','4294967295','63','2','64','0','40',NULL,'0','0','0','bonus bHPrecovRate,14; bonus bSPrecovRate,6;','','');
-REPLACE INTO `item_db_re` VALUES ('2459','Upg_Shoes','Reinforcement Shoes','5','20','10','200','0','0','15','0','1','4294967294','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2459','Upg_Shoes','Reinforcement Shoes','5','20','10','200','0','0','15','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2460','Upg_Boots','Reinforcement Boots','5','20','10','300','0','0','21','0','1','24009962','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2461','Upg_Greave','Reinforcement Greaves','5','20','10','400','0','0','32','0','1','16512','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2462','Sleipnir_C','Ephemeral Sleipnir','5','20','10','0','0','0','40','0','0','4294967295','63','2','64','0','94',NULL,'0','0','0','bonus bUnbreakableShoes,0; bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25;','','');
@@ -1522,36 +1522,36 @@ REPLACE INTO `item_db_re` VALUES ('2484','Siege_Boots','WoE Boots','5','10','5',
REPLACE INTO `item_db_re` VALUES ('2485','Siege_Shoes','WoE Shoes','5','10','5','350','0','0','15','0','1','8487701','63','2','64','0','95',NULL,'1','0','0','bonus bMdef,10; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db_re` VALUES ('2486','Shadow_Walk_','Shadow Walker','5','20','10','2000','0','0','0','0','1','1040382','58','2','64','0','75',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2487','Vital_Tree_Shoes_','Sephiroth\'s Shoes','5','20','10','500','0','0','16','0','1','1040382','58','2','64','0','60',NULL,'1','0','0','bonus bVit,2; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2488','Fricco_Shoes_','Freyja Boots','5','30000','15000','500','0','0','12','0','1','4294967294','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2489','Vidar\'s_Boots_','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','1','4294967294','63','2','64','0','65',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2488','Fricco_Shoes_','Freyja Boots','5','30000','15000','500','0','0','12','0','1','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2489','Vidar\'s_Boots_','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','1','2147483647','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2491','Bangungot_Boots','Bangungot Boots of Nightmare','5','20','10','600','0','0','10','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,getrefine(); if(getrefine()>=14) { bonus bSpeedRate,25; }','','');
REPLACE INTO `item_db_re` VALUES ('2492','Bayani_Bangungot_Boots','Bangungot Boots(Bayani)','5','20','10','600','0','0','10','0','1','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,getrefine(); if(getrefine()>=12) { bonus bSpeedRate,25; }','','');
REPLACE INTO `item_db_re` VALUES ('2495','Egir_Shoes','Aegir Shoes','5','200000','100000','300','0','0','13','0','1','4294967295','63','2','64','0','110',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2501','Hood','Hood','5','1000','500','200','0','0','4','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2502','Hood_','Hood','5','1000','500','200','0','0','4','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','8','0','0','4294967294','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','8','0','1','4294967294','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','8','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','8','0','1','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2505','Manteau','Manteau','5','32000','16000','600','0','0','13','0','0','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2506','Manteau_','Manteau','5','32000','16000','600','0','0','13','0','1','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','9','0','0','4294967294','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','4','0','0','4294967294','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','9','0','0','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','4','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2509','Clack_Of_Servival','Survivor\'s Manteau','5','20000','10000','550','0','0','10','0','0','8454660','63','2','4','0','75',NULL,'1','0','0','bonus bMdef,5; bonus bVit,10;','','');
REPLACE INTO `item_db_re` VALUES ('2510','Novice_Hood','Somber Novice Hood','5','1','0','1','0','0','4','0','0','1','47','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,20;','','');
-REPLACE INTO `item_db_re` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','13','0','0','4294967294','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
+REPLACE INTO `item_db_re` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','13','0','0','2147483647','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
REPLACE INTO `item_db_re` VALUES ('2512','Novice_Manteau','Novice Manteau','5','50000','25000','500','0','0','7','0','1','1','47','2','4','0','40',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','18','0','1','4294967294','63','2','4','0','80',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','18','0','1','2147483647','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2514','Pauldron','Pauldron','5','20','10','800','0','0','25','0','1','414946','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2515','Wing_Of_Eagle','Eagle Wing','5','20000','10000','300','0','0','12','0','1','8454660','63','2','4','0','85',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','8','0','0','4294967294','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','13','0','0','4294967294','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
-REPLACE INTO `item_db_re` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','8','0','0','4294967294','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','9','0','0','4294967294','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
-REPLACE INTO `item_db_re` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','11','0','0','4294967294','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','8','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','13','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
+REPLACE INTO `item_db_re` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','8','0','0','2147483647','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','9','0','0','2147483647','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
+REPLACE INTO `item_db_re` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','11','0','0','2147483647','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('2521','Angel\'s_Warmth','Angelic Cardigan','5','10000','5000','400','0','0','6','0','1','1','47','2','4','0','20',NULL,'1','0','0','bonus bHPrecovRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2522','Undershirt','Undershirt','5','20000','10000','150','0','0','5','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2523','Undershirt_','Undershirt','5','20000','10000','150','0','0','5','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2524','Valkyrie_Manteau','Valkyrian Manteau','5','0','0','500','0','0','10','0','1','1040382','58','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bFlee2,5+(getequiprefinerycnt(EQI_GARMENT)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(EQI_GARMENT)*2);','','');
-REPLACE INTO `item_db_re` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','9','0','1','4294967294','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','9','0','1','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2526','Dragon_Scale_Coat','Coat of Dragon Scale','5','20','10','10','0','0','14','0','0','4294967295','63','2','4','0','50',NULL,'1','0','0','bonus bMaxHP,300;','','');
REPLACE INTO `item_db_re` VALUES ('2527','Dragon_Breath','Dragon Breath','5','20','10','600','0','0','16','0','1','1040382','58','2','4','0','48',NULL,'1','0','0','bonus2 bSubRace,RC_Dragon,15;','','');
REPLACE INTO `item_db_re` VALUES ('2528','Wool_Scarf','Wool Scarf','5','20','10','500','0','0','11','0','1','1040382','58','2','4','0','55',NULL,'1','0','0','bonus bMdef,4;','','');
@@ -1559,10 +1559,10 @@ REPLACE INTO `item_db_re` VALUES ('2529','Rider_Insignia','Rider Insignia','5','
REPLACE INTO `item_db_re` VALUES ('2530','Rider_Insignia_','Rider Insignia','5','20','10','500','0','0','13','0','1','1040382','58','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2531','Ulfhedinn','Ulfhedinn','5','20','10','700','0','0','13','0','1','414946','58','2','4','0','70',NULL,'1','0','0','bonus3 bAutoSpellWhenHit,NPC_STONESKIN,6,20;','','');
REPLACE INTO `item_db_re` VALUES ('2532','Mithril_Magic_Cape','Mithril Magic Cape','5','20','10','400','0','0','8','0','1','625436','58','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
-REPLACE INTO `item_db_re` VALUES ('2533','Freyja_Cape','Freyja Cape','5','0','0','200','0','0','10','0','0','4294967294','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,15;','','');
+REPLACE INTO `item_db_re` VALUES ('2533','Freyja_Cape','Freyja Cape','5','0','0','200','0','0','10','0','0','2147483647','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,15;','','');
REPLACE INTO `item_db_re` VALUES ('2534','Ruffler','Ruffler','5','20','10','0','0','0','10','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,17; bonus bFlee,17;','','');
REPLACE INTO `item_db_re` VALUES ('2535','Cloak_Of_Survival_C','Cloak Of Survival','5','1','0','0','0','0','17','0','0','8454660','63','2','4','0','0',NULL,'0','0','0','bonus bVit,10; bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','7','0','1','4294967294','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','7','0','1','2147483647','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
REPLACE INTO `item_db_re` VALUES ('2537','Diabolus_Manteau','Diabolus Manteau','5','20','10','250','0','0','15','0','1','1040256','58','2','4','0','0',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,5; bonus bMaxHP,100; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
REPLACE INTO `item_db_re` VALUES ('2538','Commander_Manteau','Captain\'s Manteau','5','10','5','0','0','0','28','0','1','577131746','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db_re` VALUES ('2539','Commander_Manteau_','Commander\'s Manteau','5','10','5','0','0','0','20','0','1','9014044','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
@@ -1575,7 +1575,7 @@ REPLACE INTO `item_db_re` VALUES ('2545','Musika','Musika','5','20','10','500','
REPLACE INTO `item_db_re` VALUES ('2546','Beach_Manteau','Beach Manteau','5','20','10','600','0','0','0','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2547','Cheap_Running_Shirts','Cheap Undershirt','5','0','0','0','0','0','11','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus bDex,2; bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,10; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2548','Muffler_C','Neo Muffler','5','0','0','0','0','0','22','0','0','1040382','58','2','4','0','95',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,10; bonus bMaxHPrate,10; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Holy,5; bonus2 bSubEle,Ele_Dark,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','3','0','0','4294967294','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','3','0','0','2147483647','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('2550','Fisher\'s_Muffler','Fisher\'s Muffler','5','20','10','200','0','0','0','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2551','Rider_Insignia_M','Crest of the Rider','5','20','10','500','0','0','4','0','1','1040382','58','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2552','Mithril_Magic_Cape_M','Mithril Magic Manteau','5','20','10','400','0','0','3','0','1','625436','58','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
@@ -1588,7 +1588,7 @@ REPLACE INTO `item_db_re` VALUES ('2558','Freyja_SScarf90','Freya Soul Scarf','5
REPLACE INTO `item_db_re` VALUES ('2559','Time_Keepr_Manteau','Guardian Manteau','5','30000','15000','0','0','0','9','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,1; bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,10;','','');
REPLACE INTO `item_db_re` VALUES ('2560','Para_Team_Manteau','Eden Group Manteau','5','0','0','0','0','0','14','0','0','4294967295','63','2','4','0','12',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,10;','','');
REPLACE INTO `item_db_re` VALUES ('2561','Upg_Hood','Reinforcement Hood','5','0','0','100','0','0','9','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2562','Upg_Muffler','Reinforcement Muffler','5','20','10','200','0','0','13','0','1','4294967294','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2562','Upg_Muffler','Reinforcement Muffler','5','20','10','200','0','0','13','0','1','2147483647','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2563','Upg_Manteau','Reinforcement Manteau','5','20','10','300','0','0','18','0','1','6706402','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2564','Feral_Tail','Feral Tail','5','20','10','0','0','0','16','0','0','4294967295','63','2','4','0','75',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2565','Beach_Towel','Beach Towel','5','20','10','100','0','0','2','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,3; bonus bFlee,7;','','');
@@ -1612,54 +1612,54 @@ REPLACE INTO `item_db_re` VALUES ('2582','Salvage_Cape','Salvage Cape','5','5600
REPLACE INTO `item_db_re` VALUES ('2583','Holy_Cape','Holy Cape','5','20','10','100','0','0','5','0','1','4294967295','63','2','4','0','50',NULL,'1','0','0','bonus bDex,-5; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2584','Wanderer_Outer','Coat Of Wandering','5','20','10','500','0','0','8','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2585','Muffler_Of_Valor','Muffler Of Valor','5','0','0','0','0','0','4','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2586','Siege_Manteau','WoE Manteau','5','10','5','600','0','0','32','0','1','4294967294','63','2','4','0','95',NULL,'1','0','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2586','Siege_Manteau','WoE Manteau','5','10','5','600','0','0','32','0','1','2147483647','63','2','4','0','95',NULL,'1','0','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,2;','','');
REPLACE INTO `item_db_re` VALUES ('2587','Siege_Muffler','WoE Muffler','5','10','5','400','0','0','15','0','1','4294967295','63','2','4','0','95',NULL,'1','0','0','bonus bMdef,10; bonus2 bSubRace,RC_DemiHuman,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2588','Ragamuffin_Cape_','Rag mantle','5','56000','28000','500','0','0','4','0','1','4294967294','63','2','4','0','40',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2588','Ragamuffin_Cape_','Rag mantle','5','56000','28000','500','0','0','4','0','1','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2589','Fallen_Angel_Wing','Fallen Angel Wing','5','0','0','200','0','0','18','0','1','4294967295','63','2','4','0','0',NULL,'1','3','0','bonus bLuk,2; bonus bMdef,18;','','');
REPLACE INTO `item_db_re` VALUES ('2590','Buwaya_Cloth','Buwaya Sack Cloth','5','20','10','200','0','0','8','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bHealPower2,getrefine()/3; bonus bAddItemHealRate,getrefine()/3; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2591','Bayani_Buwaya_Cloth','Buwaya Sack Cloth(Bayani)','5','20','10','200','0','0','8','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bHealPower2,getrefine(); bonus bAddItemHealRate,getrefine(); bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2592','Boss_Brownie_Manteau','Cloak of Domovoi','5','20','10','100','0','0','3','0','0','4294967295','63','2','4','0','50',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2593','Flow_Manteau','Furowamanto','5','20','10','700','0','0','20','0','1','4294967295','63','2','4','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2594','Wrapping_Manteau','Furoshiki Cloak','5','20','10','100','0','0','0','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2607','Clip','Clip','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10; bonus bMaxHP,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
REPLACE INTO `item_db_re` VALUES ('2609','Skul_Ring','Skull Ring','5','10000','5000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2610','Gold_Ring','Gold Ring','5','30000','15000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2611','Silver_Ring','Silver Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2612','Flower_Ring','Flower Ring','5','1500','750','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2613','Diamond_Ring','Diamond Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','4294967294','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','5','0','0','4294967294','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','4294967294','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','4294967294','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','4294967294','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','2147483647','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','5','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2619','Thimble_Of_Archer','Bow Thimble','5','10000','5000','100','0','0','0','0','0','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2620','Ring_Of_Rogue','Rogue\'s Treasure','5','10000','5000','100','0','0','0','0','0','570560576','63','2','136','0','70',NULL,'0','0','0','if(readparam(bStr)>=90) { bonus bHit,10; bonus bFlee,10; } if(readparam(bAgi)>=90) { bonus bBaseAtk,10; bonus bCritical,10; }','','');
-REPLACE INTO `item_db_re` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','4294967294','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2627','Belt','Belt','5','20000','10000','1200','0','0','0','0','1','4294967295','63','2','136','0','25',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2628','Novice_Armlet','Novice Armlet','5','400','200','200','0','0','0','0','1','1','47','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2629','Magingiorde','Magingiorde','5','20','10','8000','0','0','2','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,40+BaseLevel/5; bonus bMdef,7; if(readparam(bStr)==120) bonus2 bAddRace,RC_Boss,10;','','');
REPLACE INTO `item_db_re` VALUES ('2630','Brysinggamen','Brysinggamen','5','20','10','1500','0','0','1','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bDex,6; bonus bStr,6; bonus bAgi,6; bonus bVit,6; bonus bInt,10; bonus bLuk,10; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2631','First_Age_Ring','Celebration Ring','5','1','0','10','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2632','Korean_Trinket','Korean Trinket','5','125000','62500','100','0','0','1','0','0','4294967294','63','2','136','0','65',NULL,'0','0','0','bonus bVit,1; bonus bDex,1; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2633','Jade_Ring','Jade Ring','5','204000','102000','100','0','0','0','0','0','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus bStr,2; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2632','Korean_Trinket','Korean Trinket','5','125000','62500','100','0','0','1','0','0','2147483647','63','2','136','0','65',NULL,'0','0','0','bonus bVit,1; bonus bDex,1; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2633','Jade_Ring','Jade Ring','5','204000','102000','100','0','0','0','0','0','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bStr,2; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2634','Bridegroom_Ring','Wedding Ring','5','0','0','0','0','0','0','0','0','4294967295','63','1','136','0','0',NULL,'0','0','0','skill WE_MALE,1; skill WE_FEMALE,1; skill WE_CALLPARTNER,1;','','');
REPLACE INTO `item_db_re` VALUES ('2635','Bride_Ring','Wedding Ring','5','0','0','0','0','0','0','0','0','4294967295','63','0','136','0','0',NULL,'0','0','0','skill WE_MALE,1; skill WE_FEMALE,1; skill WE_CALLPARTNER,1;','','');
REPLACE INTO `item_db_re` VALUES ('2636','Gold_Ring_','Gold Christmas Ring','5','30000','15000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2637','Silver_Ring_','Silver Christmas Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2638','Exorcize_Sachet','Sacred Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2639','Purification_Sachet','Occult Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,1; bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2641','Fashionable_Sack','Fashion Hip Sack','5','20','10','700','0','0','0','0','0','263200','63','2','136','0','50',NULL,'0','0','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('2642','Serin\'s_Gold_Ring','Serin\'s Gold Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2643','Serin\'s_Gold_Ring_','Serin\'s Gold Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1667,14 +1667,14 @@ REPLACE INTO `item_db_re` VALUES ('2644','The_Sign_','The Sign','5','2','1','0',
REPLACE INTO `item_db_re` VALUES ('2645','Moonlight_Ring','Moonlight Ring','5','40000','20000','200','0','0','0','0','0','570560576','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('2646','Bunch_Of_Carnation','Bunch of Carnation','5','2','1','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db_re` VALUES ('2647','Nile_Rose','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','4294967294','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','4294967294','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','4294967294','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
REPLACE INTO `item_db_re` VALUES ('2652','Cursed_Lucky_Brooch','Goddess of Fortune\'s Cursed Brooch','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,6; bonus2 bAddEff2,Eff_Curse,50;','','');
REPLACE INTO `item_db_re` VALUES ('2653','Sacrifice_Ring','Sacrifice Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','90',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2654','Shinobi\'s_Sash','Shinobi Sash','5','20000','10000','300','0','0','1','0','0','570560576','63','2','136','0','30',NULL,'0','0','0','bonus bStr,1; bonus bAgi,1; bonus bMdef,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2656','Hyper_Changer','Armor Charm','5','20000','10000','1000','0','0','0','0','0','414946','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,50;','','');
REPLACE INTO `item_db_re` VALUES ('2657','Lab_Passport','Laboratory Permit','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2658','Nile_Rose_','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
@@ -1683,16 +1683,16 @@ REPLACE INTO `item_db_re` VALUES ('2660','Vesper_Core02','Vesper Core 02','5','2
REPLACE INTO `item_db_re` VALUES ('2661','Vesper_Core03','Vesper Core 03','5','20','10','100','0','0','1','0','0','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('2662','Vesper_Core04','Vesper Core 04','5','20','10','100','0','0','1','0','0','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db_re` VALUES ('2663','Gauntlet_Of_Accuracy','Gauntlet of Hit','5','20','10','900','0','0','0','0','0','4294967295','63','2','136','0','75',NULL,'0','0','0','bonus bHit,15; bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','4294967294','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2665','Ring_Of_Exorcism','Exorcising Ring','5','20','10','500','0','0','0','0','0','33040','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,1; bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5;','','');
REPLACE INTO `item_db_re` VALUES ('2666','Lamp_Of_Hope','Lantern of Hope','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,2; bonus2 bResEff,Eff_Blind,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','4294967294','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','2147483647','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('2668','Women\'s_Glory','Woman Glory','5','0','0','500','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2669','Golden_Necklace_','RJC Necklace','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10;','','');
REPLACE INTO `item_db_re` VALUES ('2670','Ring_Of_Longing','Ring of Longing','5','20','10','100','0','0','1','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('2671','Thimble_Of_Archer_','Bow Thimble','5','10000','5000','100','0','0','0','0','1','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','4294967294','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','2147483647','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2674','Honor_Ring','Ring of Honor','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2675','Lord_Ring','Lord Ring','5','0','0','10','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db_re` VALUES ('2676','Hunter_Earring','Hunter\'s Earring','5','20','10','300','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddMonsterDropItem,7618,100;','','');
@@ -1701,24 +1701,24 @@ REPLACE INTO `item_db_re` VALUES ('2678','Ring_Of_Flame_Lord','Ring Of Flame Lor
REPLACE INTO `item_db_re` VALUES ('2679','Ring_Of_Resonance','Ring Of Resonance','5','20','10','100','0','0','2','0','0','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bAgi,2; bonus bVit,1; bonus bMdef,2; bonus4 bAutoSpellWhenHit,WZ_QUAGMIRE,1,50,0; bonus3 bAutoSpellWhenHit,AS_SPLASHER,10,20; bonus3 bAutoSpellWhenHit,AL_HEAL,10,30; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,3,20; bonus3 bAutoSpellWhenHit,CG_TAROTCARD,5,20;','','');
REPLACE INTO `item_db_re` VALUES ('2680','Lesser_Elemental_Ring','Lesser Elemental Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1; bonus3 bAutoSpell,WZ_ESTIMATION,1,80; bonus3 bAutoSpell,MC_IDENTIFY,1,50; bonus3 bAutoSpell,TF_PICKSTONE,1,100; bonus3 bAutoSpell,BS_GREED,1,10; bonus3 bAutoSpellWhenHit,TK_RUN,5,20; bonus3 bAutoSpellWhenHit,TK_HIGHJUMP,3,30; bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,100; bonus3 bAutoSpellWhenHit,TF_BACKSLIDING,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('2681','Republic_Ring','Republic Anniversary Ring','5','20','10','1000','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2686','Elven_Ears_C','Rental Elven Ears','5','1','0','0','0','0','2','0','0','4294967294','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2687','Steel_Flower_C','Rental Steel Flower','5','1','0','0','0','0','1','0','0','4294967294','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2688','Critical_Ring_C','Rental Critical Ring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2689','Earring_C','Rental Earring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2690','Ring_C','Rental Ring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2691','Necklace_C','Rental Necklace','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2693','Brooch_C','Rental Brooch','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2694','Rosary_C','Rental Rosary','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2695','Safety_Ring_C','Rental Safety Ring','5','1','0','0','0','0','8','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,8;','','');
-REPLACE INTO `item_db_re` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2686','Elven_Ears_C','Rental Elven Ears','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2687','Steel_Flower_C','Rental Steel Flower','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2688','Critical_Ring_C','Rental Critical Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2689','Earring_C','Rental Earring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2690','Ring_C','Rental Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2691','Necklace_C','Rental Necklace','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2693','Brooch_C','Rental Brooch','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2694','Rosary_C','Rental Rosary','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2695','Safety_Ring_C','Rental Safety Ring','5','1','0','0','0','0','8','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,8;','','');
+REPLACE INTO `item_db_re` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db_re` VALUES ('2700','Red_Silk_Seal','Red Silk Seal','5','20','10','100','0','0','0','0','0','16514','58','2','136','0','60',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2701','Orleans_Glove','Orleans\'s Glove','5','20','10','100','0','0','0','0','1','1040382','58','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2702','Bison_Horn','Bison Horn','5','20','10','100','0','0','0','0','1','1040382','58','2','136','0','90',NULL,'0','0','0','bonus bAgi,2;','','');
@@ -1729,7 +1729,7 @@ REPLACE INTO `item_db_re` VALUES ('2706','Handcuff','Arrest Handcuffs','5','0','
REPLACE INTO `item_db_re` VALUES ('2707','GUSLI','Gusli','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2708','Chinese_Handicraft','Chinese Handicraft','5','0','0','50','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus3 bAutoSpell,MG_FIREBOLT,5,300;','','');
REPLACE INTO `item_db_re` VALUES ('2709','5_Anniversary_Coin','5th Anniversary Coin','5','2','1','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
+REPLACE INTO `item_db_re` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
REPLACE INTO `item_db_re` VALUES ('2711','Spiritual_Ring_C','Spiritual Ring','5','1','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,2; bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('2712','Ragnarok_Limited_Ed','Ragnarok Limited Edition','5','0','0','300','0','0','0','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bVit,3; bonus bAgi,3; bonus bLuk,3;','','');
REPLACE INTO `item_db_re` VALUES ('2713','Certificate_TW','Certificate','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1747,16 +1747,16 @@ REPLACE INTO `item_db_re` VALUES ('2724','Medal_Archer','Medal of Honor','5','20
REPLACE INTO `item_db_re` VALUES ('2725','Medal_Merchant','Medal of Honor','5','20','10','0','0','0','1','0','0','263200','63','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bAspdRate,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus3 bAddEff,Eff_Curse,100,ATF_SHORT;','','');
REPLACE INTO `item_db_re` VALUES ('2726','Icarus_Wing','Icarus Wings','5','20','10','100','0','0','0','0','0','2048','58','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
REPLACE INTO `item_db_re` VALUES ('2727','Bowman_Scarf','Bowman Scarf','5','20','10','200','0','0','0','0','0','2048','58','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
+REPLACE INTO `item_db_re` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
REPLACE INTO `item_db_re` VALUES ('2729','Diabolus_Ring','Diabolus Ring','5','20','10','50','0','0','0','0','1','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,100; bonus bMaxSP,100; bonus bHealPower,5; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bVariableCastrate,-1;','','');
-REPLACE INTO `item_db_re` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','4294967294','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bVariableCastrate,-1;','','');
+REPLACE INTO `item_db_re` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
REPLACE INTO `item_db_re` VALUES ('2733','Medal_Gunner','Sheriff Badge','5','20','10','0','0','0','1','0','0','16777216','1','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus3 bAddEff,Eff_Blind,100,ATF_LONG;','','');
REPLACE INTO `item_db_re` VALUES ('2734','Directive_A','Directive','5','0','0','0','0','0','0','0','0','1','47','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2735','Directive_B','Directive','5','0','0','0','0','0','0','0','0','1','47','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','4294967294','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','4294967294','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('2738','Shiny_Coin','Shiny Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,6; bonus2 bAddRace,RC_Boss,6; bonus bMatkRate,6;','','');
REPLACE INTO `item_db_re` VALUES ('2739','Ordinary_Coin','Ordinary Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2740','Rusty_Coin','Rusty Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bMatkRate,3;','','');
@@ -1769,7 +1769,7 @@ REPLACE INTO `item_db_re` VALUES ('2746','Cold_Heart','Cold Heart','5','20','10'
REPLACE INTO `item_db_re` VALUES ('2747','Black_Cat','Black Cat','5','20','10','100','0','0','1','0','0','131072','58','2','136','0','80',NULL,'0','0','0','bonus bDex,3;','','');
REPLACE INTO `item_db_re` VALUES ('2748','Cursed_Star','Cursed Star','5','20','10','200','0','0','0','0','0','526344','58','2','136','0','84',NULL,'0','0','0','bonus bMdef,3; bonus bDex,2; bonus bLuk,-1; bonus2 bHPLossRate,50,10000; bonus3 bAddEff,Eff_Curse,200,ATF_WEAPON|ATF_LONG|ATF_TARGET;','','heal -300,0;');
REPLACE INTO `item_db_re` VALUES ('2749','Linen_Glove','Linen Glove','5','20','10','120','0','0','1','0','1','1040256','58','2','136','0','90',NULL,'0','0','0','bonus bMdef,1; bonus bAgi,2; bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2750','Summer_Night_Dream','Midsummer Night\'s Dream','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2750','Summer_Night_Dream','Midsummer Night\'s Dream','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','skill ALL_DREAM_SUMMERNIGHT,1;','','');
REPLACE INTO `item_db_re` VALUES ('2751','Academy_Badge','Academy Of Badge','5','0','0','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,2; if(BaseLevel<80) { bonus bMaxHP,400; bonus bMaxSP,200; }','','');
REPLACE INTO `item_db_re` VALUES ('2752','Praxinus_C','Praccsinos','5','2','1','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2753','Beholder_Ring','Beholder Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bExpAddRace,RC_Formless,15;','','');
@@ -1791,9 +1791,9 @@ REPLACE INTO `item_db_re` VALUES ('2768','Mage_Figure','Mage Figure','5','0','0'
REPLACE INTO `item_db_re` VALUES ('2769','Archer_Figure','Archer Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bDex,1; if(Class==Job_Archer) bonus bBaseAtk,10;','','');
REPLACE INTO `item_db_re` VALUES ('2770','Thief_Figure','Thief Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,1; if(Class==Job_Thief) bonus bAspdRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2771','Merchant_Figure','Merchant Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; if(Class==Job_Merchant) bonus bCritical,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','4294967294','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bVariableCastrate,-3; bonus bHealPower,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2773','Krieger_Ring2','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','4294967294','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2774','Krieger_Ring3','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bVariableCastrate,-3; bonus bHealPower,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2773','Krieger_Ring2','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2774','Krieger_Ring3','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db_re` VALUES ('2775','Lure','Lure','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2776','Cool_Towel','Adventurer\'s Trusty Towel','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','','sc_start SC_SUMMER,-1,0;','sc_end SC_SUMMER;');
REPLACE INTO `item_db_re` VALUES ('2777','Shaman_Ring','Shaman Ring','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bUseSPrate,-5;','','');
@@ -1848,30 +1848,30 @@ REPLACE INTO `item_db_re` VALUES ('2825','Shaman_EaringB','Shaman Earrings','5',
REPLACE INTO `item_db_re` VALUES ('2826','Dark_Knight_BeltB','Dark Knight Belt','5','20','10','500','0','0','1','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bDex,2; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2827','Dark_Knight_GloveB','Dark Knight Glove','5','20','10','500','0','0','1','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','autobonus \"{ bonus bMaxHPrate,10; }\",10,10000,0,\"{ specialeffect2 EF_POTION_BERSERK; }\";','','');
REPLACE INTO `item_db_re` VALUES ('2828','Upg_Clip','Upg Clip','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHPrate,3; bonus bMaxSP,30;','','');
-REPLACE INTO `item_db_re` VALUES ('2829','Greed_Clip','Greed Clip','5','0','0','0','0','0','0','0','0','4294967294','63','2','136','0','10',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2829','Greed_Clip','Greed Clip','5','0','0','0','0','0','0','0','0','2147483647','63','2','136','0','10',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2830','Magingiorde_C','Ephemeral Magingiorde','5','20','10','0','0','0','2','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,40; bonus bMdef,7;','','');
REPLACE INTO `item_db_re` VALUES ('2831','Brysinggamen_C','Ephemeral Brysinggamen','5','20','10','0','0','0','1','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,6; bonus bInt,6; bonus bVit,6; bonus bAgi,6; bonus bLuk,10; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2832','Freyja_Ring','Freya Ring R','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2833','Odin\'s_Recall','Odin Recall R','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db_re` VALUES ('2834','F_All_In_One_Ring','All In One Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1; bonus bNoCastCancel,0; bonus bVariableCastrate,10; skill AL_HEAL,1; skill AL_TELEPORT,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2835','F_Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2836','F_Glove_C','Rental Glove','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2837','F_Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2838','F_Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2839','F_Ring_C','Ring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2840','F_Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2835','F_Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2836','F_Glove_C','Rental Glove','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2837','F_Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2838','F_Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2839','F_Ring_C','Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2840','F_Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2841','Caracas_Ring','Caracas Ring','5','0','0','0','0','0','2','0','0','327680','56','2','136','0','99',NULL,'0','0','0','bonus bInt,2; bonus bDex,2; bonus bMdef,2; bonus2 bExpAddRace,RC_Boss,10; bonus2 bExpAddRace,RC_NonBoss,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2842','F_Earing_C','Earring','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2842','F_Earing_C','Earring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
REPLACE INTO `item_db_re` VALUES ('2843','Gold_Trickle','Golden Bell','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','75',NULL,'0','0','0','bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('2844','El_Dicastes_Light','Light of El Dicastes','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','80',NULL,'0','0','0','skill RETURN_TO_ELDICASTES,1;','','');
REPLACE INTO `item_db_re` VALUES ('2845','No_Fear_Belt','NoFear Belts','5','0','0','0','0','0','2','0','0','4294967295','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('2846','E_All_In_One_Ring','E All In One Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2847','E_Critical_Ring_C','E Critical Ring C','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2848','E_Glove_C','E Glove C','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2849','E_Safety_Ring_C','E Safety Ring C','5','1','0','0','0','0','5','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2850','E_Ring_C','E Ring C','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2851','E_Necklace_C','E Necklace C','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2852','E_Rosary_C','E Rosary C','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2847','E_Critical_Ring_C','E Critical Ring C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2848','E_Glove_C','E Glove C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2849','E_Safety_Ring_C','E Safety Ring C','5','1','0','0','0','0','5','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2850','E_Ring_C','E Ring C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2851','E_Necklace_C','E Necklace C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2852','E_Rosary_C','E Rosary C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2853','Telekinetic_Orb','Telekinetic Orb','5','20','10','200','0','0','2','0','0','1040256','56','2','136','0','110',NULL,'0','0','0','bonus bMdef,1; bonus bInt,3; bonus bMaxSP,30; bonus2 bSkillAtk,WL_SOULEXPANSION,10; bonus2 bSkillAtk,SO_PSYCHIC_WAVE,10; bonus2 bSkillUseSP,WL_SOULEXPANSION,-50; bonus2 bSkillUseSP,SO_PSYCHIC_WAVE,-50;','','');
REPLACE INTO `item_db_re` VALUES ('2854','Alchemy_Glove','Alchemy Glove','5','20','10','100','0','0','1','0','1','1040256','56','2','136','0','125',NULL,'0','0','0','bonus bMdef,2; bonus bInt,1; bonus3 bAutoSpell,MG_FIREBALL,5,10; bonus5 bAutoSpell,MG_FIREBOLT,5,10,BF_MAGIC,1; bonus2 bSubEle,Ele_Water,-30;','','');
REPLACE INTO `item_db_re` VALUES ('2855','Whike_Black_Tail','Whikebain\'s Black Tail','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','45',NULL,'0','0','0','bonus bCritical,70; bonus bAspdRate,3;','','');
@@ -1887,8 +1887,8 @@ REPLACE INTO `item_db_re` VALUES ('2864','Light_Of_Cure','Light Of Cure','5','20
REPLACE INTO `item_db_re` VALUES ('2865','Seal_Of_Cathedral','Seal Of Cathedral','5','20','10','0','0','0','0','0','0','256','56','2','136','0','110',NULL,'0','0','0','bonus bInt,2; bonus bHealPower,2;','','');
REPLACE INTO `item_db_re` VALUES ('2866','Ring_Of_Archbishop','Ring Of Archbishop','5','20','10','0','0','0','0','0','0','256','56','2','136','0','110',NULL,'0','0','0','bonus bDex,2; bonus bHealPower,2;','','');
REPLACE INTO `item_db_re` VALUES ('2867','Broken_Bamboo_Piece','Broken Bamboo Piece','5','20','10','100','0','0','2','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2868','Green_Batik','Green Batik','5','20','10','100','0','0','1','0','0','4294967294','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bMdef,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2869','Colorful_Ketupat','Colorful Ketupat','5','20','10','100','0','0','0','0','0','4294967294','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2868','Green_Batik','Green Batik','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bMdef,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2869','Colorful_Ketupat','Colorful Ketupat','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('2870','Tw_8th_Anni_Ring','Tw 8th Anni Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('2871','Brazilian_Emblem','Symbol Of Brazil','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','60',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2872','G_Honor_Certificate','G Honor Certificate','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1919,10 +1919,10 @@ REPLACE INTO `item_db_re` VALUES ('2896','Medal_Of_Valor2','Medal Of Valor2','5'
REPLACE INTO `item_db_re` VALUES ('2897','2011RWC_Necklace_J','RWC Necklace','5','0','0','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2898','Black_Rosary','Black Rosary','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('2899','Sound_Amplifier','Sound Amplifier','5','20','10','100','0','0','0','0','1','526336','63','2','136','0','90',NULL,'0','0','0','bonus2 bSkillAtk,WM_METALICSOUND,25; bonus bVariableCastrate,-50;','','');
-REPLACE INTO `item_db_re` VALUES ('2900','Morrigane\'s_Belt_','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','61',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2901','Morrigane\'s_Pendant_','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','1','4294967294','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2902','Morpheus\'s_Ring_','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','1','4294967294','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2903','Morpheus\'s_Armlet_','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','1','4294967294','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2900','Morrigane\'s_Belt_','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','61',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2901','Morrigane\'s_Pendant_','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2902','Morpheus\'s_Ring_','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','1','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2903','Morpheus\'s_Armlet_','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','1','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2904','Naqsh','At Lorient','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2905','Super_Ora_Ora','Ora Ora Very Strong','5','0','0','1000','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2906','Happy_Gauntlet','Gloves of Fortune','5','20','10','1000','0','0','3','0','1','4294967295','63','2','136','0','70',NULL,'0','0','0','bonus bMdef,3;','','');
@@ -2677,53 +2677,53 @@ REPLACE INTO `item_db_re` VALUES ('4867','MHP3','MHP+3%','6','0','0','0','0','0'
REPLACE INTO `item_db_re` VALUES ('4868','MHP4','MHP+4%','6','0','0','0','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxHPrate,4;','','');
REPLACE INTO `item_db_re` VALUES ('4870','SP25','SP+25','6','0','0','0','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxSP,25;','','');
REPLACE INTO `item_db_re` VALUES ('4871','SP75','SP+75','6','0','0','0','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxSP,75;','','');
-REPLACE INTO `item_db_re` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','6','0','0','4294967294','63','2','256','0','0',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db_re` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
REPLACE INTO `item_db_re` VALUES ('5002','Gemmed_Crown','Jewel Crown','5','20','10','600','0','0','9','0','0','414946','63','2','256','0','60',NULL,'1','88','0','bonus bInt,2; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
-REPLACE INTO `item_db_re` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','4294967294','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
-REPLACE INTO `item_db_re` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','4294967294','63','2','512','0','0',NULL,'0','92','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','7','0','0','4294967294','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','94','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','7','0','0','4294967294','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
+REPLACE INTO `item_db_re` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','2147483647','63','2','512','0','0',NULL,'0','92','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','7','0','0','2147483647','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','94','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','7','0','0','2147483647','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5010','Indian_Hair_Piece','Indian Fillet','5','20','10','100','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','96','0','','','');
REPLACE INTO `item_db_re` VALUES ('5011','Antenna','Aerial','5','20','10','100','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','97','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
REPLACE INTO `item_db_re` VALUES ('5013','Horn_Of_Lord_Kaho','Lord Kaho\'s Horn','5','20','10','100','0','0','30','0','0','4294967295','63','2','256','0','0',NULL,'1','99','0','bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20;','','');
REPLACE INTO `item_db_re` VALUES ('5014','Fin_Helm','Fin Helm','5','20','10','300','0','0','5','0','0','16514','63','2','512','0','65',NULL,'0','100','0','','','');
REPLACE INTO `item_db_re` VALUES ('5015','Egg_Shell','Egg Shell','5','20','10','200','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'0','101','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
REPLACE INTO `item_db_re` VALUES ('5017','Bone_Helm','Bone Helm','5','20','10','800','0','0','15','0','0','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
REPLACE INTO `item_db_re` VALUES ('5018','Feather_Bonnet','Feather Bonnet','5','20','10','300','0','0','8','0','0','526344','63','2','256','0','0',NULL,'1','104','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','11','0','0','4294967294','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','11','0','0','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5020','Kafra_Band','Kafra Band','5','20','10','500','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','106','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5021','Bankruptcy_Of_Heart','Grief for Greed','5','20','10','1200','0','0','8','0','0','263200','63','2','256','0','38',NULL,'1','107','0','bonus bInt,1; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5022','Helm_Of_Sun','Hat of the Sun God','5','20','10','2400','0','0','4','0','0','1040256','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db_re` VALUES ('5023','Hat_Of_Bundle','Parcel Hat','5','20','10','1000','0','0','0','0','0','263200','63','2','256','0','0',NULL,'1','108','0','','','');
REPLACE INTO `item_db_re` VALUES ('5024','Hat_Of_Cake','Cake Hat','5','20','10','1000','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','109','0','','','');
REPLACE INTO `item_db_re` VALUES ('5025','Helm_Of_Angel','Helm of Angel','5','20','10','1600','0','0','10','0','0','1040256','63','2','256','0','74',NULL,'1','110','0','bonus bAgi,1; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','3','0','0','4294967294','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','3','0','0','2147483647','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5027','Wizardry_Hat','Mage Hat','5','20','10','300','0','0','2','0','0','8454660','63','2','256','0','0',NULL,'1','112','0','bonus bInt,2; bonus bMaxSP,150;','','');
REPLACE INTO `item_db_re` VALUES ('5028','Candle','Candle','5','20','10','150','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','113','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','6','0','0','4294967294','63','2','256','0','20',NULL,'1','114','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','6','0','0','4294967294','63','2','256','0','40',NULL,'1','115','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','6','0','0','2147483647','63','2','256','0','20',NULL,'1','114','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','6','0','0','2147483647','63','2','256','0','40',NULL,'1','115','0','','','');
REPLACE INTO `item_db_re` VALUES ('5031','Mine_Helm','Mine Hat','5','20','10','1500','0','0','9','0','0','447986','63','2','256','0','55',NULL,'1','116','0','bonus bDex,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','117','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','6','0','0','4294967294','63','2','256','0','50',NULL,'1','118','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','4294967294','63','2','256','0','0',NULL,'1','119','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','3','0','0','4294967294','63','2','256','0','38',NULL,'1','120','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','2','0','0','4294967294','63','2','256','0','10',NULL,'1','121','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','117','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','6','0','0','2147483647','63','2','256','0','50',NULL,'1','118','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','119','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','3','0','0','2147483647','63','2','256','0','38',NULL,'1','120','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','2','0','0','2147483647','63','2','256','0','10',NULL,'1','121','0','','','');
REPLACE INTO `item_db_re` VALUES ('5037','Fruit_Shell','Nut Shell','5','20','10','150','0','0','8','0','0','4294967295','63','2','256','0','5',NULL,'0','122','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','4','0','0','4294967294','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5039','Mottled_Egg_Shell','Rainbow Eggshell','5','20','10','400','0','0','8','0','0','4294967295','63','2','256','0','19',NULL,'0','124','0','','','');
REPLACE INTO `item_db_re` VALUES ('5040','Blush','Blush','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','125','0','','','');
REPLACE INTO `item_db_re` VALUES ('5041','Heart_Hair_Pin','Heart Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','126','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','4294967294','63','2','256','0','14',NULL,'1','127','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','2','0','0','4294967294','63','2','512','0','20',NULL,'0','128','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','2147483647','63','2','256','0','14',NULL,'1','127','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','2','0','0','2147483647','63','2','512','0','20',NULL,'0','128','0','','','');
REPLACE INTO `item_db_re` VALUES ('5044','Devil\'s_Wing','Evil Wing Ears','5','20','10','350','0','0','4','0','0','4294967295','63','2','256','0','45',NULL,'1','129','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5045','Magician_Hat','Magician Hat','5','20','10','500','0','0','6','0','0','8487700','63','2','256','0','50',NULL,'1','130','0','bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5046','Bongun_Hat','Bongun Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','4294967294','63','2','256','0','0',NULL,'1','131','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','131','0','','','');
REPLACE INTO `item_db_re` VALUES ('5048','First_Moon_Hair_Pin','Cresent Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','132','0','','','');
REPLACE INTO `item_db_re` VALUES ('5049','Stripe_Band','Striped Hairband','5','20','10','150','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','133','0','','','');
REPLACE INTO `item_db_re` VALUES ('5050','Mystery_Fruit_Shell','Wonder Nutshell','5','20','10','300','0','0','10','0','0','4294967295','63','2','256','0','30',NULL,'0','134','0','','','');
@@ -2734,22 +2734,22 @@ REPLACE INTO `item_db_re` VALUES ('5054','Assasin_Mask','Assassin Mask','5','20'
REPLACE INTO `item_db_re` VALUES ('5055','Novice_Egg_Cap','Novice False Eggshell','5','1','0','1','0','0','6','0','0','1','47','2','256','0','0',NULL,'0','101','0','','','');
REPLACE INTO `item_db_re` VALUES ('5056','Love_Berry','Fruit of Love','5','1','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','140','0','','','');
REPLACE INTO `item_db_re` VALUES ('5057','Ear_Of_Black_Cat','Black Cat Ears','5','16000','8000','200','0','0','4','0','0','4294967295','63','2','256','0','45',NULL,'1','141','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
REPLACE INTO `item_db_re` VALUES ('5059','Brown_Bear_Cap','Teddybear Hat','5','20','10','800','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'1','143','0','','','');
REPLACE INTO `item_db_re` VALUES ('5060','Party_Hat','Party Hat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5061','Flower_Hairpin','Flower Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','145','0','','','');
REPLACE INTO `item_db_re` VALUES ('5062','Straw_Hat','Straw Hat','5','20','10','200','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'1','146','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','147','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','147','0','','','');
REPLACE INTO `item_db_re` VALUES ('5064','Leaf_Headgear','Smokie Leaf','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','148','0','','','');
REPLACE INTO `item_db_re` VALUES ('5065','Fish_On_Head','Blue Fish','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus2 bAddRace,RC_Fish,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','7','0','0','4294967294','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','8','0','0','4294967294','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','7','0','0','2147483647','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','8','0','0','2147483647','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5068','Ear_Of_Devil\'s_Wing','Evil Wing Ears','5','20','10','100','0','0','3','0','0','4294967295','63','2','512','0','70',NULL,'0','152','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','7','0','0','4294967294','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','7','0','0','2147483647','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('5074','Ear_Of_Angel\'s_Wing','Angel Wing Ears','5','20','10','100','0','0','3','0','0','4294967295','63','2','512','0','70',NULL,'0','158','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5075','Cowboy_Hat','Cowboy Hat','5','20','10','500','0','0','8','0','0','4294967295','63','2','256','0','0',NULL,'1','159','0','','','');
REPLACE INTO `item_db_re` VALUES ('5076','Fur_Hat','Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','160','0','bonus bLuk,1;','','');
@@ -2757,21 +2757,21 @@ REPLACE INTO `item_db_re` VALUES ('5077','Tulip_Hairpin','Tulip Hairpin','5','20
REPLACE INTO `item_db_re` VALUES ('5078','Sea_Otter_Cap','Sea-Otter Hat','5','20','10','800','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'1','162','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5079','Crossed_Hair_Band','X Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','163','0','','','');
REPLACE INTO `item_db_re` VALUES ('5080','Headgear_Of_Queen','Crown of Ancient Queen','5','20','10','400','0','0','8','0','0','4294967295','63','2','256','0','45',NULL,'1','164','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','2','0','0','4294967294','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5082','Mushroom_Band','Decorative Mushroom','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','166','0','','','');
REPLACE INTO `item_db_re` VALUES ('5083','Red_Tailed_Ribbon','Red Ribbon','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','45',NULL,'1','167','0','bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
+REPLACE INTO `item_db_re` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
REPLACE INTO `item_db_re` VALUES ('5085','Pair_Of_Red_Ribbon','Small Ribbons','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','4294967294','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
+REPLACE INTO `item_db_re` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
REPLACE INTO `item_db_re` VALUES ('5087','Goblin_Mask_01','Poker Face','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','171','0','','','');
REPLACE INTO `item_db_re` VALUES ('5088','Goblin_Mask_02','Surprised Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','172','0','','','');
REPLACE INTO `item_db_re` VALUES ('5089','Goblin_Mask_03','Annoyed Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','173','0','','','');
REPLACE INTO `item_db_re` VALUES ('5090','Goblin_Mask_04','Goblin Leader Mask','5','20','10','100','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','174','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','4294967294','63','2','768','0','35',NULL,'1','175','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','','','');
REPLACE INTO `item_db_re` VALUES ('5092','Blue_Coif','Coif','5','150000','75000','300','0','0','5','0','0','4352','63','2','768','0','65',NULL,'1','176','0','','','');
REPLACE INTO `item_db_re` VALUES ('5093','Blue_Coif_','Coif','5','150000','75000','300','0','0','5','0','1','4352','63','2','768','0','65',NULL,'1','177','0','bonus bMaxSP,100;','','');
-REPLACE INTO `item_db_re` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','4294967294','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5095','Orc_Hero_Helm_','Helmet of Orc Hero','5','800000','400000','1000','0','0','5','0','1','4294967294','63','2','768','0','55',NULL,'1','179','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5095','Orc_Hero_Helm_','Helmet of Orc Hero','5','800000','400000','1000','0','0','5','0','1','2147483647','63','2','768','0','55',NULL,'1','179','0','bonus bStr,2; bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5096','Assassin_Mask_','Assassin Mask','5','20','10','100','0','0','1','0','0','4352','63','2','1','0','70',NULL,'0','180','0','','','');
REPLACE INTO `item_db_re` VALUES ('5097','Cone_Hat_','Holiday Hat','5','0','0','400','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','','','');
REPLACE INTO `item_db_re` VALUES ('5098','Tiger_Mask','Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','181','0','bonus bStr,3; bonus bMaxHP,100;','','');
@@ -2779,8 +2779,8 @@ REPLACE INTO `item_db_re` VALUES ('5099','Cat_Hat','Neko Mimi','5','20','10','30
REPLACE INTO `item_db_re` VALUES ('5100','Sales_Signboard','Sales Banner','5','20','10','800','0','0','0','0','0','4294967295','63','2','256','0','75',NULL,'1','183','0','bonus bStr,1; bonus bAgi,1; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5101','Takius_Blindfold','Takius Blindfold','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','184','0','','','');
REPLACE INTO `item_db_re` VALUES ('5102','Round_Eyes','Blank Eyes','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','185','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','2','0','0','4294967294','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','4294967294','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
+REPLACE INTO `item_db_re` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','2','0','0','2147483647','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
REPLACE INTO `item_db_re` VALUES ('5105','Hat_Of_Cake_','2nd Anniversary Hat','5','20','10','1000','0','0','2','0','0','4294967295','63','2','256','0','24',NULL,'1','109','0','bonus bDex,1; bonus bMaxSP,80; bonus3 bAddMonsterDropItem,7864,7,50;','','');
REPLACE INTO `item_db_re` VALUES ('5106','Cone_Hat_INA','2nd Anniversary Hat','5','20','10','300','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','144','0','bonus bUnbreakableHelm,0; bonus bMdef,10; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5107','Well_Baked_Toast','Crunch Toast','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','188','0','','','');
@@ -2797,29 +2797,29 @@ REPLACE INTO `item_db_re` VALUES ('5117','Mistic_Rose','Mystic Rose','5','20','1
REPLACE INTO `item_db_re` VALUES ('5118','Ear_Of_Puppy','Puppy Headband','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','199','0','','','');
REPLACE INTO `item_db_re` VALUES ('5119','Super_Novice_Hat_','Super Novice Hat','5','8500','4250','400','0','0','8','0','1','1','47','2','256','0','40',NULL,'1','193','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db_re` VALUES ('5120','Fedora_','Bucket Hat','5','6000','3000','300','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','195','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','4294967294','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','9','0','0','4294967294','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','6','0','1','4294967294','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','6','0','0','4294967294','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
+REPLACE INTO `item_db_re` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','2147483647','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','9','0','0','2147483647','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','6','0','1','2147483647','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','6','0','0','2147483647','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5125','Kiss_Of_Angel','Angel\'s Kiss','5','10000','5000','300','0','0','6','0','1','1','47','2','256','0','50',NULL,'1','255','0','bonus bSPrecovRate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','3','0','0','4294967294','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','8','0','0','4294967294','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','10','0','0','4294967294','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','3','0','0','2147483647','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','8','0','0','2147483647','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','10','0','0','2147483647','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5129','Bird_Nest','Bird Nest','5','20','10','400','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'0','201','0','bonus bAgi,2; bonus2 bSubRace,RC_Brute,10;','','');
REPLACE INTO `item_db_re` VALUES ('5130','Lion_Mask','Lion Mask','5','20','10','700','0','0','0','0','0','1040256','63','2','768','0','75',NULL,'1','202','0','bonus2 bAddEffWhenHit,Eff_Silence,500; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('5131','Close_Helmet','Close Helmet','5','20','10','1200','0','0','8','0','0','16514','63','2','769','0','75',NULL,'1','203','0','bonus bVit,3; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('5132','Angeling_Hat','Angeling Hat','5','20','10','700','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','204','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5133','Sheep_Hat','Sheep Hat','5','20','10','150','0','0','3','0','0','33040','63','2','256','0','0',NULL,'0','205','0','bonus bShortWeaponDamageReturn,5;','','');
REPLACE INTO `item_db_re` VALUES ('5134','Pumpkin_Hat','Pumpkin-Head','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','206','0','bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','4294967294','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
+REPLACE INTO `item_db_re` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','2147483647','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5136','Santa\'s_Hat_','Antonio\'s Santa Hat','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','1','0','1','4294967294','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','1','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
REPLACE INTO `item_db_re` VALUES ('5138','Magic_Eyes','Magic Eyes','5','20','10','300','0','0','3','0','0','8454660','63','2','256','0','30',NULL,'1','209','0','bonus bMdef,5; bonus bVariableCastrate,-10; bonus bUseSPrate,20;','','');
REPLACE INTO `item_db_re` VALUES ('5139','Hibiscus','Hibiscus','5','20','10','200','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','210','0','bonus bDex,1; bonus bInt,1; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('5140','Charming_Ribbon','Charming Ribbon','5','20','10','400','0','0','2','0','1','4294967295','63','2','256','0','10',NULL,'1','211','0','bonus2 bSubRace,RC_Undead,5; bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','1','0','1','4294967294','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','1','0','1','2147483647','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5142','Crescent_Helm','Crescent Helm','5','20','10','3000','0','0','8','0','0','279714','63','2','768','0','50',NULL,'1','213','0','bonus bVit,1; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','4294967294','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','2147483647','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
REPLACE INTO `item_db_re` VALUES ('5144','Gambler_Hat','Gamble Hat','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('5145','Carnival_Joker_Jester','Carnival Joker Jester','5','10','5','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','89','0','','','');
REPLACE INTO `item_db_re` VALUES ('5146','Elephant_Hat','Elephant Hat','5','0','0','500','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,7; skill WZ_WATERBALL,1;','','');
@@ -2835,18 +2835,18 @@ REPLACE INTO `item_db_re` VALUES ('5155','Granpa_Beard_F','Father\'s White Moust
REPLACE INTO `item_db_re` VALUES ('5156','Flu_Mask_F','Father\'s Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus bMatkRate,1;','','');
REPLACE INTO `item_db_re` VALUES ('5157','Viking_Helm_','Orc Helm','5','20','10','500','0','0','9','0','1','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db_re` VALUES ('5158','Holy_Bonnet_','Monk Hat','5','30000','15000','100','0','0','10','0','1','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','9','0','1','4294967294','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','9','0','1','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5160','Magestic_Goat_','Magestic Goat','5','20','10','800','0','0','9','0','1','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5161','Sharp_Gear_','Spiky Band','5','20','10','1000','0','0','12','0','1','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db_re` VALUES ('5162','Bone_Helm_','Bone Helm','5','20','10','800','0','0','15','0','1','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
-REPLACE INTO `item_db_re` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','10','0','1','4294967294','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','7','0','1','4294967294','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','7','0','1','4294967294','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','10','0','1','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','7','0','1','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','7','0','1','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5166','Spinx_Helm_','Sphinx Hat','5','20','10','3000','0','0','5','0','1','16514','63','2','257','0','65',NULL,'0','137','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5167','Munak_Turban_','Munak Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db_re` VALUES ('5168','Bongun_Hat_','Bongun Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
REPLACE INTO `item_db_re` VALUES ('5169','Bride_Mask','Bride Mask','5','30000','15000','500','0','0','4','0','1','4294967295','63','2','768','0','40',NULL,'1','223','0','if(BaseClass==Job_Taekwon) { bonus bLuk,2; bonus bCritical,5; }','','');
-REPLACE INTO `item_db_re` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5171','Valkyrie_Helm','Valkyrie Helm','5','100000','50000','1000','0','0','10','0','1','1040382','58','2','256','0','0',NULL,'1','225','0','bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('5172','Beret','Beret','5','30000','15000','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','226','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5173','Satto_Hat','Magistrate Hat','5','30000','15000','400','0','0','6','0','1','4294967295','63','2','256','0','60',NULL,'1','227','0','if(BaseClass==Job_Taekwon) { bonus bAgi,1; bonus bHPrecovRate,3; }','','');
@@ -2860,7 +2860,7 @@ REPLACE INTO `item_db_re` VALUES ('5180','Phrygian_Cap_','France Holiday Hat','5
REPLACE INTO `item_db_re` VALUES ('5181','Helm_Of_Darkness','Helm of Darkness','5','20','10','500','0','0','3','0','1','414946','63','2','768','0','50',NULL,'1','233','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5182','Puppy_Hat','Puppy Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','30',NULL,'0','234','0','bonus bAgi,1; bonus3 bAutoSpell,PR_GLORIA,1,10+20*(readparam(bAgi)>=77);','','');
REPLACE INTO `item_db_re` VALUES ('5183','Bird_Nest_Hat','Bird Nest Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','10',NULL,'1','235','0','bonus bDex,1; bonus bAgi,1; bonus2 bResEff,Eff_Stun,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','8','0','0','4294967294','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','8','0','0','2147483647','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
REPLACE INTO `item_db_re` VALUES ('5185','Laurel_Wreath','Laurel Wreath','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','10',NULL,'1','237','0','bonus bLuk,3; bonus2 bResEff,Eff_Blind,500; bonus2 bResEff,Eff_Curse,500;','','');
REPLACE INTO `item_db_re` VALUES ('5186','Geographer_Band','Geographer Band','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','30',NULL,'0','238','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5187','Twin_Ribbon','Twin Red Ribbon','5','20','10','200','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','239','0','bonus bMaxSP,30; bonus bMdef,3; bonus3 bAutoSpellWhenHit,NPC_STONESKIN,6,10; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,6,120,BF_MAGIC,0;','','');
@@ -2882,35 +2882,35 @@ REPLACE INTO `item_db_re` VALUES ('5202','Pumpkin_Hat_','Fantastic Pumpkin-Head'
REPLACE INTO `item_db_re` VALUES ('5203','Tongue_Mask','Smiling Mask','5','20','10','200','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','253','0','bonus bSpeedRate,25;','','');
REPLACE INTO `item_db_re` VALUES ('5204','Event_Pierrot_Nose','Rudolph\'s Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','bonus2 bResEff,Eff_Blind,3000; bonus2 bAddMonsterDropItem,12130,30;','','');
REPLACE INTO `item_db_re` VALUES ('5205','Wreath','Emperor\'s Laurel Crown','5','20','10','1000','0','0','3','0','0','4294967295','63','2','768','0','0',NULL,'1','261','0','bonus bAllStats,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
REPLACE INTO `item_db_re` VALUES ('5207','Gold_Spirit_Chain','Angel Blessing','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','260','0','bonus bLuk,1; bonus2 bSubEle,Ele_Holy,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','3','0','1','4294967294','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
+REPLACE INTO `item_db_re` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','3','0','1','2147483647','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
REPLACE INTO `item_db_re` VALUES ('5209','Yellow_Baseball_Cap','Love Dad Cap','5','20','10','300','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','263','0','','','');
REPLACE INTO `item_db_re` VALUES ('5210','Flying_Angel','Flapping Angel Wing','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bVariableCastrate,-3; bonus bAspdRate,3; bonus bInt,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5211','Dress_Hat','Dress Hat','5','0','0','200','0','0','3','0','1','4294967295','63','2','256','0','20',NULL,'1','265','0','bonus bMdef,7; bonus bStr,1; bonus bInt,1; bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bHealPower,5; if(getrefine()>=7) { bonus2 bAddRace,RC_NonBoss,1; bonus2 bAddRace,RC_Boss,1; bonus bMatkRate,1; bonus bHealPower,1; }','','');
REPLACE INTO `item_db_re` VALUES ('5212','Satellite_Hairband','Satellite Hairband','5','0','0','1000','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','266','0','bonus bMaxHP,50; bonus bMaxSP,10; skill AL_RUWACH,1;','','sc_end SC_RUWACH;');
REPLACE INTO `item_db_re` VALUES ('5213','Black_Bunny_Band','Sheila Hairnet','5','0','0','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','267','0','bonus bAgi,2; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5214','Moonlight_Flower_Hat','Moonlight Flower Hat','5','0','0','200','0','0','3','0','0','4294967295','63','2','768','0','0',NULL,'1','268','0','bonus bDex,2; bonus3 bAutoSpell,AL_INCAGI,1,50;','','');
-REPLACE INTO `item_db_re` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','4','0','0','4294967294','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','6','0','0','4294967294','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db_re` VALUES ('5217','Magestic_Goat_TW','Evolved Magestic Goat','5','20','10','800','0','0','10','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5218','Bunny_Band_','Evolved Bunny Band','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','15','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db_re` VALUES ('5221','Pair_Of_Red_Ribbon_','Evolved Pair of Red Ribbon','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('5222','Fish_On_Head_','Evolved Blue Fish','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus bAgi,1; bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','4294967294','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','4294967294','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('5225','Marcher_Hat','Parade Hat','5','20','10','200','0','0','4','0','1','4294967295','63','2','256','0','10',NULL,'1','269','0','bonus bMdef,2; bonus bStr,2; bonus4 bAutoSpellWhenHit,AL_ANGELUS,5,30,0; bonus4 bAutoSpellWhenHit,HP_ASSUMPTIO,1,1,0; bonus2 bResEff,Eff_Stun,1000; if(BaseClass==Job_Acolyte) bonus4 bAutoSpellOnSkill,AL_HEAL,PR_LEXAETERNA,1,1000;','','');
REPLACE INTO `item_db_re` VALUES ('5226','Mini_Propeller_','Mini Propeller','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bAgi,2; bonus bDex,1; bonus bFlee,10; bonus bVariableCastrate,-getrefine();','','');
-REPLACE INTO `item_db_re` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','4','0','0','4294967294','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','4','0','0','4294967294','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','4','0','0','4294967294','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('5235','Gray_Fur_Hat','Brown Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','279','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5236','Blue_Fur_Hat','Blue Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','280','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5237','Pink_Fur_Hat','Pink Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','281','0','bonus bLuk,1;','','');
@@ -2933,18 +2933,18 @@ REPLACE INTO `item_db_re` VALUES ('5253','Lif_Doll_Hat','Lif Doll Hat','5','20',
REPLACE INTO `item_db_re` VALUES ('5254','Deviling_Hat','Deviling Hat','5','20','10','500','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','298','0','bonus bStr,1; bonus bCritical,3; bonus2 bSubRace,RC_Angel,-20; if(getrefine()>=6) { bonus bCritical,getrefine()-5; }','','');
REPLACE INTO `item_db_re` VALUES ('5255','Triple_Poring_Hat','Triple Poring Hat','5','20','10','600','0','0','6','0','0','4294967295','63','2','256','0','20',NULL,'0','299','0','bonus bLuk,3; bonus3 bAutoSpell,BS_GREED,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5256','Valkyrie_Feather_Band','Valkyrie Feather Band','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','20',NULL,'1','300','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','3','0','0','4294967294','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
REPLACE INTO `item_db_re` VALUES ('5258','Afro_Wig','Afro Wig','5','20','10','100','0','0','0','0','1','4294967295','63','2','768','0','10',NULL,'1','302','0','bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,300; bonus2 bSubEle,Ele_Neutral,1;','','');
REPLACE INTO `item_db_re` VALUES ('5259','Elephant_Hat_','Elephant Hat','5','20','10','500','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus3 bAutoSpell,WZ_WATERBALL,3,10; skill AL_HOLYWATER,1;','','');
REPLACE INTO `item_db_re` VALUES ('5260','Cookie_Hat','Cookie Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','217','0','bonus bAgi,1; bonus bFlee2,5; bonus bCritAtkRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('5261','Silver_Tiara_','Silver Tiara','5','20','10','500','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','218','0','bonus bInt,2; if(BaseClass==Job_Mage) bonus bMatkRate,(JobLevel/20); if(BaseClass==Job_Acolyte) bonus bUseSPrate,-(JobLevel/10); if(BaseClass==Job_Archer) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db_re` VALUES ('5262','Gold_Tiara_','Golden Tiara','5','20','10','500','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','232','0','bonus bStr,2; bonus bUnbreakableHelm,0; if((readparam(bDex)<56)&&(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief)) bonus bDex,JobLevel/7;','','');
-REPLACE INTO `item_db_re` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','4294967294','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','2147483647','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
REPLACE INTO `item_db_re` VALUES ('5264','Aussie_Flag_Hat','Australian Flag Hat','5','20','10','500','0','0','8','0','0','4294967295','63','2','256','0','0',NULL,'1','304','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5265','Apple_Of_Archer_C','Rental Apple of Archer','5','1','0','0','0','0','12','0','0','4294967294','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5265','Apple_Of_Archer_C','Rental Apple of Archer','5','1','0','0','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
REPLACE INTO `item_db_re` VALUES ('5266','Bunny_Band_C','Rental Bunny Band','5','1','0','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','15','0','bonus bMdef,5; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5267','Sahkkat_C','Sahkkat C','5','1','0','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','bonus bAgi,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','12','0','0','4294967294','63','2','256','0','0',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
REPLACE INTO `item_db_re` VALUES ('5269','Flying_Angel_','Flapping Angel Wing','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1; bonus bAspdRate,3; bonus bSpeedRate,25;','','');
REPLACE INTO `item_db_re` VALUES ('5270','Fallen_Leaves_','Autumn Leaves','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','241','0','bonus bFlee2,5;','','');
REPLACE INTO `item_db_re` VALUES ('5271','Chinese_Crown_','Phoenix Crown','5','20','10','500','0','0','4','0','1','4294967295','63','2','768','0','0',NULL,'1','221','0','bonus bMdef,3; bonus2 bSubRace,RC_Boss,getrefine();','','');
@@ -2953,11 +2953,11 @@ REPLACE INTO `item_db_re` VALUES ('5273','Happy_Wig','Happy Wig','5','20','10','
REPLACE INTO `item_db_re` VALUES ('5274','Shiny_Wig','Shiny Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','306','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db_re` VALUES ('5275','Marvelous_Wig','Marvelous Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db_re` VALUES ('5276','Fantastic_Wig','Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
-REPLACE INTO `item_db_re` VALUES ('5277','Yellow_Bandana','Air Pirate\'s Bandana','5','20','10','100','0','0','2','0','0','4294967294','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','2','0','0','4294967294','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
-REPLACE INTO `item_db_re` VALUES ('5280','Magestic_Goat_C','Baphomet Horns','5','2','1','0','0','0','10','0','0','4294967294','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','4','0','0','4294967294','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5277','Yellow_Bandana','Air Pirate\'s Bandana','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5280','Magestic_Goat_C','Baphomet Horns','5','2','1','0','0','0','10','0','0','2147483647','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5282','euRO_Baseball_Cap','Europe Baseball Cap','5','0','0','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','216','0','','','');
REPLACE INTO `item_db_re` VALUES ('5283','Chick_Hat','Chick Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2; bonus bMaxHP,50; bonus bMaxSP,50; skill TF_DOUBLE,2; bonus bDoubleRate,10; bonus2 bSubRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db_re` VALUES ('5284','Water_Lily_Crown','Water Lily Crown','5','20','10','200','0','0','0','0','1','4294967295','63','2','256','0','30',NULL,'0','312','0','bonus bDex,1; bonus bAgi,1; bonus bMdef,3; bonus bHPrecovRate,5; bonus bSPrecovRate,3;','','');
@@ -2976,13 +2976,13 @@ REPLACE INTO `item_db_re` VALUES ('5296','Drooping_Nine_Tail_','Drooping Nine Ta
REPLACE INTO `item_db_re` VALUES ('5297','Soulless_Wing_','Soul Wing','5','20','10','300','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','301','0','bonus bAllStats,1; bonus2 bSPRegenRate,2,10000;','','');
REPLACE INTO `item_db_re` VALUES ('5298','Marvelous_Wig_','Dokebi\'s Wig','5','20','10','100','0','0','1','0','1','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,-5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db_re` VALUES ('5299','Ati_Atihan_Hat_','Pagdayaw','5','20','10','100','0','0','1','0','1','4294967295','63','2','769','0','0',NULL,'1','303','0','bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
-REPLACE INTO `item_db_re` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','4','0','0','4294967294','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
+REPLACE INTO `item_db_re` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
REPLACE INTO `item_db_re` VALUES ('5301','Russian_Ribbon','Victory Hairband','5','0','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','323','0','','','');
REPLACE INTO `item_db_re` VALUES ('5302','Lotus_Flower_Hat','Water Lily Hat','5','0','0','100','0','0','2','0','0','4294967295','63','2','256','0','30',NULL,'1','324','0','','','');
REPLACE INTO `item_db_re` VALUES ('5303','Flower_Coronet','Flower Crown','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','325','0','bonus bMdef,5; bonus bMaxHP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5304','Cap_Of_Blindness','Cap Of Blindness','5','20','10','800','0','0','4','0','1','4294967295','63','2','769','0','30',NULL,'1','326','0','bonus2 bResEff,Eff_Curse,700; bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db_re` VALUES ('5305','Pirate_Dagger','Pirate Dagger','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','327','0','bonus bBaseAtk,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5306','Freyja_Crown','Freyja Crown','5','0','0','500','0','0','20','0','0','4294967294','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5306','Freyja_Crown','Freyja Crown','5','0','0','500','0','0','20','0','0','2147483647','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('5307','Carmen_Miranda\'s_Hat','Carmen Miranda\'s Hat','5','20','10','400','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','329','0','bonus bMdef,3; bonus3 bAutoSpellWhenHit,DC_WINKCHARM,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5308','Brazilian_Flag_Hat','Brazilian Flag Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','330','0','bonus bSpeedAddRate,25;','','');
REPLACE INTO `item_db_re` VALUES ('5309','Mahican','Wool Mask','5','20','10','200','0','0','1','0','0','4294967295','63','2','769','0','0',NULL,'1','331','0','skill RG_GRAFFITI,1;','','');
@@ -2996,18 +2996,18 @@ REPLACE INTO `item_db_re` VALUES ('5316','Umbrella_Hat','Umbrella Hat','5','20',
REPLACE INTO `item_db_re` VALUES ('5317','Fisherman_Hat','Fisherman Hat','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','50',NULL,'1','339','0','bonus3 bAutoSpell,WZ_WATERBALL,3,50;','','');
REPLACE INTO `item_db_re` VALUES ('5318','Poring_Party_Hat','Poring Party Hat','5','20','10','0','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','340','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db_re` VALUES ('5319','Hellomother_Hat','Arc Angeling Hat','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','341','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','8','0','0','4294967294','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','8','0','0','2147483647','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
REPLACE INTO `item_db_re` VALUES ('5321','Indonesian_Bandana','Indonesian Bandana','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','342','0','','','');
REPLACE INTO `item_db_re` VALUES ('5322','Scarf','Scarf','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','24',NULL,'1','343','0','bonus bMdef,2; bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('5323','Misstrance_Crown','Misstrance Crown','5','20','10','0','0','0','14','0','0','4294967295','63','2','256','0','0',NULL,'0','165','0','bonus bAllStats,2;','','');
REPLACE INTO `item_db_re` VALUES ('5324','Little_Angel_Doll','Little Angel Doll','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','10',NULL,'1','344','0','bonus bDex,3; bonus4 bAutoSpellWhenHit,CR_GRANDCROSS,3,30,0;','','');
REPLACE INTO `item_db_re` VALUES ('5325','Robo_Eye','Robo Eye','5','20','10','200','0','0','2','0','0','4294967295','63','2','512','0','10',NULL,'0','345','0','bonus bUnbreakableHelm,0; bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5326','Masquerade_C','Masquerade C','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db_re` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','4294967294','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','2147483647','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
REPLACE INTO `item_db_re` VALUES ('5328','Evil_Wing_Ears_C','Evil Wing Ears C','5','1','0','0','0','0','4','0','0','4294967295','63','2','512','0','0',NULL,'0','152','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5329','Dark_Blindfold_C','Costume: Dark Blindfold','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,500;','','');
-REPLACE INTO `item_db_re` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','9','0','0','4294967294','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','14','0','0','4294967294','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','9','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db_re` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','14','0','0','2147483647','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
REPLACE INTO `item_db_re` VALUES ('5332','Loki_Mask','Loki Mask','5','0','0','200','0','0','2','0','0','4294967295','63','2','513','0','20',NULL,'0','346','0','bonus bFlee2,3;','','');
REPLACE INTO `item_db_re` VALUES ('5333','Radio_Antenna','Radio Antenna','5','0','0','1500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','347','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; skill MG_LIGHTNINGBOLT,1; bonus4 bAutoSpellWhenHit,MG_THUNDERSTORM,5,30,1;','','');
REPLACE INTO `item_db_re` VALUES ('5334','Angeling_Wanna_Fly','Flapping Angeling','5','0','0','700','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','348','0','bonus bDex,1; bonus bLuk,2; bonus bMdef,2;','','');
@@ -3023,12 +3023,12 @@ REPLACE INTO `item_db_re` VALUES ('5343','Tayelin_Doll_Hat','Telling Doll Hat','
REPLACE INTO `item_db_re` VALUES ('5344','Binit_Doll_Hat','Bennit Doll Hat','5','0','0','500','0','0','1','0','1','4294967295','63','2','256','0','60',NULL,'0','358','0','bonus2 bSubRace,RC_DemiHuman,5; autobonus \"{ bonus bAspdRate,5; }\",20,30000,0,\"{ specialeffect2 EF_HASTEUP; }\";','','');
REPLACE INTO `item_db_re` VALUES ('5345','Debril_Doll_Hat','W Doll Hat','5','0','0','500','0','0','1','0','1','4294967295','63','2','256','0','60',NULL,'0','359','0','bonus2 bSubRace,RC_DemiHuman,5; bonus2 bAddRace,RC_Undead,5; bonus2 bMagicAddRace,RC_Undead,5;','','');
REPLACE INTO `item_db_re` VALUES ('5346','Gf_Recruiter_Hat','Gf Recruiter Hat','5','0','0','0','0','0','4','0','0','4294967295','63','2','256','0','10',NULL,'1','360','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','5','0','1','4294967294','63','2','256','0','0',NULL,'1','98','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','102','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','4','0','1','4294967294','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','5','0','1','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5351','Sunflower_','Sunflower','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','4','0','0','4294967294','63','2','256','0','38',NULL,'1','361','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','4','0','0','2147483647','63','2','256','0','38',NULL,'1','361','0','','','');
REPLACE INTO `item_db_re` VALUES ('5353','Helm_Of_Sun_','Hat of the Sun God','5','20','10','2400','0','0','4','0','1','1040256','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2; bonus5 bAutoSpellWhenHit,HP_ASSUMPTIO,1,1,BF_WEAPON|BF_MAGIC,0;','','');
REPLACE INTO `item_db_re` VALUES ('5354','Muslim_Hat_M','Muslim Hat M','5','0','0','100','0','0','4','0','0','4294967295','63','1','256','0','0',NULL,'0','362','0','bonus bVariableCastrate,-5;','','');
REPLACE INTO `item_db_re` VALUES ('5355','Muslim_Hat_F','Selendang','5','0','0','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'0','363','0','bonus bVariableCastrate,-5;','','');
@@ -3059,7 +3059,7 @@ REPLACE INTO `item_db_re` VALUES ('5379','Balloon_Hat','Tam','5','0','0','800','
REPLACE INTO `item_db_re` VALUES ('5380','Fish_Head_Hat','Fish Head Hat','5','20','10','400','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','386','0','bonus3 bAutoSpell,SA_FROSTWEAPON,1,5;','','');
REPLACE INTO `item_db_re` VALUES ('5381','Santa_Poring_Hat','Santa Poring Hat','5','20','10','100','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'0','387','0','bonus bMdef,2; bonus2 bAddEle,Ele_Dark,3; bonus2 bSubEle,Ele_Dark,3;','','');
REPLACE INTO `item_db_re` VALUES ('5382','Bell_Ribbon','Bell Ribbon','5','20','10','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','388','0','bonus bVit,1; skill AL_ANGELUS,1;','','sc_end SC_ANGELUS;');
-REPLACE INTO `item_db_re` VALUES ('5383','Hunting_Cap','Hunting Cap','5','20','10','250','0','0','6','0','1','4294967294','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5383','Hunting_Cap','Hunting Cap','5','20','10','250','0','0','6','0','1','2147483647','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('5384','Santa_Hat_1','Twin Pom Santa','5','20','10','200','0','0','4','0','1','4294967295','63','2','256','0','20',NULL,'1','390','0','bonus bLuk,3; skill WZ_ESTIMATION,1; bonus3 bAutoSpell,AL_INCAGI,1,500;','','');
REPLACE INTO `item_db_re` VALUES ('5385','Yoyo_Hat','Yoyo Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','20',NULL,'1','391','0','skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db_re` VALUES ('5386','Ayam_','New Year\'s Hat','5','0','0','70','0','0','7','0','0','4294967295','63','2','256','0','0',NULL,'0','228','0','bonus bMdef,7; bonus bFlee,7; bonus2 bAddMonsterDropItem,12198,200;','','');
@@ -3092,12 +3092,12 @@ REPLACE INTO `item_db_re` VALUES ('5412','Sweet_Candy','Lollipop','5','20','10',
REPLACE INTO `item_db_re` VALUES ('5413','Popcorn_Hat','Popcorn Hat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'0','415','0','bonus2 bSubEle,Ele_Wind,10;','','');
REPLACE INTO `item_db_re` VALUES ('5414','Campfire_Hat','Campfire Hat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'0','416','0','bonus2 bSubEle,Ele_Fire,10; bonus4 bAutoSpellWhenHit,MG_FIREBALL,5,100,1;','','');
REPLACE INTO `item_db_re` VALUES ('5415','Poring_Cake_Cap','Poring Cake Hat','5','20','10','1000','0','0','10','0','0','4294967295','63','2','256','0','40',NULL,'1','417','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; bonus bFlee2,5; bonus bAspdRate,5; bonus bVariableCastrate,-5; bonus bDelayrate,-5;','','');
-REPLACE INTO `item_db_re` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','4','0','0','4294967294','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','4','0','0','2147483647','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
REPLACE INTO `item_db_re` VALUES ('5417','Crown_Parrot','Crown Parrots','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'0','419','0','bonus bInt,1; bonus2 bResEff,Eff_Silence,10000; bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5418','Soldier_Hat','Soldier Hat','5','20','10','400','0','0','8','0','1','4294967295','63','2','256','0','0',NULL,'1','420','0','bonus bStr,1; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bUseSPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('5419','Evolved_Leaf','Leaves Of Grass','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','57','0','bonus bUnbreakableHelm,0; bonus bVit,1; bonus2 bSubRace,RC_Plant,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5420','Mask_Of_Ifrit','Ifrit Mask','5','20','10','800','0','0','12','0','1','4294967294','63','2','769','0','50',NULL,'0','421','0','bonus bStr,2; bonus bInt,2; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
-REPLACE INTO `item_db_re` VALUES ('5421','Ifrit\'s_Ear','Ifrit\'s Ears','5','20','10','300','0','0','0','0','0','4294967294','63','2','512','0','50',NULL,'0','422','0','bonus bUnbreakableHelm,0; bonus bInt,1; bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
+REPLACE INTO `item_db_re` VALUES ('5420','Mask_Of_Ifrit','Ifrit Mask','5','20','10','800','0','0','12','0','1','2147483647','63','2','769','0','50',NULL,'0','421','0','bonus bStr,2; bonus bInt,2; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
+REPLACE INTO `item_db_re` VALUES ('5421','Ifrit\'s_Ear','Ifrit\'s Ears','5','20','10','300','0','0','0','0','0','2147483647','63','2','512','0','50',NULL,'0','422','0','bonus bUnbreakableHelm,0; bonus bInt,1; bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db_re` VALUES ('5422','Linguistic_Book_Cap','Linguistic Book Hat','5','20','10','70','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','423','0','bonus bInt,1; bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('5423','Lovecap_China','I LOVE CHINA','5','20','10','250','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','424','0','bonus bDex,3; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5424','Fanta_Orange_Can','Fanta Orange Can Hat','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','425','0','','','');
@@ -3114,10 +3114,10 @@ REPLACE INTO `item_db_re` VALUES ('5434','Cola_Can','Coca-Cola Bottle','5','20',
REPLACE INTO `item_db_re` VALUES ('5435','Coke_Hat','Coca-Cola Hat','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','40',NULL,'1','436','0','bonus bInt,1; bonus bMaxSP,80; bonus bMdef,3; if(getrefine()>5) { bonus bMdef,getrefine()-5; bonus bMaxSP,(getrefine()-5)*10; }','','');
REPLACE INTO `item_db_re` VALUES ('5436','Bride\'s_Corolla','Bride\'s Corolla','5','20','10','200','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','437','0','bonus bLuk,3; bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('5437','Flower_Of_Fairy','Fairy Flower','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','438','0','bonus bInt,1; bonus bMdef,1; bonus2 bSubRace,RC_Insect,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db_re` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db_re` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db_re` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db_re` VALUES ('5442','Necktie','Necktie','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','70',NULL,'1','443','0','bonus bVit,1; bonus bHit,-5; bonus bUseSPrate,5;','','');
REPLACE INTO `item_db_re` VALUES ('5443','Status_Of_Baby_Angel','Statue Of Baby Angel','5','20','10','600','0','0','6','0','1','4294967295','63','2','256','0','70',NULL,'1','444','0','bonus bMdef,2; bonus4 bAutoSpellWhenHit,PR_STRECOVERY,1,20,0;','','');
REPLACE INTO `item_db_re` VALUES ('5444','Hair_Brush','Hair Brush','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','445','0','bonus bCritical,6;','','');
@@ -3126,7 +3126,7 @@ REPLACE INTO `item_db_re` VALUES ('5446','Cat_Foot_Hairpin','Catfoot Hairpin','5
REPLACE INTO `item_db_re` VALUES ('5447','Frog_Cap','Frog Hat','5','20','10','500','0','0','6','0','0','4294967295','63','2','256','0','70',NULL,'1','448','0','bonus bMdef,1; bonus2 bAddRace,RC_Insect,12; bonus2 bMagicAddRace,RC_Insect,12;','','');
REPLACE INTO `item_db_re` VALUES ('5448','Solo_Play_Box1','Indifferent Solo Hat','5','20','10','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','449','0','skill RG_GRAFFITI,1;','','');
REPLACE INTO `item_db_re` VALUES ('5449','Solo_Play_Box2','Angry Solo Hat','5','20','10','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','450','0','skill RG_GRAFFITI,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','4294967294','63','2','256','0','20',NULL,'1','451','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','2147483647','63','2','256','0','20',NULL,'1','451','0','','','');
REPLACE INTO `item_db_re` VALUES ('5451','Dragonhelm_Gold','Gold Dragonhelm','5','20','10','1500','0','0','14','0','1','4294967295','63','2','256','0','0',NULL,'0','452','0','bonus bAspdRate,10; bonus bAllStats,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('5452','Dragonhelm_Silver','Silver Dragonhelm','5','20','10','1500','0','0','10','0','1','4294967295','63','2','256','0','0',NULL,'0','453','0','bonus bAspdRate,7; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db_re` VALUES ('5453','Dragonhelm_Copper','Copper Dragonhelm','5','20','10','1500','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'0','454','0','bonus bAspdRate,5; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,1;','','');
@@ -3168,12 +3168,12 @@ REPLACE INTO `item_db_re` VALUES ('5488','J_Twin_Santahat','Cute Santa Hat','5',
REPLACE INTO `item_db_re` VALUES ('5489','Love_Daddy','Love Daddy Hat','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','484','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('5490','Anubis_Helm','Anubis Helm','5','20','10','0','0','0','8','0','0','4294967295','63','2','768','0','65',NULL,'0','485','0','bonus bUnbreakableHelm,0; bonus bMdef,5; bonus2 bSubRace,RC_Boss,10; bonus bHealPower2,10; bonus bAddItemHealRate,10;','','');
REPLACE INTO `item_db_re` VALUES ('5491','Hat_Of_Outlaw','Bandit Hat','5','20','10','800','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','486','0','bonus bStr,2; bonus2 bSubEle,Ele_Fire,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','10','0','0','4294967294','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','12','0','0','4294967294','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','10','0','0','2147483647','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5494','Spinx_Helm_I','Sphinx Hat','5','0','0','0','0','0','10','0','0','16514','63','2','257','0','0',NULL,'0','137','0','bonus bStr,5;','','');
REPLACE INTO `item_db_re` VALUES ('5495','Power_Of_Thor','Power Of Thor','5','20','10','100','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','493','0','bonus bLuk,1; bonus bAgi,1; bonus bVit,1; bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bMdef,3; bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('5496','Dice_Hat','Dice Hat','5','20','10','300','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'0','494','0','bonus bLuk,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5497','King_Tiger_Doll_Hat','Edgga Doll','5','20','10','400','0','0','6','0','1','4294967294','63','2','256','0','0',NULL,'1','495','0','bonus bDex,2; bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5497','King_Tiger_Doll_Hat','Edgga Doll','5','20','10','400','0','0','6','0','1','2147483647','63','2','256','0','0',NULL,'1','495','0','bonus bDex,2; bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5498','Wondering_Wolf_Helm','Vagabond Wolf Hat','5','20','10','600','0','0','5','0','0','4294967295','63','2','768','0','20',NULL,'0','490','0','bonus bVit,5; bonus bFlee,10;','','');
REPLACE INTO `item_db_re` VALUES ('5499','Pizza_Hat','Pizza Pie of Plenty','5','20','10','600','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','487','0','skill SM_PROVOKE,1;','','');
REPLACE INTO `item_db_re` VALUES ('5500','Icecream_Hat','Ice Cream Hat','5','20','10','300','0','0','6','0','0','4294967295','63','2','256','0','30',NULL,'1','488','0','bonus bMdef,3; skill MG_FROSTDIVER,3;','','');
@@ -3204,7 +3204,7 @@ REPLACE INTO `item_db_re` VALUES ('5524','Sakura_Milk_Tea_Hat','Sakura Milk Tea
REPLACE INTO `item_db_re` VALUES ('5525','First_Leaf_Tea_Hat','First Leaf Tea Hat','5','20','10','100','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','519','0','bonus bMaxHP,80; bonus bMaxSP,20;','','');
REPLACE INTO `item_db_re` VALUES ('5526','Lady_Tanee_Doll','Lady Tanee Doll','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','60',NULL,'0','520','0','bonus bAgi,2; bonus bFlee,3; bonus2 bSubEle,Ele_Wind,5; bonus2 bAddMonsterDropItem,513,200;','','');
REPLACE INTO `item_db_re` VALUES ('5527','Lunatic_Hat','Lunatic Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','521','0','bonus bLuk,3; bonus bMdef,2; bonus bFlee2,5; bonus2 bAddMonsterDropItem,622,50;','','');
-REPLACE INTO `item_db_re` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','4294967294','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','2147483647','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5529','Evil\'s_Bone_Hat','Frost Giant\'s Skull','5','20','10','600','0','0','12','0','1','4294967295','63','2','768','0','0',NULL,'1','523','0','bonus bMdef,2; bonus bInt,2; bonus bStr,2; bonus bDex,3; bonus2 bSubEle,Ele_Neutral,5; skill WZ_FROSTNOVA,1;','','');
REPLACE INTO `item_db_re` VALUES ('5530','Raven_Cap','Raven Cap','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','524','0','','','');
REPLACE INTO `item_db_re` VALUES ('5531','B_Dragon_Hat','Baby Dragon Hat','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','525','0','','','');
@@ -3233,7 +3233,7 @@ REPLACE INTO `item_db_re` VALUES ('5553','Fest_Bunny_Band','Festival Bunny Band'
REPLACE INTO `item_db_re` VALUES ('5554','Octopus_Hat','Octopus Hat','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','538','0','bonus bMdef,3; bonus3 bAutoSpell,SM_PROVOKE,5,10; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5555','Leaf_Cat_Hat','Leaf Cat Hat','5','20','10','100','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'1','539','0','bonus bAgi,2; bonus3 bAutoSpellWhenHit,AL_HEAL,3,10;','','');
REPLACE INTO `item_db_re` VALUES ('5556','Fur_Seal_Hat','Seal Hat','5','20','10','500','0','0','5','0','0','4294967295','63','2','768','0','0',NULL,'1','540','0','bonus bInt,1; bonus3 bAutoSpell,WZ_FROSTNOVA,1,30;','','');
-REPLACE INTO `item_db_re` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','4294967294','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','2147483647','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
REPLACE INTO `item_db_re` VALUES ('5558','Saci_Hat','Luxury Hat','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','542','0','bonus3 bAddMonsterDropItem,510,RC_Plant,500;','','');
REPLACE INTO `item_db_re` VALUES ('5559','Piece_Of_White_Cloth_E','Piece Of White Cloth','5','0','0','0','0','0','5','0','0','4294967295','63','2','768','0','0',NULL,'1','543','0','','','');
REPLACE INTO `item_db_re` VALUES ('5560','Bullock_Helm_J','Horned Helm','5','20','10','3000','0','0','6','0','0','4294967295','63','2','256','0','75',NULL,'1','322','0','bonus bMaxHP,100; bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
@@ -3288,9 +3288,9 @@ REPLACE INTO `item_db_re` VALUES ('5608','Dorothy_Doll_Hat','Dorothy Doll Hat','
REPLACE INTO `item_db_re` VALUES ('5609','Chung_Hairband','Chung Hairpin','5','0','0','500','0','0','5','0','1','4294967295','63','2','256','0','60',NULL,'0','583','0','bonus bLuk,3; bonus bMdef,4; bonus3 bAutoSpellWhenHit,MC_MAMMONITE,5,5;','','');
REPLACE INTO `item_db_re` VALUES ('5610','Ice_Wing_Ear','Ice Ear Wing','5','0','0','100','0','0','0','0','0','4294967295','63','2','512','0','10',NULL,'0','584','0','bonus bUnbreakableHelm,0; bonus bLuk,1; bonus3 bAutoSpellWhenHit,MG_COLDBOLT,5,5;','','');
REPLACE INTO `item_db_re` VALUES ('5611','Turtle_Hat','Turtle Hat','5','0','0','300','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'1','585','0','bonus bAgi,1; bonus3 bAutoSpellWhenHit,AL_DECAGI,3,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5612','F_Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','4294967294','63','2','256','0','0',NULL,'1','277','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5612','F_Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','277','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('5613','F_Flying_Angel','Flapping Angel Wing','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5614','F_Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','4294967294','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5614','F_Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5615','F_Pair_Of_Red_Ribbon_','Evolved Pair of Red Ribbon','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
REPLACE INTO `item_db_re` VALUES ('5616','F_Fish_On_Head_','Evolved Blue Fish','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus bDex,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5617','F_Hibiscus','Hibiscus','5','20','10','200','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','210','0','bonus bInt,1; bonus bDex,1; bonus bMdef,5;','','');
@@ -3299,10 +3299,10 @@ REPLACE INTO `item_db_re` VALUES ('5619','F_Bunny_Band_','Evolved Bunny Band','5
REPLACE INTO `item_db_re` VALUES ('5620','F_Magestic_Goat_TW','Evolved Magestic Goat','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5621','F_Sheep_Hat','Sheep Hat','5','20','10','150','0','0','1','0','0','33040','63','2','256','0','0',NULL,'0','205','0','','','');
REPLACE INTO `item_db_re` VALUES ('5622','F_Mini_Propeller_','Mini Propeller','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bDex,1; bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5623','F_Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','4294967294','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5623','F_Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5624','F_Red_Glasses','Red Glasses','5','20','10','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','316','0','bonus bUnbreakableHelm,0; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5625','F_Chick_Hat','Chick Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5626','F_White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','4294967294','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5626','F_White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5627','F_Vane_Hairpin','Vane Hairpin','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','30',NULL,'0','313','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('5628','F_Pecopeco_Hairband','Pecopeco Hairband','5','20','10','0','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','314','0','','','');
REPLACE INTO `item_db_re` VALUES ('5629','F_Vacation_Hat','Vacation Hat','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','30',NULL,'0','315','0','bonus bVit,1;','','');
@@ -3324,11 +3324,11 @@ REPLACE INTO `item_db_re` VALUES ('5644','F_Tiger_Mask','Tiger Mask','5','20','1
REPLACE INTO `item_db_re` VALUES ('5645','F_Fantastic_Wig','Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','','','');
REPLACE INTO `item_db_re` VALUES ('5646','F_Whisper_Mask','Whisper Mask','5','20','10','0','0','0','0','0','0','4294967295','63','2','769','0','0',NULL,'0','321','0','bonus bUnbreakableHelm,0; bonus bAgi,3;','','');
REPLACE INTO `item_db_re` VALUES ('5647','F_Bunny_Band_C','Bunny Band','5','1','0','0','0','0','9','0','0','4294967295','63','2','256','0','0',NULL,'0','15','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5648','F_Centimental_Flower_C','Centimental Flower','5','1','0','0','0','0','1','0','0','4294967294','63','2','1','0','0',NULL,'0','56','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5649','F_Apple_Of_Archer_C','Apple Of Archer','5','1','0','0','0','0','7','0','0','4294967294','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5650','F_Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','4294967294','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5651','F_Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5652','F_Magestic_Goat_C','Magestic Goat','5','2','1','0','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5648','F_Centimental_Flower_C','Centimental Flower','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5649','F_Apple_Of_Archer_C','Apple Of Archer','5','1','0','0','0','0','7','0','0','2147483647','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5650','F_Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5651','F_Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5652','F_Magestic_Goat_C','Magestic Goat','5','2','1','0','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5653','Darkness_Helm_J','Darkness Helm','5','20','10','500','0','0','3','0','1','4294967295','63','2','256','0','70',NULL,'1','586','0','','','');
REPLACE INTO `item_db_re` VALUES ('5654','Holy_Marching_Hat_J','Holy Marching Hat','5','20','10','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','587','0','bonus bMdef,5; bonus bDex,1; bonus bInt,1; bonus bStr,2; bonus3 bAutoSpell,PR_ASPERSIO,2,30;','','');
REPLACE INTO `item_db_re` VALUES ('5655','Dark_Snake_Lord_Hat_J','Dark Snake Lord Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','60',NULL,'1','372','0','bonus bInt,2; bonus bAgi,2; bonus bDex,-2; autobonus \"{ bonus bVariableCastrate,-50; bonus bFlee,30; }\",50,5000,BF_MAGIC,\"{ specialeffect2 EF_SUFFRAGIUM; }\";','','');
@@ -3370,7 +3370,7 @@ REPLACE INTO `item_db_re` VALUES ('5690','Red_Wing_Hat','Red Wing Hat','5','20',
REPLACE INTO `item_db_re` VALUES ('5691','Catain_Bandanna','Sailor\'s Bandana','5','20','10','10','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','542','0','bonus bUnbreakableHelm,0; bonus bDex,1; bonus2 bSubEle,Ele_Poison,20;','','');
REPLACE INTO `item_db_re` VALUES ('5692','Sea_Cat_Hat','Sea Cat Hat','5','20','10','10','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','539','0','bonus bUnbreakableHelm,0; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5693','No_Fear_Underware','NoFear Underwear','5','0','0','0','0','0','10','0','0','4294967295','63','2','256','0','20',NULL,'0','30','0','bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db_re` VALUES ('5694','No_Fear_P_Headgear','NoFear Headband','5','0','0','0','0','0','1','0','1','4294967294','63','2','256','0','20',NULL,'0','614','0','bonus bVit,1; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5694','No_Fear_P_Headgear','NoFear Headband','5','0','0','0','0','0','1','0','1','2147483647','63','2','256','0','20',NULL,'0','614','0','bonus bVit,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5695','E_Blue_Drooping_Kitty','E Blue Drooping Kitty','5','250000','125000','500','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','277','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('5696','E_Flying_Angel','E Flying Angel','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5697','E_Smoking_Pipe_','E Smoking Pipe ','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1;','','');
@@ -3382,10 +3382,10 @@ REPLACE INTO `item_db_re` VALUES ('5702','E_Bunny_Band_','E Bunny Band ','5','20
REPLACE INTO `item_db_re` VALUES ('5703','E_Magestic_Goat_TW','E Magestic Goat TW','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5704','E_Sheep_Hat','E Sheep Hat','5','20','10','150','0','0','1','0','0','33040','63','2','256','0','0',NULL,'0','205','0','','','');
REPLACE INTO `item_db_re` VALUES ('5705','E_Mini_Propeller_','E Mini Propeller ','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bDex,1; bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5706','E_Alice_Doll','E Alice Doll','5','20','10','500','0','0','0','0','1','4294967294','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5706','E_Alice_Doll','E Alice Doll','5','20','10','500','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5707','E_Red_Glasses','E Red Glasses','5','20','10','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','316','0','bonus bUnbreakableHelm,0; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5708','E_Chick_Hat','E Chick Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5709','E_White_Deviruchi_Cap','E White Deviruchi Cap','5','20','10','800','0','0','2','0','0','4294967294','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5709','E_White_Deviruchi_Cap','E White Deviruchi Cap','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5710','E_Vane_Hairpin','E Vane Hairpin','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','30',NULL,'0','313','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('5711','E_Pecopeco_Hairband','E Pecopeco Hairband','5','20','10','0','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','314','0','','','');
REPLACE INTO `item_db_re` VALUES ('5712','E_Vacation_Hat','E Vacation Hat','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','30',NULL,'0','315','0','bonus bVit,1;','','');
@@ -3406,11 +3406,11 @@ REPLACE INTO `item_db_re` VALUES ('5726','E_Crescent_Helm','E Crescent Helm','5'
REPLACE INTO `item_db_re` VALUES ('5727','E_Tiger_Mask','E Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','181','0','bonus bStr,3;','','');
REPLACE INTO `item_db_re` VALUES ('5728','E_Fantastic_Wig','E Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','','','');
REPLACE INTO `item_db_re` VALUES ('5729','E_Bunny_Band_C','E Bunny Band C','5','1','0','0','0','0','9','0','0','4294967295','63','2','256','0','0',NULL,'0','15','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5730','E_Centimental_Flower_C','E Centimental Flower C','5','1','0','0','0','0','1','0','0','4294967294','63','2','1','0','0',NULL,'0','56','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5731','E_Apple_OE_Archer_C','E Apple OE Archer C','5','1','0','0','0','0','7','0','0','4294967294','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5732','E_Elven_Ears_C','E Elven Ears C','5','1','0','0','0','0','2','0','0','4294967294','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5733','E_Brooch_C','E Brooch C','5','1','0','0','0','0','0','0','0','4294967294','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5734','E_Magestic_Goat_C','E Magestic Goat C','5','2','1','0','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5730','E_Centimental_Flower_C','E Centimental Flower C','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5731','E_Apple_OE_Archer_C','E Apple OE Archer C','5','1','0','0','0','0','7','0','0','2147483647','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5732','E_Elven_Ears_C','E Elven Ears C','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5733','E_Brooch_C','E Brooch C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5734','E_Magestic_Goat_C','E Magestic Goat C','5','2','1','0','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5735','E_Ribbon_Green','E Ribbon Green','5','800','400','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','244','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5736','EF_Whisper_Mask','EF Whisper Mask','5','20','10','0','0','0','0','0','0','4294967295','63','2','769','0','0',NULL,'0','321','0','bonus bUnbreakableHelm,0; bonus bAgi,3; bonus2 bSubEle,Ele_Ghost,-10;','','');
REPLACE INTO `item_db_re` VALUES ('5737','Cactus_Hat','Potted Muka Hat','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','615','0','','','');
@@ -3483,10 +3483,10 @@ REPLACE INTO `item_db_re` VALUES ('5803','Flower_Love_Hat','Love Flower Hat','5'
REPLACE INTO `item_db_re` VALUES ('5804','Pirate_Eyepatch','Pirate Eye Bandage','5','1000','500','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','13','0','','','');
REPLACE INTO `item_db_re` VALUES ('5805','Victorious_Coronet','Victorious Coronet','5','0','0','150','0','0','2','0','0','4294967295','63','2','256','0','70',NULL,'0','43','0','bonus bMaxHPrate,15; bonus bSPrecovRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('5806','Poem_Natalia_Hat','Poem Natalia Hat','5','20','10','300','0','0','9','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','2','0','0','4294967294','63','2','256','0','50',NULL,'1','104','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','50',NULL,'1','104','0','','','');
REPLACE INTO `item_db_re` VALUES ('5808','Diabolus_Helmet','Dark Bacilium','5','20','10','250','0','0','5','0','1','1040256','58','2','769','0','0',NULL,'1','364','0','bonus2 bResEff,Eff_Stone,2000+(getrefine()*200); bonus2 bResEff,Eff_Freeze,2000+(getrefine()*200); bonus2 bResEff,Eff_Stun,2000+(getrefine()*200);','','');
REPLACE INTO `item_db_re` VALUES ('5809','Boom_Boom_Hat','Boom Boom Hat','5','0','0','100','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'0','216','0','bonus bAllStats,5; bonus bSpeedRate,25;','','');
-REPLACE INTO `item_db_re` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','5','0','0','4294967294','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
REPLACE INTO `item_db_re` VALUES ('5811','Santa_Beard','Santa\'s Beard','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db_re` VALUES ('5812','Hat_Of_Expert','Hat Of Expert','5','0','0','0','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','bonus3 bAddEffWhenHit,Eff_Bleeding,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Silence,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Confusion,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Curse,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Blind,500,ATF_TARGET|ATF_SELF;','','');
REPLACE INTO `item_db_re` VALUES ('5813','Red_Ph.D_Hat','Red Scholar Hat','5','1000','500','500','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','481','0','bonus bInt,1;','','');
@@ -5318,11 +5318,11 @@ REPLACE INTO `item_db_re` VALUES ('12031','Sleepy_Box','Box of Drowsiness','2','
REPLACE INTO `item_db_re` VALUES ('12032','Box_Of_Storm','Box of Storms','11','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill ITEM_ENCHANTARMS,2;','','');
REPLACE INTO `item_db_re` VALUES ('12033','Box_Of_Sunlight','Box of Sunlight','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CLAIRVOYANCE,30000,0;','','');
REPLACE INTO `item_db_re` VALUES ('12034','Painting_Box','Box of Panting','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 0,9; if(rand(1000)<300) sc_start SC_SILENCE,30000,0;','','');
-REPLACE INTO `item_db_re` VALUES ('12035','Lotto_Box01','Lotto Box 01','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7361,7370),1;','','');
-REPLACE INTO `item_db_re` VALUES ('12036','Lotto_Box02','Lotto Box 02','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7371,7380),1;','','');
-REPLACE INTO `item_db_re` VALUES ('12037','Lotto_Box03','Lotto Box 03','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7381,7390),1;','','');
+REPLACE INTO `item_db_re` VALUES ('12035','Lotto_Box01','Lotto Box 01','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12035,1;','','');
+REPLACE INTO `item_db_re` VALUES ('12036','Lotto_Box02','Lotto Box 02','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12036,1;','','');
+REPLACE INTO `item_db_re` VALUES ('12037','Lotto_Box03','Lotto Box 03','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12037,1;','','');
REPLACE INTO `item_db_re` VALUES ('12038','Lotto_Box04','Lotto Box 04','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12038,1;','','');
-REPLACE INTO `item_db_re` VALUES ('12039','Lotto_Box05','Lotto Box 05','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem rand(7542,7546),1;','','');
+REPLACE INTO `item_db_re` VALUES ('12039','Lotto_Box05','Lotto Box 05','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12039,1;','','');
REPLACE INTO `item_db_re` VALUES ('12040','Stone_Of_Intelligence_','Stone of Sage','2','100000','50000','300','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','homevolution;','','');
REPLACE INTO `item_db_re` VALUES ('12041','Str_Dish01','Fried Grasshopper Legs','0','2000','1000','60','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_STR,1200000,1; percentheal 5,0;','','');
REPLACE INTO `item_db_re` VALUES ('12042','Str_Dish02','Seasoned Sticky Webfoot','0','4000','2000','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_STR,1200000,2; percentheal 5,0;','','');
@@ -5593,7 +5593,7 @@ REPLACE INTO `item_db_re` VALUES ('12309','Bulging_Head','JJangu Magic Powder','
REPLACE INTO `item_db_re` VALUES ('12310','Spray_Of_Flowers','Spray Of Flowers','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_INCFLEE,600000,10;','','');
REPLACE INTO `item_db_re` VALUES ('12311','Large_Spray_Of_Flowers','Huge Spray Of Flowers','11','0','0','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill ALL_PARTYFLEE,1;','','');
REPLACE INTO `item_db_re` VALUES ('12312','Thick_Manual50','Thick Battle Manual','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CASH_PLUSEXP,3600000,50;','','');
-REPLACE INTO `item_db_re` VALUES ('12313','Protection_Of_Angel','Guardian Angel','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('12313','Protection_Of_Angel','Guardian Angel','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill ALL_ANGEL_PROTECT,1;','','');
REPLACE INTO `item_db_re` VALUES ('12314','Noive_Box','Noive Box','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('12315','Goddess_Bless','Goddess Of Blessing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('12316','Angel_Bless','Angel Of Blessing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
@@ -5632,7 +5632,7 @@ REPLACE INTO `item_db_re` VALUES ('12348','Manuk\'s_Faith','Manuk\'s Faith','2',
REPLACE INTO `item_db_re` VALUES ('12349','Cornus\'_Tears','Cornus\' Tears','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','specialeffect2 EF_POTION_BERSERK; sc_start SC_SPL_MATK,600000,10;','','');
REPLACE INTO `item_db_re` VALUES ('12350','Angeling_Potion','Angeling Potion','11','20','10','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','skilleffect AL_BLESSING,0; sc_start SC_BLESSING,120000,5; itemskill AL_ANGELUS,5;','','');
REPLACE INTO `item_db_re` VALUES ('12351','Shout_Megaphone','Scream Megaphone','11','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill MC_LOUD,1;','','');
-REPLACE INTO `item_db_re` VALUES ('12352','Dun_Tele_Scroll3','Dungeon Teleport Scroll 3','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('12352','Dun_Tele_Scroll3','Dungeon Teleport Scroll 3','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\",3;','','');
REPLACE INTO `item_db_re` VALUES ('12353','Tiny_Waterbottle','Small Bottle','2','800','400','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_PROPERTYWATER,90000,1;','','');
REPLACE INTO `item_db_re` VALUES ('12354','Buche_De_Noel','Buche De Noel','2','2','1','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','specialeffect2 EF_ANGELUS; sc_start SC_INCMHPRATE,600000,3; sc_start SC_INCMSPRATE,600000,3; sc_start SC_INCHITRATE,600000,3; sc_start SC_CRITICALPERCENT,600000,7;','','');
REPLACE INTO `item_db_re` VALUES ('12355','Xmas_Gift','Xmas Gift','2','2','1','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 12355,1;','','');
@@ -7250,7 +7250,7 @@ REPLACE INTO `item_db_re` VALUES ('14489','Pink_Pajamas_Hat_Box','Pink Pajamas H
REPLACE INTO `item_db_re` VALUES ('14500','Insurance60','Life Insurrance Certificate','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CASH_DEATHPENALTY,3600000,0;','','');
REPLACE INTO `item_db_re` VALUES ('14508','Zeny_Scroll','Zeny Pet Egg Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('14509','Light_Center_Pot','Light Concentration Potion','2','800','400','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,0;','','');
-REPLACE INTO `item_db_re` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','4294442735','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
+REPLACE INTO `item_db_re` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','2147483647','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
REPLACE INTO `item_db_re` VALUES ('14511','Light_Berserk_Pot','Light Berserk Potion','2','3000','1500','20','0','0','0','0','0','31868582','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,0;','','');
REPLACE INTO `item_db_re` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_METEOR,10;','','');
REPLACE INTO `item_db_re` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_STORMGUST,10;','','');
@@ -7267,7 +7267,7 @@ REPLACE INTO `item_db_re` VALUES ('14523','Pill_','Pill','0','0','0','10','0','0
REPLACE INTO `item_db_re` VALUES ('14524','Superb_Fish_Slice','Superb Fish Slice','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 100,100;','','');
REPLACE INTO `item_db_re` VALUES ('14525','Chewy_Ricecake','Chewy Ricecake','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_PLUSATTACKPOWER,180000,10;','','');
REPLACE INTO `item_db_re` VALUES ('14526','Oriental_Pastry','Oriental Pastry','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_PLUSMAGICPOWER,180000,10;','','');
-REPLACE INTO `item_db_re` VALUES ('14527','Dun_Tele_Scroll1','Dungeon Teleport Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\";','','');
+REPLACE INTO `item_db_re` VALUES ('14527','Dun_Tele_Scroll1','Dungeon Teleport Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\",1;','','');
REPLACE INTO `item_db_re` VALUES ('14528','PVP_Tele_Scroll','PVP Teleport Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('14529','Greed_Scroll','Greed Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill BS_GREED,1;','','');
REPLACE INTO `item_db_re` VALUES ('14530','Flee_30_Scroll','Evasion Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_INCFLEE,1800000,30;','','');
@@ -7321,7 +7321,7 @@ REPLACE INTO `item_db_re` VALUES ('14577','Vit_Dish05_','Spicy Fried Bao','0','2
REPLACE INTO `item_db_re` VALUES ('14578','Agi_Dish05_','Steamed Bat Wing in Pumpkin','0','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_AGI,1200000,5; percentheal 6,2;','','');
REPLACE INTO `item_db_re` VALUES ('14579','Dex_Dish05_','Green Salad','0','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_DEX,1200000,5; percentheal 5,5;','','');
REPLACE INTO `item_db_re` VALUES ('14580','Luk_Dish05_','Fried Scorpion Tails','0','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_FOOD_LUK,1200000,5; percentheal 5,2;','','');
-REPLACE INTO `item_db_re` VALUES ('14581','Dun_Tele_Scroll2','Dungeon Teleport Scroll II','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\";','','');
+REPLACE INTO `item_db_re` VALUES ('14581','Dun_Tele_Scroll2','Dungeon Teleport Scroll II','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashDungeon\",2;','','');
REPLACE INTO `item_db_re` VALUES ('14582','WOB_Rune','Yellow Butterfly Wing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashCity\",1;','','');
REPLACE INTO `item_db_re` VALUES ('14583','WOB_Schwaltz','Green Butterfly Wing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashCity\",2;','','');
REPLACE INTO `item_db_re` VALUES ('14584','WOB_Rachel','Red Butterfly Wing','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','callfunc \"F_CashCity\",3;','','');
@@ -7358,7 +7358,7 @@ REPLACE INTO `item_db_re` VALUES ('14616','STR_Biscuit_Stick','Bar of Strength',
REPLACE INTO `item_db_re` VALUES ('14617','VIT_Biscuit_Stick','Bar of Fitness','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('14618','AGI_Biscuit_Stick','Bar of Agility','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15000','Bone_Plate','Bone Plate','5','20','10','1000','0','0','60','0','1','414946','58','2','16','0','0',NULL,'1','0','0','bonus bStr,1; bonus bMdef,3; bonus2 bIgnoreDefRate,RC_DemiHuman,10; bonus2 bIgnoreDefRate,RC_Brute,10; bonus3 bAutoSpellWhenHit,NPC_WIDEBLEEDING,1,10;','','');
-REPLACE INTO `item_db_re` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','4294967294','63','2','16','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15002','Rune_Plate','Rune Plate','5','0','0','0','0','0','95','0','1','16512','56','2','16','0','99',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15003','Freyja_SRobe7','Freya Soul Robe','5','0','0','300','0','0','7','0','0','4294967295','63','2','16','0','20',NULL,'0','0','0','bonus bMaxHP,700;','','');
REPLACE INTO `item_db_re` VALUES ('15004','Freyja_SRobe30','Freya Soul Robe','5','0','0','300','0','0','7','0','0','4294967295','63','2','16','0','20',NULL,'0','0','0','bonus bMaxHP,700;','','');
@@ -7373,12 +7373,12 @@ REPLACE INTO `item_db_re` VALUES ('15012','Puente_Robe','Puente Robe','5','12000
REPLACE INTO `item_db_re` VALUES ('15013','Claire_Suits','Claire Suits','5','28000','14000','2800','0','0','58','0','1','1040382','58','2','16','0','22',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15014','Ebone_Armor','Ebone Armor','5','40000','20000','4500','0','0','93','0','1','16512','56','2','16','0','100',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15015','Upg_Adv_Suit','Reinforcement Adventure Suit','5','20','10','150','0','0','25','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('15016','Upg_Coat','Reinforcement Coat','5','20','10','600','0','0','47','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('15016','Upg_Coat','Reinforcement Coat','5','20','10','600','0','0','47','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15017','Upg_Saint_Robe','Reinforcement Saint Robe','5','20','10','300','0','0','55','0','1','296240','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,5; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15018','Upg_Tights','Reinforcement Tight','5','20','10','250','0','0','32','0','1','526344','63','2','16','0','0',NULL,'1','0','0','bonus bDex,1; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15019','Upg_Thief_Cloth','Reinforcement Thief Clothes','5','20','10','100','0','0','45','0','1','570560576','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15020','Upg_Mail','Reinforcement Mail','5','20','10','1650','0','0','60','0','1','414946','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('15021','Upg_Formal_Dress','Reinforcement Formal Suit','5','20','10','150','0','0','45','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('15021','Upg_Formal_Dress','Reinforcement Formal Suit','5','20','10','150','0','0','45','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15022','Brazil_Swimsuit','Swimming Suit','5','20','10','100','0','0','1','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','bonus bStr,4; bonus bInt,4; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('15023','Half_Brynhild','Brynhild (Trial Version)','5','20','10','0','0','0','60','0','0','4294967295','63','2','16','0','47',NULL,'0','0','0','bonus bMdef,10; bonus bMaxHP,20*BaseLevel; bonus bMaxSP,5*BaseLevel; bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bUnbreakableArmor,0; bonus bNoKnockback,0;','','');
REPLACE INTO `item_db_re` VALUES ('15024','Army_Padding','Army Padding','5','0','0','10','0','0','10','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -7389,7 +7389,7 @@ REPLACE INTO `item_db_re` VALUES ('15028','Forest_Robe','Forest Robe','5','20','
REPLACE INTO `item_db_re` VALUES ('15029','Robe_Of_Affection','Robe Of Affection','5','20','10','300','0','0','22','0','0','256','56','2','16','0','100',NULL,'1','0','0','bonus bDefEle,Ele_Holy; bonus bMdef,10; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('15030','Robe_Of_Judgement','Robe Of Judgement','5','20','10','300','0','0','22','0','0','256','56','2','16','0','100',NULL,'1','0','0','bonus bDefEle,Ele_Dark; bonus bMdef,10; bonus bStr,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,10; bonus2 bSubRace,RC_Undead,10; bonus2 bSubRace,RC_Formless,-10; bonus2 bSubRace,RC_Brute,-10; bonus2 bSubRace,RC_DemiHuman,-10; bonus2 bSubRace,RC_Plant,-10; bonus2 bSubRace,RC_Insect,-10; bonus2 bSubRace,RC_Fish,-10; bonus2 bSubRace,RC_Angel,-10; bonus2 bSubRace,RC_Dragon,-10;','','');
REPLACE INTO `item_db_re` VALUES ('15031','Para_Team_Armor','Eden Group Armor','5','0','0','0','0','0','70','0','0','4294967295','63','2','16','0','60',NULL,'0','0','0','bonus bMdef,5; bonus bMaxHP,500; bonus bMaxSP,50; bonus bStr,1; bonus bInt,1; bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('15032','Tidung','Tidung','5','10','5','500','0','0','2','0','1','4294967294','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10; bonus2 bResEff,Eff_Stun,1500; bonus2 bResEff,Eff_Freeze,1500; bonus2 bSubRace,RC_NonBoss,5; bonus2 bSubRace,RC_Boss,5;','','');
+REPLACE INTO `item_db_re` VALUES ('15032','Tidung','Tidung','5','10','5','500','0','0','2','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10; bonus2 bResEff,Eff_Stun,1500; bonus2 bResEff,Eff_Freeze,1500; bonus2 bSubRace,RC_NonBoss,5; bonus2 bSubRace,RC_Boss,5;','','');
REPLACE INTO `item_db_re` VALUES ('15033','Tutorial_Mattle','Tutorial Mantle','5','0','0','600','0','0','37','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15034','Tutorial_Mattle_','Tutorial Mantle','5','0','0','600','0','0','37','0','1','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15035','2010Love_Daddy','2010 Love Daddy Shirt','5','10','5','100','0','0','6','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','bonus bAllStats,1; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bResEff,Eff_Stone,9000; bonus2 bResEff,Eff_Freeze,9000; bonus2 bResEff,Eff_Stun,9000; bonus2 bResEff,Eff_Sleep,9000; bonus2 bResEff,Eff_Silence,9000; bonus2 bResEff,Eff_Curse,9000; bonus2 bResEff,Eff_Confusion,9000; bonus2 bResEff,Eff_Blind,9000; bonus2 bResEff,Eff_Poison,9000; bonus2 bResEff,Eff_Bleeding,9000;','','');
@@ -7803,17 +7803,17 @@ REPLACE INTO `item_db_re` VALUES ('18503','Small_Horn_Of_Devil','Small Devil Hor
REPLACE INTO `item_db_re` VALUES ('18504','Anubis_Helm_J','Anubis Helm J','5','20','10','1000','0','0','0','0','0','4294967295','63','2','769','0','70',NULL,'0','485','0','','','');
REPLACE INTO `item_db_re` VALUES ('18505','Umbala_Spirit','Umbala Spirit','5','0','0','0','0','0','1','0','0','4294967295','63','2','1','0','0',NULL,'0','675','0','bonus bVit,1; bonus bMaxHPrate,1; bonus2 bAddMonsterDropItem,517,500;','','');
REPLACE INTO `item_db_re` VALUES ('18506','Hattah_Black','Hata Black','5','12000','6000','4000','0','0','2','0','1','4294967295','63','2','769','0','0',NULL,'1','676','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','4294967294','63','2','512','0','70',NULL,'0','73','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18508','Garuda_Hat','Garuda Hat','5','20','10','100','0','0','4','0','1','4294967294','63','2','256','0','30',NULL,'1','677','0','bonus bLuk,5; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18509','RWC2010_Indonesia','RWC 2010 Indonesia','5','20','10','100','0','0','6','0','1','4294967294','63','2','256','0','15',NULL,'1','678','0','bonus bLuk,5;','','');
+REPLACE INTO `item_db_re` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18508','Garuda_Hat','Garuda Hat','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','30',NULL,'1','677','0','bonus bLuk,5; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18509','RWC2010_Indonesia','RWC 2010 Indonesia','5','20','10','100','0','0','6','0','1','2147483647','63','2','256','0','15',NULL,'1','678','0','bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('18510','Blood_Angel_Hair_Band','Bloody Angel Wings','5','0','0','0','0','0','1','0','0','4294967295','63','2','256','0','60',NULL,'0','679','0','','','');
REPLACE INTO `item_db_re` VALUES ('18511','Blood_Angel_Wing_Ear','Bloody Angel Wing Ears','5','0','0','0','0','0','1','0','0','4294967295','63','2','512','0','60',NULL,'0','680','0','','','');
REPLACE INTO `item_db_re` VALUES ('18512','Juho_Necktie','Necktie of Drunkard','5','0','0','0','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','443','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18513','Shining_Sunflower','Shining Sunflower','5','20','10','300','0','0','0','0','0','4294967294','63','2','256','0','0',NULL,'0','681','0','bonus bLuk,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18513','Shining_Sunflower','Shining Sunflower','5','20','10','300','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'0','681','0','bonus bLuk,2;','','');
REPLACE INTO `item_db_re` VALUES ('18514','Para_Team_Hat2','Eden Group Hat II','5','0','0','0','0','0','5','0','1','4294967295','63','2','256','0','60',NULL,'1','682','0','autobonus \"{ bonus bBaseAtk,10; }\",50,5000,BF_WEAPON,\"{ specialeffect2 EF_ENHANCE; }\"; autobonus \"{ bonus bMatk,10; }\",50,5000,BF_MAGIC,\"{ specialeffect2 EF_MAGICALATTHIT; }\";','','');
-REPLACE INTO `item_db_re` VALUES ('18515','RTC_1st_Helm','RTC winners Pitching','5','6000','3000','2500','0','0','0','0','1','4294967294','63','2','769','0','90',NULL,'0','683','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18516','RTC_2nd_Helm','RTC Second Pitching','5','6000','3000','2500','0','0','0','0','1','4294967294','63','2','769','0','90',NULL,'0','684','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18517','RTC_3rd_Helm','RTC 3rd Winner Hat','5','6000','3000','2500','0','0','0','0','1','4294967294','63','2','769','0','90',NULL,'0','685','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18515','RTC_1st_Helm','RTC winners Pitching','5','6000','3000','2500','0','0','0','0','1','2147483647','63','2','769','0','90',NULL,'0','683','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18516','RTC_2nd_Helm','RTC Second Pitching','5','6000','3000','2500','0','0','0','0','1','2147483647','63','2','769','0','90',NULL,'0','684','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18517','RTC_3rd_Helm','RTC 3rd Winner Hat','5','6000','3000','2500','0','0','0','0','1','2147483647','63','2','769','0','90',NULL,'0','685','0','','','');
REPLACE INTO `item_db_re` VALUES ('18518','Ear_Of_Angel\'s_Wing_','Angel Wing Ears','5','20','10','100','0','0','3','0','1','4294967295','63','2','512','0','70',NULL,'0','158','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('18519','Ear_Of_Devil\'s_Wing_','Wing of Diablo','5','20','10','100','0','0','3','0','1','4294967295','63','2','512','0','70',NULL,'0','152','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('18520','Jaty_C','Jaty Crown','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','686','0','bonus2 bSubRace,RC_Plant,5; bonus2 bSubRace,RC_Brute,5; bonus2 bAddRace,RC_Plant,5; bonus2 bAddRace,RC_Brute,5;','','');
@@ -7879,18 +7879,18 @@ REPLACE INTO `item_db_re` VALUES ('18579','9th_Anni_Hat','kRO 9 Anniversary Hat'
REPLACE INTO `item_db_re` VALUES ('18580','Yggdrasil_Crown','Yggdrasil Crown','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','724','0','bonus bVit,2; bonus bInt,2; bonus bMdef,3; bonus bHealPower,2; bonus bHealPower2,10; if(getrefine() >= 7) { bonus bHealPower,5; } if(getrefine() >= 9) { bonus bHealPower,3; }','','');
REPLACE INTO `item_db_re` VALUES ('18581','Red_Tiger_Mask','Red Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','747','0','bonus bStr,3;','','');
REPLACE INTO `item_db_re` VALUES ('18582','Blue_Tiger_Mask','Blue Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','748','0','bonus bStr,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18583','Navy_Drooping_Kitty','Navy Drooping Kitty','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','749','0','bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('18584','Brown_Drooping_Kitty','Brown Drooping Kitty','5','250000','125000','500','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','750','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('18583','Navy_Drooping_Kitty','Navy Drooping Kitty','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','749','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('18584','Brown_Drooping_Kitty','Brown Drooping Kitty','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','750','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('18585','Orange_Bunny_Hairband','Orange Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','751','0','bonus bStr,1; bonus bInt,2; bonus bVit,3;','','');
REPLACE INTO `item_db_re` VALUES ('18586','Violet_Bunny_Hairband','Violet Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','752','0','bonus bStr,1; bonus bInt,3; bonus bVit,2; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18587','Blue_Bunny_Hairband','Blue Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','753','0','bonus bStr,3; bonus bInt,1; bonus bVit,2; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18588','Silver_Bunny_Hairband','Silvah Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','754','0','bonus bStr,2; bonus bInt,3; bonus bVit,1; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18589','Strawberry_Hat','Strawberry Hat','5','20','10','100','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','755','0','','','');
REPLACE INTO `item_db_re` VALUES ('18590','Gemma_Hairband','Demon Hair Band','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','10',NULL,'1','564','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18591','Mini_Glasses_','Mini Glasses','5','20','10','100','0','0','2','0','1','4294967294','63','2','512','0','0',NULL,'0','47','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18591','Mini_Glasses_','Mini Glasses','5','20','10','100','0','0','2','0','1','2147483647','63','2','512','0','0',NULL,'0','47','0','','','');
REPLACE INTO `item_db_re` VALUES ('18592','Nestea_Hat','Nestea Hat','5','20','10','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','756','0','bonus bUnbreakableHelm,0; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('18593','Fancy_Mini_Crown','Fancy Mini Crown','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','30',NULL,'1','707','0','bonus bInt,1; bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('18594','Magni_Cap_','Magni Cap','5','30000','15000','1000','0','0','9','0','1','4294967294','63','2','256','0','0',NULL,'1','250','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18594','Magni_Cap_','Magni Cap','5','30000','15000','1000','0','0','9','0','1','2147483647','63','2','256','0','0',NULL,'1','250','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('18595','Horn_Of_Ancient','Ancient Horns','5','20','10','400','0','0','8','0','1','4294967295','63','2','256','0','50',NULL,'1','757','0','autobonus \"{ bonus bBaseAtk,100; }\",5,10000,0,\"{ specialeffect2 EF_POTION_BERSERK; }\";','','');
REPLACE INTO `item_db_re` VALUES ('18596','Sprout_Hat','Sprout Hat','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','70',NULL,'1','758','0','skill WZ_HEAVENDRIVE,3;','','');
REPLACE INTO `item_db_re` VALUES ('18597','Mercury_Helm','Mercury Riser','5','20','10','400','0','0','10','0','1','4294967295','63','2','256','0','70',NULL,'1','759','0','bonus bAspdRate,3; bonus bCritical,3; if(getrefine() >= 7) { bonus bAspdRate,2; bonus bCritical,2; } if(getrefine() >= 9) { bonus bAspdRate,2; bonus bCritical,2; }','','');
@@ -7905,17 +7905,17 @@ REPLACE INTO `item_db_re` VALUES ('18605','Dark_Age','Dark Age','5','20','10','2
REPLACE INTO `item_db_re` VALUES ('18606','Tear_Drop','Tear drop','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','30',NULL,'0','767','0','','','');
REPLACE INTO `item_db_re` VALUES ('18607','Blush_','Blush','5','20','10','100','0','0','0','0','1','4294967295','63','2','512','0','0',NULL,'0','125','0','','','');
REPLACE INTO `item_db_re` VALUES ('18608','Pair_Of_Red_Ribbon2','Small Ribbons','5','20','10','100','0','0','2','0','1','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18609','Dark_Blindfold_','Dark Blinder','5','20','10','100','0','0','0','0','1','4294967294','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
+REPLACE INTO `item_db_re` VALUES ('18609','Dark_Blindfold_','Dark Blinder','5','20','10','100','0','0','0','0','1','2147483647','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
REPLACE INTO `item_db_re` VALUES ('18610','7th_Anni_Hat_B','7th Anni Hat B','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','778','0','bonus bAllStats,5; bonus bMdef,4;','','');
REPLACE INTO `item_db_re` VALUES ('18611','Black_Glasses_','Black Frame Glasses','5','20','10','200','0','0','2','0','1','4294967295','63','2','512','0','0',NULL,'0','404','0','bonus bUnbreakableHelm,0; bonus bInt,1; bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('18612','White_Musang_Hat','White Musang Hat','5','20','10','400','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','770','0','bonus bStr,2; bonus bVit,2; bonus bLuk,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18613','Black_Musang_Hat','Black Musang Hat','5','20','10','400','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','771','0','bonus bInt,2; bonus bDex,2; bonus bAgi,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18614','Grim_Reaper_Hat','Grim Reaper','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','20',NULL,'1','732','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18615','Injured_Eyepatch','Injured Eyepatch','5','20','10','200','0','0','2','0','0','4294967294','63','2','512','0','20',NULL,'0','772','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18616','Long_Tongue','Long Tongue','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','773','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18617','Onigiri_In_Mouth','Onigiri','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','774','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18618','Airplane_Hat','Rockabilly Hair','5','20','10','200','0','0','8','0','1','4294967294','63','2','256','0','20',NULL,'1','775','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18619','Thief_Bandana','Thief Bandana','5','20','10','200','0','0','1','0','0','4294967294','63','2','256','0','20',NULL,'1','776','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18615','Injured_Eyepatch','Injured Eyepatch','5','20','10','200','0','0','2','0','0','2147483647','63','2','512','0','20',NULL,'0','772','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18616','Long_Tongue','Long Tongue','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','773','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18617','Onigiri_In_Mouth','Onigiri','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','774','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18618','Airplane_Hat','Rockabilly Hair','5','20','10','200','0','0','8','0','1','2147483647','63','2','256','0','20',NULL,'1','775','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18619','Thief_Bandana','Thief Bandana','5','20','10','200','0','0','1','0','0','2147483647','63','2','256','0','20',NULL,'1','776','0','','','');
REPLACE INTO `item_db_re` VALUES ('18620','Heart_Eyepatch','Heart Eyepatch','5','20','10','50','0','0','2','0','0','4294967295','63','2','512','0','20',NULL,'0','779','0','','','');
REPLACE INTO `item_db_re` VALUES ('18621','Gangster_Mask_A','Mobster\'s Disguise','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','52','0','','','');
REPLACE INTO `item_db_re` VALUES ('18622','Rocket_Helm1','Rocket Helm1','5','20','10','1000','0','0','20','0','1','4294967295','63','2','256','0','95',NULL,'1','764','0','bonus bMdef,5; bonus bAllStats,5; bonus bUnbreakableHelm,0;','','');
@@ -7926,7 +7926,7 @@ REPLACE INTO `item_db_re` VALUES ('18626','Gelato_Hat','Gelato Hat','5','20','10
REPLACE INTO `item_db_re` VALUES ('18627','Dried_Leaf','Dried Leaf','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','10',NULL,'0','711','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18628','Tare_Brownie','Tare Brownie','5','20','10','500','0','0','5','0','1','4294967295','63','2','256','0','50',NULL,'0','781','0','','','');
REPLACE INTO `item_db_re` VALUES ('18629','B_Desert_Wolf_Hat','B Desert Wolf Hat','5','10','5','300','0','0','0','0','1','4294967295','63','2','256','0','0',NULL,'1','392','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18630','Droopy_Alice_Doll','Drooping Alicel','5','20','10','500','0','0','6','0','0','4294967294','63','2','256','0','70',NULL,'1','784','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18630','Droopy_Alice_Doll','Drooping Alicel','5','20','10','500','0','0','6','0','0','2147483647','63','2','256','0','70',NULL,'1','784','0','','','');
REPLACE INTO `item_db_re` VALUES ('18631','Ribbon_Chef_Hat','Ribbon Chef hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','256','0','70',NULL,'1','785','0','bonus bDex,3; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('18632','Yellow_Poring_Pin','Yellow Poring Hairpin','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','786','0','','','');
REPLACE INTO `item_db_re` VALUES ('18633','Pink_Poring_Pin','Pink Poring Hairpin','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','787','0','','','');
@@ -7934,13 +7934,13 @@ REPLACE INTO `item_db_re` VALUES ('18634','Green_Poring_Pin','Green Poring Hairp
REPLACE INTO `item_db_re` VALUES ('18635','Blue_Poring_Pin','Blue Poring Hairpin','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','789','0','','','');
REPLACE INTO `item_db_re` VALUES ('18636','Bridal_Ribbon','Ribbon of bride','5','20','10','200','0','0','6','0','0','4294967295','63','2','256','0','30',NULL,'1','790','0','bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18637','Ancient_Admiral_Helm','Ancient Admiral Helm','5','20','10','700','0','0','4','0','1','4294967295','63','2','768','0','0',NULL,'1','660','0','bonus bStr,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18638','Citron_Hat','Citron Hat','5','20','10','400','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','791','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18639','Naval_Officer_Hat','Naval Officer Hat','5','20','10','200','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','792','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18640','Starfish_Headband','Starfish Headband','5','20','10','200','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','793','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18641','Ribbon_Magic_Hat','Ribbon Magic Hat','5','20','10','200','0','0','2','0','0','4294967294','63','2','256','0','0',NULL,'1','794','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18642','hand_Scissorhand_Model','Scissorhand Model','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','795','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18643','Rockhand_Model','Rockhand Model','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','796','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18644','Paperhand_Model','Paperhand Model','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','797','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18638','Citron_Hat','Citron Hat','5','20','10','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','791','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18639','Naval_Officer_Hat','Naval Officer Hat','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','792','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18640','Starfish_Headband','Starfish Headband','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','793','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18641','Ribbon_Magic_Hat','Ribbon Magic Hat','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','794','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18642','hand_Scissorhand_Model','Scissorhand Model','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','795','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18643','Rockhand_Model','Rockhand Model','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','796','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18644','Paperhand_Model','Paperhand Model','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','797','0','','','');
REPLACE INTO `item_db_re` VALUES ('18645','Sailor_Hat','Sailor Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','798','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('18646','Cow_Hat','Cow Hat','5','20','10','300','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','799','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('18647','Star_Eyepatch','Stunning Star Eyepatch','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','800','0','','','');
@@ -7955,31 +7955,31 @@ REPLACE INTO `item_db_re` VALUES ('18656','Wit_Pumpkin_Hat','Witch\'s Pumpkin Ha
REPLACE INTO `item_db_re` VALUES ('18657','Pegasus_Wing_Ears','Pegasus Ear Wing','5','20','10','500','0','0','1','0','0','4294967295','63','2','512','0','80',NULL,'0','568','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18658','Holy_Santa_Beard','Santa\'s Beard Holy','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db_re` VALUES ('18659','Boitata_Hat','Boitata Hat','5','20','10','0','0','0','5','0','1','4294967295','63','2','768','0','0',NULL,'1','808','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18660','Indi_Feather_Band','Indian Feather Headband','5','20','10','400','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','809','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18661','Trident_Helmet','Trident Helmet','5','20','10','400','0','0','3','0','1','4294967294','63','2','256','0','20',NULL,'1','810','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18662','Antler_Fedora','Antler Fedora','5','20','10','400','0','0','3','0','0','4294967294','63','2','256','0','0',NULL,'1','811','0','bonus bInt,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18663','Sunglasses_Bball_Hat','Sunglasses Baseball Hat','5','20','10','200','0','0','2','0','1','4294967294','63','2','256','0','20',NULL,'1','812','0','bonus bInt,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18664','Blind_Glasses','Stunner Shades','5','20','10','400','0','0','3','0','0','4294967294','63','2','512','0','20',NULL,'1','813','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18665','Orange_In_Mouth','Orange In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','814','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18666','CD_In_Mouth','CD In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','815','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18667','Cat_Lace_Hairband','Cat Lace Hairband','5','20','10','500','0','0','2','0','0','4294967294','63','2','256','0','60',NULL,'0','816','0','bonus bDex,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18660','Indi_Feather_Band','Indian Feather Headband','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','809','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18661','Trident_Helmet','Trident Helmet','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','810','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18662','Antler_Fedora','Antler Fedora','5','20','10','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','811','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18663','Sunglasses_Bball_Hat','Sunglasses Baseball Hat','5','20','10','200','0','0','2','0','1','2147483647','63','2','256','0','20',NULL,'1','812','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18664','Blind_Glasses','Stunner Shades','5','20','10','400','0','0','3','0','0','2147483647','63','2','512','0','20',NULL,'1','813','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18665','Orange_In_Mouth','Orange In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','814','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18666','CD_In_Mouth','CD In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','815','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18667','Cat_Lace_Hairband','Cat Lace Hairband','5','20','10','500','0','0','2','0','0','2147483647','63','2','256','0','60',NULL,'0','816','0','bonus bDex,3;','','');
REPLACE INTO `item_db_re` VALUES ('18668','Droopy_Turtle_Hat','Droopy Turtle Hat','5','20','10','300','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','694','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18669','Cowhide_Hat','Cowhide Hat','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','11','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18669','Cowhide_Hat','Cowhide Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','11','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('18670','Hankie_In_Mouth','Handkerchief In Mouth','5','20','10','100','0','0','1','0','0','4294967295','63','2','1','0','12',NULL,'0','818','0','','','');
REPLACE INTO `item_db_re` VALUES ('18671','Rudolf_Hairband','Rudolf Hairband','5','20','10','200','0','0','5','0','0','4294967295','63','2','256','0','30',NULL,'1','836','0','','','');
REPLACE INTO `item_db_re` VALUES ('18672','Tare_Pope','Flap Pope','5','20','10','300','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','817','0','bonus bMdef,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18673','Tare_Pope_','Chibi Pope','5','20','10','300','0','0','0','0','1','4294967295','63','2','256','0','0',NULL,'0','817','0','bonus bMdef,1; bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db_re` VALUES ('18674','Planewing_Hat','Planewing Hat','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','11','0','bonus bAgi,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18675','Green_Apple_Hat','Green Apple Hat','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','20',NULL,'1','11','0','bonus bDex,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18676','Hexagon_Spectacles','Hexagon Spectacles','5','20','10','400','0','0','3','0','0','4294967294','63','2','512','0','20',NULL,'0','822','0','bonus bFlee,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18677','Cherry_Twig_In_Mouth','Cherry Twig In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','823','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18678','Leek_In_Mouth','Leek In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','824','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18679','Abacus_In_Mouth','Abacus In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','825','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18674','Planewing_Hat','Planewing Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','11','0','bonus bAgi,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18675','Green_Apple_Hat','Green Apple Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','11','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18676','Hexagon_Spectacles','Hexagon Spectacles','5','20','10','400','0','0','3','0','0','2147483647','63','2','512','0','20',NULL,'0','822','0','bonus bFlee,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18677','Cherry_Twig_In_Mouth','Cherry Twig In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','823','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18678','Leek_In_Mouth','Leek In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','824','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18679','Abacus_In_Mouth','Abacus In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','825','0','','','');
REPLACE INTO `item_db_re` VALUES ('18680','Tw_Frog_Hat','Tw Frog Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','35',NULL,'0','11','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('18681','Puppy_Ears_Hat','Puppy Ears Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','11','0','bonus bVit,2;','','');
REPLACE INTO `item_db_re` VALUES ('18682','Teardrop','Teardrop','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'1','828','0','bonus bMaxSP,15;','','');
REPLACE INTO `item_db_re` VALUES ('18683','Carrot_In_Mouth','Carrot In Mouth','5','20','10','200','0','0','1','0','0','4294967295','63','2','1','0','0',NULL,'0','829','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18684','Showy_High_Cap','Showy High Cap','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','11','0','bonus bStr,3; bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18684','Showy_High_Cap','Showy High Cap','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','11','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db_re` VALUES ('18685','Stardust_Hairband','Stardust Hairband','5','20','10','1000','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','831','0','','','');
REPLACE INTO `item_db_re` VALUES ('18686','2011_RMSC_1','2011 RMSC 1','5','20','10','2500','0','0','20','0','1','4294967295','63','2','256','0','0',NULL,'0','832','0','bonus bUnbreakableHelm,0; bonus bAllStats,5;','','');
REPLACE INTO `item_db_re` VALUES ('18687','2011_RMSC_2','2011 RMSC 2','5','20','10','2500','0','0','20','0','1','4294967295','63','2','256','0','0',NULL,'0','832','0','bonus bUnbreakableHelm,0; bonus bAllStats,3;','','');
@@ -7987,29 +7987,29 @@ REPLACE INTO `item_db_re` VALUES ('18688','2011_RMSC_3','2011 RMSC 3','5','20','
REPLACE INTO `item_db_re` VALUES ('18689','2011_RMSC_4','2011 RMSC 4','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','832','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18690','Sirt_Evil_Eye','Sirt Evil Eye','5','20','10','400','0','0','0','0','0','4294967295','63','2','512','0','50',NULL,'0','345','0','bonus bUnbreakableHelm,0; bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('18691','Rising_Black_Dragon','Ascension Black Dragon','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','166','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18692','Mike_Hat','Mike Hat','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','837','0','bonus bDex,2; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18693','Sleeping_Kitty_Cat','Sleeping Kitty Cat','5','20','10','200','0','0','4','0','1','4294967294','63','2','256','0','20',NULL,'1','838','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18694','Red_Hood','Red Hood','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','20',NULL,'1','839','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18695','Phoenix_Crown','Phoenix Crown','5','20','10','400','0','0','3','0','1','4294967294','63','2','256','0','20',NULL,'1','840','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18696','Orange_Hat','Orange Hat','5','20','10','200','0','0','3','0','0','4294967294','63','2','256','0','20',NULL,'1','841','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18697','Syringe_In_Mouth','Syringe In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','842','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18698','Cheesy_Snack_In_Mouth','Cheesy Snack In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','843','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18692','Mike_Hat','Mike Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','837','0','bonus bDex,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18693','Sleeping_Kitty_Cat','Sleeping Kitty Cat','5','20','10','200','0','0','4','0','1','2147483647','63','2','256','0','20',NULL,'1','838','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18694','Red_Hood','Red Hood','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','839','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18695','Phoenix_Crown','Phoenix Crown','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','840','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18696','Orange_Hat','Orange Hat','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','841','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18697','Syringe_In_Mouth','Syringe In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','842','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18698','Cheesy_Snack_In_Mouth','Cheesy Snack In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','843','0','','','');
REPLACE INTO `item_db_re` VALUES ('18699','Starving_Fish_Hat','Starving Fish Hat','5','20','10','1200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','844','0','','','');
REPLACE INTO `item_db_re` VALUES ('18700','Rabbit_Ribbon','Rabbit Ribbon Hat','5','20','10','500','0','0','3','0','1','4294967295','63','2','256','0','50',NULL,'1','845','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18701','Ancient_Civil_Man','Ancient Civil Man Hat','5','20','10','500','0','0','2','0','0','4294967294','63','2','256','0','70',NULL,'0','846','0','bonus bInt,3; bonus bDex,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18701','Ancient_Civil_Man','Ancient Civil Man Hat','5','20','10','500','0','0','2','0','0','2147483647','63','2','256','0','70',NULL,'0','846','0','bonus bInt,3; bonus bDex,2; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('18702','Shaving_Cream','Shaving Cream','5','20','10','50','0','0','1','0','0','4294967295','63','2','1','0','10',NULL,'0','847','0','','','');
REPLACE INTO `item_db_re` VALUES ('18703','Stem_In_Mouth','Stem In Mouth','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','848','0','','','');
REPLACE INTO `item_db_re` VALUES ('18704','Drosera_Hairpin','Drosera Hairpin','5','20','10','640','0','0','6','0','1','4294967295','63','2','256','0','64',NULL,'1','850','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('18706','Can_Hat','Can Hat','5','20','10','400','0','0','3','0','0','4294967294','63','2','256','0','20',NULL,'1','851','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18707','Maneater_Flower_Hat','Maneater Flower Hat','5','20','10','500','0','0','3','0','0','4294967294','63','2','256','0','20',NULL,'1','852','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18708','Candy_Hat','Candy Hat','5','20','10','200','0','0','3','0','0','4294967294','63','2','256','0','20',NULL,'1','853','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18709','Black_Knitted_Hat','Black Knitted Hat','5','20','10','200','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','854','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18710','Sugared_Fruit_Stick','Sugared Fruit Stick','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','855','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18711','Electric_Sunglass','Electric Sunglass','5','20','10','400','0','0','3','0','0','4294967294','63','2','512','0','20',NULL,'0','856','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18712','Fan_In_Mouth','Fan In Mouth','5','20','10','200','0','0','0','0','0','4294967294','63','2','1','0','20',NULL,'0','857','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18706','Can_Hat','Can Hat','5','20','10','400','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','851','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18707','Maneater_Flower_Hat','Maneater Flower Hat','5','20','10','500','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','852','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18708','Candy_Hat','Candy Hat','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','853','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18709','Black_Knitted_Hat','Black Knitted Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','854','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18710','Sugared_Fruit_Stick','Sugared Fruit Stick','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','855','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18711','Electric_Sunglass','Electric Sunglass','5','20','10','400','0','0','3','0','0','2147483647','63','2','512','0','20',NULL,'0','856','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18712','Fan_In_Mouth','Fan In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','857','0','','','');
REPLACE INTO `item_db_re` VALUES ('18713','Monkey_On_Fur_Hat','Monkey Fur Hat','5','20','10','300','0','0','6','0','1','4294967295','63','2','256','0','20',NULL,'1','858','0','bonus bDex,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('18714','Hippo_Hat','Hippo Hat','5','20','10','500','0','0','5','0','1','4294967295','63','2','256','0','10',NULL,'1','859','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18715','Helm_Of_Thoth','Helm Of Thoth','5','20','10','2500','0','0','2','0','1','4294967294','63','2','768','0','80',NULL,'0','860','0','bonus bInt,2; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('18715','Helm_Of_Thoth','Helm Of Thoth','5','20','10','2500','0','0','2','0','1','2147483647','63','2','768','0','80',NULL,'0','860','0','bonus bInt,2; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('18716','Strawberry_In_Mouth','Strawberry In Mouth','5','20','10','50','0','0','2','0','0','4294967295','63','2','1','0','10',NULL,'0','861','0','','','');
REPLACE INTO `item_db_re` VALUES ('18718','Rose_Hairband','Rose Hairband','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','30',NULL,'0','864','0','bonus bInt,1; bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('18727','Sedora_Hat','Sedora Hat','5','20','10','300','0','0','13','0','1','4294967295','63','2','256','0','10',NULL,'1','869','0','','','');
@@ -8039,13 +8039,13 @@ REPLACE INTO `item_db_re` VALUES ('18786','Anemos_Mask','Anemos Mask','5','20','
REPLACE INTO `item_db_re` VALUES ('18790','Rainbow_Poring_Hat','Rainbow Poring Hat','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','900','0','','','');
REPLACE INTO `item_db_re` VALUES ('18805','Eclipse_Hat','Eclipse Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','922','0','bonus bLuk,3; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('18806','Black_Rabbit_Hat','Black Rabbit Hat','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','923','0','bonus bDex,2; bonus bAgi,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18807','Yellow_Yuzu_Hat','White Citron Hat','5','20','10','400','0','0','3','0','1','4294967294','63','2','256','0','0',NULL,'1','924','0','bonus bVit,2; bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18807','Yellow_Yuzu_Hat','White Citron Hat','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','924','0','bonus bVit,2; bonus bLuk,3;','','');
REPLACE INTO `item_db_re` VALUES ('18808','Wing_Form_Spectacle','Wing Style Spectacle','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','925','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('18810','Hell_Pumpkin_Hat','Hell Pumpkin Hat','5','20','10','500','0','0','12','0','0','4294967295','63','2','256','0','0',NULL,'1','717','0','bonus bMdef,12;','','');
-REPLACE INTO `item_db_re` VALUES ('18814','Angel_School_Cap','Angel School Cap','5','20','10','100','0','0','4','0','1','4294967294','63','2','256','0','0',NULL,'1','927','0','bonus bInt,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18815','Devil_School_Cap','Devil School Cap','5','20','10','100','0','0','4','0','1','4294967294','63','2','256','0','0',NULL,'1','928','0','bonus bStr,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18816','Adv_Angel_School_Cap','Evoked Angel School Cap','5','20','10','100','0','0','4','0','1','4294967294','63','2','256','0','0',NULL,'1','929','0','bonus bInt,2; bonus bVit,2; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18817','Adv_Devil_School_Cap','Evoked Devil School Cap','5','20','10','100','0','0','4','0','1','4294967294','63','2','256','0','0',NULL,'1','930','0','bonus bStr,2; bonus bVit,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18814','Angel_School_Cap','Angel School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','927','0','bonus bInt,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18815','Devil_School_Cap','Devil School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','928','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18816','Adv_Angel_School_Cap','Evoked Angel School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','929','0','bonus bInt,2; bonus bVit,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18817','Adv_Devil_School_Cap','Evoked Devil School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','930','0','bonus bStr,2; bonus bVit,2; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('18818','Red_Pencil_In_Mouth','Red Pencil In Mouth','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','931','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18821','Rainbow_Feather_Deco','RWC Commemorative Pin','5','20','10','300','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','934','0','','','');
REPLACE INTO `item_db_re` VALUES ('18828','2012RMSCNO1','RMSC2012 Champion Headgear','5','0','0','1000','0','0','20','0','1','4294967295','63','2','256','0','95',NULL,'0','942','0','bonus bUnbreakableHelm,0; bonus bAllStats,5; bonus bMdef,5;','','');
diff --git a/src/char/char.c b/src/char/char.c
index e58fc9eef..8d7ff1ab4 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -331,15 +331,15 @@ void set_char_offline(int char_id, int account_id)
static int char_db_setoffline(DBKey key, DBData *data, va_list ap)
{
struct online_char_data* character = (struct online_char_data*)DB->data2ptr(data);
- int server = va_arg(ap, int);
- if (server == -1) {
+ int server_id = va_arg(ap, int);
+ if (server_id == -1) {
character->char_id = -1;
character->server = -1;
if(character->waiting_disconnect != INVALID_TIMER){
timer->delete(character->waiting_disconnect, chardb_waiting_disconnect);
character->waiting_disconnect = INVALID_TIMER;
}
- } else if (character->server == server)
+ } else if (character->server == server_id)
character->server = -2; //In some map server that we aren't connected to.
return 0;
}
@@ -1073,7 +1073,7 @@ int mmo_chars_fromsql(struct char_session_data* sd, uint8* buf)
}
for( i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); i++ ) {
- p.last_point.map = mapindex_name2id(last_map);
+ p.last_point.map = mapindex->name2id(last_map);
sd->found_char[p.slot] = p.char_id;
sd->unban_time[p.slot] = unban_time;
j += mmo_char_tobuf(WBUFP(buf, j), &p);
@@ -1199,17 +1199,17 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
account_id = p->account_id;
- p->last_point.map = mapindex_name2id(last_map);
- p->save_point.map = mapindex_name2id(save_map);
+ p->last_point.map = mapindex->name2id(last_map);
+ p->save_point.map = mapindex->name2id(save_map);
if( p->last_point.map == 0 ) {
- p->last_point.map = (unsigned short)strdb_iget(mapindex_db, MAP_DEFAULT);
+ p->last_point.map = (unsigned short)strdb_iget(mapindex->db, MAP_DEFAULT);
p->last_point.x = MAP_DEFAULT_X;
p->last_point.y = MAP_DEFAULT_Y;
}
if( p->save_point.map == 0 ) {
- p->save_point.map = (unsigned short)strdb_iget(mapindex_db, MAP_DEFAULT);
+ p->save_point.map = (unsigned short)strdb_iget(mapindex->db, MAP_DEFAULT);
p->save_point.x = MAP_DEFAULT_X;
p->save_point.y = MAP_DEFAULT_Y;
}
@@ -1233,7 +1233,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
SqlStmt_ShowDebug(stmt);
for( i = 0; i < MAX_MEMOPOINTS && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i ) {
- tmp_point.map = mapindex_name2id(point_map);
+ tmp_point.map = mapindex->name2id(point_map);
memcpy(&p->memo_point[i], &tmp_point, sizeof(tmp_point));
}
strcat(t_msg, " memo");
@@ -1913,7 +1913,7 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) {
offset += 2;
#endif
#if (PACKETVER >= 20100720 && PACKETVER <= 20100727) || PACKETVER >= 20100803
- mapindex_getmapname_ext(mapindex_id2name(p->last_point.map), (char*)WBUFP(buf,108));
+ mapindex->getmapname_ext(mapindex_id2name(p->last_point.map), (char*)WBUFP(buf,108));
offset += MAP_NAME_LENGTH_EXT;
#endif
#if PACKETVER >= 20100803
@@ -2209,7 +2209,6 @@ void loginif_on_ready(void)
int parse_fromlogin(int fd) {
struct char_session_data* sd = NULL;
- int i;
// only process data from the login-server
if( fd != login_fd ) {
@@ -2242,10 +2241,9 @@ int parse_fromlogin(int fd) {
uint16 command = RFIFOW(fd,0);
if( HPM->packetsc[hpParse_FromLogin] ) {
- if( (i = HPM->parse_packets(fd,hpParse_FromLogin)) ) {
- if( i == 1 ) continue;
- if( i == 2 ) return 0;
- }
+ int success = HPM->parse_packets(fd,hpParse_FromLogin);
+ if( success == 1 ) continue;
+ else if( success == 2 ) return 0;
}
switch( command ) {
@@ -2316,6 +2314,8 @@ int parse_fromlogin(int fd) {
break;
case 0x2717: // account data
+ {
+ int i;
if (RFIFOREST(fd) < 72)
return 0;
@@ -2358,6 +2358,7 @@ int parse_fromlogin(int fd) {
}
}
RFIFOSKIP(fd,72);
+ }
break;
// login-server alive packet
@@ -2385,6 +2386,7 @@ int parse_fromlogin(int fd) {
int class_[MAX_CHARS];
int guild_id[MAX_CHARS];
int num;
+ int i;
char* data;
struct auth_node* node = (struct auth_node*)idb_get(auth_db, acc);
@@ -3209,7 +3211,7 @@ int parse_frommap(int fd)
SQL->EscapeStringLen(sql_handle, esc_name, name, strnlen(name, NAME_LENGTH));
- if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `account_id`,`name`,`char_id`,`unban_time` FROM `%s` WHERE `name` = '%s'", char_db, esc_name) )
+ if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `account_id`,`char_id`,`unban_time` FROM `%s` WHERE `name` = '%s'", char_db, esc_name) )
Sql_ShowDebug(sql_handle);
else if( SQL->NumRows(sql_handle) == 0 ) {
result = 1; // 1-player not found
@@ -3217,15 +3219,13 @@ int parse_frommap(int fd)
Sql_ShowDebug(sql_handle);
result = 1; // 1-player not found
} else {
- char name[NAME_LENGTH];
int account_id, char_id;
char* data;
time_t unban_time;
SQL->GetData(sql_handle, 0, &data, NULL); account_id = atoi(data);
- SQL->GetData(sql_handle, 1, &data, NULL); safestrncpy(name, data, sizeof(name));
- SQL->GetData(sql_handle, 2, &data, NULL); char_id = atoi(data);
- SQL->GetData(sql_handle, 3, &data, NULL); unban_time = atol(data);
+ SQL->GetData(sql_handle, 1, &data, NULL); char_id = atoi(data);
+ SQL->GetData(sql_handle, 2, &data, NULL); unban_time = atol(data);
if( login_fd <= 0 )
result = 3; // 3-login-server offline
@@ -3465,7 +3465,6 @@ int parse_frommap(int fd)
{
struct status_change_data data;
StringBuf buf;
- int i;
StrBuf->Init(&buf);
StrBuf->Printf(&buf, "INSERT INTO `%s` (`account_id`, `char_id`, `type`, `tick`, `val1`, `val2`, `val3`, `val4`) VALUES ", scdata_db);
@@ -3905,7 +3904,6 @@ static void char_delete2_cancel(int fd, struct char_session_data* sd)
int parse_char(int fd)
{
- int i;
char email[40];
unsigned short cmd;
int map_fd;
@@ -3937,10 +3935,9 @@ int parse_char(int fd)
#define FIFOSD_CHECK(rest) do { if(RFIFOREST(fd) < (rest)) return 0; if (sd==NULL || !sd->auth) { RFIFOSKIP(fd,(rest)); return 0; } } while (0)
if( HPM->packetsc[hpParse_Char] ) {
- if( (i = HPM->parse_packets(fd,hpParse_Char)) ) {
- if( i == 1 ) continue;
- if( i == 2 ) return 0;
- }
+ int success = HPM->parse_packets(fd,hpParse_Char);
+ if( success == 1 ) continue;
+ else if( success == 2 ) return 0;
}
cmd = RFIFOW(fd,0);
@@ -4043,6 +4040,7 @@ int parse_char(int fd)
uint32 subnet_map_ip;
struct auth_node* node;
int server_id = 0;
+ int i;
int slot = RFIFOB(fd,2);
RFIFOSKIP(fd,3);
@@ -4140,22 +4138,22 @@ int parse_char(int fd)
WFIFOSET(fd,3);
break;
}
- if ((i = search_mapserver((j=mapindex_name2id(MAP_PRONTERA)),-1,-1)) >= 0) {
+ if ((i = search_mapserver((j=mapindex->name2id(MAP_PRONTERA)),-1,-1)) >= 0) {
cd->last_point.x = 273;
cd->last_point.y = 354;
- } else if ((i = search_mapserver((j=mapindex_name2id(MAP_GEFFEN)),-1,-1)) >= 0) {
+ } else if ((i = search_mapserver((j=mapindex->name2id(MAP_GEFFEN)),-1,-1)) >= 0) {
cd->last_point.x = 120;
cd->last_point.y = 100;
- } else if ((i = search_mapserver((j=mapindex_name2id(MAP_MORROC)),-1,-1)) >= 0) {
+ } else if ((i = search_mapserver((j=mapindex->name2id(MAP_MORROC)),-1,-1)) >= 0) {
cd->last_point.x = 160;
cd->last_point.y = 94;
- } else if ((i = search_mapserver((j=mapindex_name2id(MAP_ALBERTA)),-1,-1)) >= 0) {
+ } else if ((i = search_mapserver((j=mapindex->name2id(MAP_ALBERTA)),-1,-1)) >= 0) {
cd->last_point.x = 116;
cd->last_point.y = 57;
- } else if ((i = search_mapserver((j=mapindex_name2id(MAP_PAYON)),-1,-1)) >= 0) {
+ } else if ((i = search_mapserver((j=mapindex->name2id(MAP_PAYON)),-1,-1)) >= 0) {
cd->last_point.x = 87;
cd->last_point.y = 117;
- } else if ((i = search_mapserver((j=mapindex_name2id(MAP_IZLUDE)),-1,-1)) >= 0) {
+ } else if ((i = search_mapserver((j=mapindex->name2id(MAP_IZLUDE)),-1,-1)) >= 0) {
cd->last_point.x = 94;
cd->last_point.y = 103;
} else {
@@ -4189,7 +4187,7 @@ int parse_char(int fd)
WFIFOHEAD(fd,28);
WFIFOW(fd,0) = 0x71;
WFIFOL(fd,2) = cd->char_id;
- mapindex_getmapname_ext(mapindex_id2name(cd->last_point.map), (char*)WFIFOP(fd,6));
+ mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), (char*)WFIFOP(fd,6));
subnet_map_ip = lan_subnetcheck(ipl); // Advanced subnet check [LuzZza]
WFIFOL(fd,22) = htonl((subnet_map_ip) ? subnet_map_ip : server[i].ip);
WFIFOW(fd,26) = ntows(htons(server[i].port)); // [!] LE byte order here [!]
@@ -4214,31 +4212,35 @@ int parse_char(int fd)
#if PACKETVER >= 20120307
// S 0970 <name>.24B <slot>.B <hair color>.W <hair style>.W
case 0x970:
+ {
+ int result;
FIFOSD_CHECK(31);
#else
// S 0067 <name>.24B <str>.B <agi>.B <vit>.B <int>.B <dex>.B <luk>.B <slot>.B <hair color>.W <hair style>.W
case 0x67:
+ {
+ int result;
FIFOSD_CHECK(37);
#endif
if( !char_new ) //turn character creation on/off [Kevin]
- i = -2;
+ result = -2;
else
#if PACKETVER >= 20120307
- i = make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOW(fd,27),RFIFOW(fd,29));
+ result = make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOW(fd,27),RFIFOW(fd,29));
#else
- i = make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27),RFIFOB(fd,28),RFIFOB(fd,29),RFIFOB(fd,30),RFIFOB(fd,31),RFIFOB(fd,32),RFIFOW(fd,33),RFIFOW(fd,35));
+ result = make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27),RFIFOB(fd,28),RFIFOB(fd,29),RFIFOB(fd,30),RFIFOB(fd,31),RFIFOB(fd,32),RFIFOW(fd,33),RFIFOW(fd,35));
#endif
//'Charname already exists' (-1), 'Char creation denied' (-2) and 'You are underaged' (-3)
- if (i < 0) {
+ if (result < 0) {
WFIFOHEAD(fd,3);
WFIFOW(fd,0) = 0x6e;
/* Others I found [Ind] */
/* 0x02 = Symbols in Character Names are forbidden */
/* 0x03 = You are not elegible to open the Character Slot. */
/* 0x0B = This service is only available for premium users. */
- switch (i) {
+ switch (result) {
case -1: WFIFOB(fd,2) = 0x00; break;
case -2: WFIFOB(fd,2) = 0xFF; break;
case -3: WFIFOB(fd,2) = 0x01; break;
@@ -4249,7 +4251,7 @@ int parse_char(int fd)
int len;
// retrieve data
struct mmo_charstatus char_dat;
- mmo_char_fromsql(i, &char_dat, false); //Only the short data is needed.
+ mmo_char_fromsql(result, &char_dat, false); //Only the short data is needed.
// send to player
WFIFOHEAD(fd,2+MAX_CHAR_BUF);
@@ -4258,13 +4260,14 @@ int parse_char(int fd)
WFIFOSET(fd,len);
// add new entry to the chars list
- sd->found_char[char_dat.slot] = i; // the char_id of the new char
+ sd->found_char[char_dat.slot] = result; // the char_id of the new char
}
#if PACKETVER >= 20120307
RFIFOSKIP(fd,31);
#else
RFIFOSKIP(fd,37);
#endif
+ }
break;
// delete char
@@ -4275,6 +4278,7 @@ int parse_char(int fd)
if (cmd == 0x1fb) FIFOSD_CHECK(56);
{
int cid = RFIFOL(fd,2);
+ int i;
#if PACKETVER >= 20110309
if( *pincode->enabled ){ // hack check
struct online_char_data* character;
@@ -4483,6 +4487,7 @@ int parse_char(int fd)
{
char* l_user = (char*)RFIFOP(fd,2);
char* l_pass = (char*)RFIFOP(fd,26);
+ int i;
l_user[23] = '\0';
l_pass[23] = '\0';
ARR_FIND( 0, ARRAYLENGTH(server), i, server[i].fd <= 0 );
@@ -5014,7 +5019,7 @@ int char_config_read(const char* cfgName)
int x, y;
if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3)
continue;
- start_point.map = mapindex_name2id(map);
+ start_point.map = mapindex->name2id(map);
if (!start_point.map)
ShowError("Specified start_point %s not found in map-index cache.\n", map);
start_point.x = x;
@@ -5122,7 +5127,7 @@ void do_final(void) {
}
SQL->Free(sql_handle);
- mapindex_final();
+ mapindex->final();
for(i = 0; i < MAX_MAP_SERVERS; i++ )
if( server[i].map )
@@ -5169,13 +5174,13 @@ int do_init(int argc, char **argv) {
for(i = 0; i < MAX_MAP_SERVERS; i++ )
server[i].map = NULL;
- //Read map indexes
- mapindex_init();
- start_point.map = mapindex_name2id("new_zone01");
-
-
+ mapindex_defaults();
pincode_defaults();
+ //Read map indexes
+ mapindex->init();
+ start_point.map = mapindex->name2id("new_zone01");
+
char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
char_lan_config_read((argc > 3) ? argv[3] : LAN_CONF_NAME);
sql_config_read(SQL_CONF_NAME);
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 5f033f4d7..6bd8ca568 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -447,16 +447,16 @@ struct guild * inter_guild_fromsql(int guild_id)
while( SQL_SUCCESS == SQL->NextRow(sql_handle) )
{
int position;
- struct guild_position* p;
+ struct guild_position *pos;
SQL->GetData(sql_handle, 0, &data, NULL); position = atoi(data);
if( position < 0 || position >= MAX_GUILDPOSITION )
continue;// invalid position
- p = &g->position[position];
- SQL->GetData(sql_handle, 1, &data, &len); memcpy(p->name, data, min(len, NAME_LENGTH));
- SQL->GetData(sql_handle, 2, &data, NULL); p->mode = atoi(data);
- SQL->GetData(sql_handle, 3, &data, NULL); p->exp_mode = atoi(data);
- p->modified = GS_POSITION_UNMODIFIED;
+ pos = &g->position[position];
+ SQL->GetData(sql_handle, 1, &data, &len); memcpy(pos->name, data, min(len, NAME_LENGTH));
+ SQL->GetData(sql_handle, 2, &data, NULL); pos->mode = atoi(data);
+ SQL->GetData(sql_handle, 3, &data, NULL); pos->exp_mode = atoi(data);
+ pos->modified = GS_POSITION_UNMODIFIED;
}
//printf("- Read guild_alliance %d from sql \n",guild_id);
@@ -1664,7 +1664,7 @@ static int mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int ac
int mapif_parse_GuildAlliance(int fd,int guild_id1,int guild_id2,int account_id1,int account_id2,int flag)
{
// Could speed up
- struct guild *g[2];
+ struct guild *g[2] = { NULL };
int j,i;
g[0] = inter_guild_fromsql(guild_id1);
g[1] = inter_guild_fromsql(guild_id2);
@@ -1675,25 +1675,19 @@ int mapif_parse_GuildAlliance(int fd,int guild_id1,int guild_id2,int account_id1
if(g[0]==NULL || g[1]==NULL)
return 0;
- if(flag&GUILD_ALLIANCE_REMOVE)
- {
+ if( flag&GUILD_ALLIANCE_REMOVE ) {
// Remove alliance/opposition, in case of alliance, remove on both side
- for(i=0;i<2-(flag&GUILD_ALLIANCE_TYPE_MASK);i++)
- {
+ for( i = 0; i < ((flag&GUILD_ALLIANCE_TYPE_MASK) ? 1 : 2); i++ ) {
ARR_FIND( 0, MAX_GUILDALLIANCE, j, g[i]->alliance[j].guild_id == g[1-i]->guild_id && g[i]->alliance[j].opposition == (flag&GUILD_ALLIANCE_TYPE_MASK) );
if( j < MAX_GUILDALLIANCE )
g[i]->alliance[j].guild_id = 0;
}
- }
- else
- {
+ } else {
// Add alliance, in case of alliance, add on both side
- for(i=0;i<2-(flag&GUILD_ALLIANCE_TYPE_MASK);i++)
- {
+ for( i = 0; i < ((flag&GUILD_ALLIANCE_TYPE_MASK) ? 1 : 2); i++ ) {
// Search an empty slot
ARR_FIND( 0, MAX_GUILDALLIANCE, j, g[i]->alliance[j].guild_id == 0 );
- if( j < MAX_GUILDALLIANCE )
- {
+ if( j < MAX_GUILDALLIANCE ) {
g[i]->alliance[j].guild_id=g[1-i]->guild_id;
memcpy(g[i]->alliance[j].name,g[1-i]->name,NAME_LENGTH);
// Set alliance type
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 9cb4ccf80..7c328c452 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -241,7 +241,7 @@ struct party_data *inter_party_fromsql(int party_id)
SQL->GetData(sql_handle, 1, &data, NULL); m->char_id = atoi(data);
SQL->GetData(sql_handle, 2, &data, &len); memcpy(m->name, data, min(len, NAME_LENGTH));
SQL->GetData(sql_handle, 3, &data, NULL); m->lv = atoi(data);
- SQL->GetData(sql_handle, 4, &data, NULL); m->map = mapindex_name2id(data);
+ SQL->GetData(sql_handle, 4, &data, NULL); m->map = mapindex->name2id(data);
SQL->GetData(sql_handle, 5, &data, NULL); m->online = (atoi(data) ? 1 : 0);
SQL->GetData(sql_handle, 6, &data, NULL); m->class_ = atoi(data);
m->leader = (m->account_id == leader_id && m->char_id == leader_char ? 1 : 0);
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index af8f83a5d..f8a05bc8f 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -19,45 +19,77 @@
#include <string.h>
#include <stdlib.h>
-//Load entire questlog for a character
-int mapif_quests_fromsql(int char_id, struct quest questlog[])
-{
- int i;
+/**
+ * Loads the entire questlog for a character.
+ *
+ * @param char_id Character ID
+ * @param count Pointer to return the number of found entries.
+ * @return Array of found entries. It has *count entries, and it is care of the
+ * caller to aFree() it afterwards.
+ */
+struct quest *mapif_quests_fromsql(int char_id, int *count) {
+ struct quest *questlog = NULL;
struct quest tmp_quest;
- SqlStmt * stmt;
+ SqlStmt *stmt;
+
+ if (!count)
+ return NULL;
stmt = SQL->StmtMalloc(sql_handle);
- if( stmt == NULL )
- {
+ if (stmt == NULL) {
SqlStmt_ShowDebug(stmt);
- return 0;
+ *count = 0;
+ return NULL;
}
memset(&tmp_quest, 0, sizeof(struct quest));
- if( SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `quest_id`, `state`, `time`, `count1`, `count2`, `count3` FROM `%s` WHERE `char_id`=? LIMIT %d", quest_db, MAX_QUEST_DB)
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
- || SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_quest.quest_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &tmp_quest.state, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &tmp_quest.time, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT, &tmp_quest.count[0], 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &tmp_quest.count[1], 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &tmp_quest.count[2], 0, NULL, NULL) )
+ if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `quest_id`, `state`, `time`, `count1`, `count2`, `count3` FROM `%s` WHERE `char_id`=?", quest_db)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
+ || SQL_ERROR == SQL->StmtExecute(stmt)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_quest.quest_id, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &tmp_quest.state, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &tmp_quest.time, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT, &tmp_quest.count[0], 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &tmp_quest.count[1], 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &tmp_quest.count[2], 0, NULL, NULL)
+ ) {
SqlStmt_ShowDebug(stmt);
+ SQL->StmtFree(stmt);
+ *count = 0;
+ return NULL;
+ }
- for( i = 0; i < MAX_QUEST_DB && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i )
- memcpy(&questlog[i], &tmp_quest, sizeof(tmp_quest));
+ *count = (int)SQL->StmtNumRows(stmt);
+ if (*count > 0) {
+ int i = 0;
+ questlog = (struct quest *)aCalloc(*count, sizeof(struct quest));
+
+ while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) {
+ if (i >= *count) // Sanity check, should never happen
+ break;
+ memcpy(&questlog[i++], &tmp_quest, sizeof(tmp_quest));
+ }
+ if (i < *count) {
+ // Should never happen. Compact array
+ *count = i;
+ questlog = aRealloc(questlog, sizeof(struct quest)*i);
+ }
+ }
SQL->StmtFree(stmt);
- return i;
+ return questlog;
}
-//Delete a quest
-bool mapif_quest_delete(int char_id, int quest_id)
-{
- if ( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `quest_id` = '%d' AND `char_id` = '%d'", quest_db, quest_id, char_id) )
- {
+/**
+ * Deletes a quest from a character's questlog.
+ *
+ * @param char_id Character ID
+ * @param quest_id Quest ID
+ * @return false in case of errors, true otherwise
+ */
+bool mapif_quest_delete(int char_id, int quest_id) {
+ if (SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `quest_id` = '%d' AND `char_id` = '%d'", quest_db, quest_id, char_id)) {
Sql_ShowDebug(sql_handle);
return false;
}
@@ -65,11 +97,18 @@ bool mapif_quest_delete(int char_id, int quest_id)
return true;
}
-//Add a quest to a questlog
-bool mapif_quest_add(int char_id, struct quest qd)
-{
- if ( SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s`(`quest_id`, `char_id`, `state`, `time`, `count1`, `count2`, `count3`) VALUES ('%d', '%d', '%d','%d', '%d', '%d', '%d')", quest_db, qd.quest_id, char_id, qd.state, qd.time, qd.count[0], qd.count[1], qd.count[2]) )
- {
+/**
+ * Adds a quest to a character's questlog.
+ *
+ * @param char_id Character ID
+ * @param qd Quest data
+ * @return false in case of errors, true otherwise
+ */
+bool mapif_quest_add(int char_id, struct quest qd) {
+ if (SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s`(`quest_id`, `char_id`, `state`, `time`, `count1`, `count2`, `count3`) "
+ "VALUES ('%d', '%d', '%d','%d', '%d', '%d', '%d')",
+ quest_db, qd.quest_id, char_id, qd.state, qd.time, qd.count[0], qd.count[1], qd.count[2])
+ ) {
Sql_ShowDebug(sql_handle);
return false;
}
@@ -77,11 +116,18 @@ bool mapif_quest_add(int char_id, struct quest qd)
return true;
}
-//Update a questlog
-bool mapif_quest_update(int char_id, struct quest qd)
-{
- if ( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `state`='%d', `count1`='%d', `count2`='%d', `count3`='%d' WHERE `quest_id` = '%d' AND `char_id` = '%d'", quest_db, qd.state, qd.count[0], qd.count[1], qd.count[2], qd.quest_id, char_id) )
- {
+/**
+ * Updates a quest in a character's questlog.
+ *
+ * @param char_id Character ID
+ * @param qd Quest data
+ * @return false in case of errors, true otherwise
+ */
+bool mapif_quest_update(int char_id, struct quest qd) {
+ if (SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `state`='%d', `count1`='%d', `count2`='%d', `count3`='%d' "
+ "WHERE `quest_id` = '%d' AND `char_id` = '%d'",
+ quest_db, qd.state, qd.count[0], qd.count[1], qd.count[2], qd.quest_id, char_id)
+ ) {
Sql_ShowDebug(sql_handle);
return false;
}
@@ -89,42 +135,52 @@ bool mapif_quest_update(int char_id, struct quest qd)
return true;
}
-//Save quests
-int mapif_parse_quest_save(int fd)
-{
- int i, j, k, num2, num1 = (RFIFOW(fd,2)-8)/sizeof(struct quest);
+/**
+ * Handles the save request from mapserver for a character's questlog.
+ *
+ * Received quests are saved, and an ack is sent back to the map server.
+ *
+ * @see inter_parse_frommap
+ */
+int mapif_parse_quest_save(int fd) {
+ int i, j, k, old_n, new_n = (RFIFOW(fd,2)-8)/sizeof(struct quest);
int char_id = RFIFOL(fd,4);
- struct quest qd1[MAX_QUEST_DB],qd2[MAX_QUEST_DB];
+ struct quest *old_qd = NULL, *new_qd = NULL;
bool success = true;
- memset(qd1, 0, sizeof(qd1));
- memset(qd2, 0, sizeof(qd2));
- if( num1 ) memcpy(&qd1, RFIFOP(fd,8), RFIFOW(fd,2)-8);
- num2 = mapif_quests_fromsql(char_id, qd2);
-
- for( i = 0; i < num1; i++ )
- {
- ARR_FIND( 0, num2, j, qd1[i].quest_id == qd2[j].quest_id );
- if( j < num2 ) // Update existed quests
- { // Only states and counts are changable.
- ARR_FIND( 0, MAX_QUEST_OBJECTIVES, k, qd1[i].count[k] != qd2[j].count[k] );
- if( k != MAX_QUEST_OBJECTIVES || qd1[i].state != qd2[j].state )
- success &= mapif_quest_update(char_id, qd1[i]);
-
- if( j < (--num2) )
- {
- memmove(&qd2[j],&qd2[j+1],sizeof(struct quest)*(num2-j));
- memset(&qd2[num2], 0, sizeof(struct quest));
- }
+ if (new_n)
+ new_qd = (struct quest*)RFIFOP(fd,8);
+
+ old_qd = mapif_quests_fromsql(char_id, &old_n);
+
+ for (i = 0; i < new_n; i++) {
+ ARR_FIND( 0, old_n, j, new_qd[i].quest_id == old_qd[j].quest_id );
+ if (j < old_n) {
+ // Update existing quests
+ // Only states and counts are changable.
+ ARR_FIND( 0, MAX_QUEST_OBJECTIVES, k, new_qd[i].count[k] != old_qd[j].count[k] );
+ if (k != MAX_QUEST_OBJECTIVES || new_qd[i].state != old_qd[j].state)
+ success &= mapif_quest_update(char_id, new_qd[i]);
+
+ if (j < (--old_n)) {
+ // Compact array
+ memmove(&old_qd[j],&old_qd[j+1],sizeof(struct quest)*(old_n-j));
+ memset(&old_qd[old_n], 0, sizeof(struct quest));
+ }
+ } else {
+ // Add new quests
+ success &= mapif_quest_add(char_id, new_qd[i]);
}
- else // Add new quests
- success &= mapif_quest_add(char_id, qd1[i]);
}
- for( i = 0; i < num2; i++ ) // Quests not in qd1 but in qd2 are to be erased.
- success &= mapif_quest_delete(char_id, qd2[i].quest_id);
+ for (i = 0; i < old_n; i++) // Quests not in new_qd but in old_qd are to be erased.
+ success &= mapif_quest_delete(char_id, old_qd[i].quest_id);
+ if (old_qd)
+ aFree(old_qd);
+
+ // Send ack
WFIFOHEAD(fd,7);
WFIFOW(fd,0) = 0x3861;
WFIFOL(fd,2) = char_id;
@@ -134,48 +190,45 @@ int mapif_parse_quest_save(int fd)
return 0;
}
-//Send questlog to map server
-int mapif_parse_quest_load(int fd)
-{
+/**
+ * Sends questlog to the map server
+ *
+ * Note: Completed quests (state == Q_COMPLETE) are guaranteed to be sent last
+ * and the map server relies on this behavior (once the first Q_COMPLETE quest,
+ * all of them are considered to be Q_COMPLETE)
+ *
+ * @see inter_parse_frommap
+ */
+int mapif_parse_quest_load(int fd) {
int char_id = RFIFOL(fd,2);
- struct quest tmp_questlog[MAX_QUEST_DB];
- int num_quests, i, num_complete = 0;
- int complete[MAX_QUEST_DB];
-
- memset(tmp_questlog, 0, sizeof(tmp_questlog));
- memset(complete, 0, sizeof(complete));
+ struct quest *tmp_questlog = NULL;
+ int num_quests;
- num_quests = mapif_quests_fromsql(char_id, tmp_questlog);
+ tmp_questlog = mapif_quests_fromsql(char_id, &num_quests);
WFIFOHEAD(fd,num_quests*sizeof(struct quest)+8);
WFIFOW(fd,0) = 0x3860;
WFIFOW(fd,2) = num_quests*sizeof(struct quest)+8;
WFIFOL(fd,4) = char_id;
- //Active and inactive quests
- for( i = 0; i < num_quests; i++ )
- {
- if( tmp_questlog[i].state == Q_COMPLETE )
- {
- complete[num_complete++] = i;
- continue;
- }
- memcpy(WFIFOP(fd,(i-num_complete)*sizeof(struct quest)+8), &tmp_questlog[i], sizeof(struct quest));
- }
-
- // Completed quests
- for( i = num_quests - num_complete; i < num_quests; i++ )
- memcpy(WFIFOP(fd,i*sizeof(struct quest)+8), &tmp_questlog[complete[i-num_quests+num_complete]], sizeof(struct quest));
+ if (num_quests > 0)
+ memcpy(WFIFOP(fd,8), tmp_questlog, sizeof(struct quest)*num_quests);
WFIFOSET(fd,num_quests*sizeof(struct quest)+8);
+ if (tmp_questlog)
+ aFree(tmp_questlog);
+
return 0;
}
-int inter_quest_parse_frommap(int fd)
-{
- switch(RFIFOW(fd,0))
- {
+/**
+ * Parses questlog related packets from the map server.
+ *
+ * @see inter_parse_frommap
+ */
+int inter_quest_parse_frommap(int fd) {
+ switch(RFIFOW(fd,0)) {
case 0x3060: mapif_parse_quest_load(fd); break;
case 0x3061: mapif_parse_quest_save(fd); break;
default:
diff --git a/src/char/int_quest.h b/src/char/int_quest.h
index f2a0b626e..b0403f436 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -4,9 +4,6 @@
#ifndef _QUEST_H_
#define _QUEST_H_
-/*questlog system*/
-struct quest;
-
int inter_quest_parse_frommap(int fd);
#endif
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 30671df5e..0313f2a41 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -242,18 +242,17 @@ int mapif_itembound_ack(int fd, int aid, int guild_id)
#ifdef GP_BOUND_ITEMS
WFIFOHEAD(fd,8);
WFIFOW(fd,0) = 0x3856;
- WFIFOL(fd,2) = aid;
+ WFIFOL(fd,2) = aid;/* the value is not being used, drop? */
WFIFOW(fd,6) = guild_id;
WFIFOSET(fd,8);
#endif
return 0;
}
-
//------------------------------------------------
//Guild bound items pull for offline characters [Akinari]
//Revised by [Mhalicot]
//------------------------------------------------
-int mapif_parse_ItemBoundRetrieve(int fd)
+int mapif_parse_ItemBoundRetrieve_sub(int fd)
{
#ifdef GP_BOUND_ITEMS
StringBuf buf;
@@ -357,11 +356,14 @@ int mapif_parse_ItemBoundRetrieve(int fd)
//Finally reload storage and tell map we're done
mapif_load_guild_storage(fd,aid,guild_id,0);
- mapif_itembound_ack(fd,aid,guild_id);
#endif
return 0;
}
-
+void mapif_parse_ItemBoundRetrieve(int fd) {
+ mapif_parse_ItemBoundRetrieve_sub(fd);
+ /* tell map server the operation is over and it can unlock the storage */
+ mapif_itembound_ack(fd,RFIFOL(fd,6),RFIFOW(fd,10));
+}
int inter_storage_parse_frommap(int fd)
{
RFIFOHEAD(fd);
diff --git a/src/char/inter.c b/src/char/inter.c
index 771b51602..63e1564ff 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -872,7 +872,7 @@ int inter_mapif_init(int fd)
//--------------------------------------------------------
// broadcast sending
-int mapif_broadcast(unsigned char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd)
+int mapif_broadcast(unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd)
{
unsigned char *buf = (unsigned char*)aMalloc((len)*sizeof(unsigned char));
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 005bc2ddc..426fac94a 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -215,6 +215,7 @@ struct hplugin *hplugin_load(const char* filename) {
plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx);
plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx);
plugin->hpi->addArg = HPM->import_symbol("addArg",plugin->idx);
+ plugin->hpi->addConf = HPM->import_symbol("addConf",plugin->idx);
/* server specific */
if( HPM->load_sub )
HPM->load_sub(plugin);
@@ -532,6 +533,9 @@ void* HPM_calloc(size_t num, size_t size, const char *file, int line, const char
void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *func) {
return iMalloc->realloc(p,size,HPM_file2ptr(file),line,func);
}
+void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char *func) {
+ return iMalloc->reallocz(p,size,HPM_file2ptr(file),line,func);
+}
char* HPM_astrdup(const char *p, const char *file, int line, const char *func) {
return iMalloc->astrdup(p,HPM_file2ptr(file),line,func);
}
@@ -602,6 +606,48 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, void (*func)
return true;
}
+bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val)) {
+ struct HPConfListenStorage *conf;
+ unsigned int i;
+
+ if( type >= HPCT_MAX ) {
+ ShowError("HPM->addConf:%s: unknown point '%u' specified for config '%s'\n",HPM->pid2name(pluginID),type,name);
+ return false;
+ }
+
+ for(i = 0; i < HPM->confsc[type]; i++) {
+ if( !strcmpi(name,HPM->confs[type][i].key) ) {
+ ShowError("HPM->addConf:%s: duplicate '%s', already in use by '%s'!",HPM->pid2name(pluginID),name,HPM->pid2name(HPM->confs[type][i].pluginID));
+ return false;
+ }
+ }
+
+ RECREATE(HPM->confs[type], struct HPConfListenStorage, ++HPM->confsc[type]);
+ conf = &HPM->confs[type][HPM->confsc[type] - 1];
+
+ conf->pluginID = pluginID;
+ safestrncpy(conf->key, name, HPM_ADDCONF_LENGTH);
+ conf->func = func;
+
+ return true;
+}
+bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType point) {
+ unsigned int i;
+
+ /* exists? */
+ for(i = 0; i < HPM->confsc[point]; i++) {
+ if( !strcmpi(w1,HPM->confs[point][i].key) )
+ break;
+ }
+
+ /* trigger and we're set! */
+ if( i != HPM->confsc[point] ) {
+ HPM->confs[point][i].func(w2);
+ return true;
+ }
+
+ return false;
+}
void hplugins_share_defaults(void) {
/* console */
@@ -617,6 +663,7 @@ void hplugins_share_defaults(void) {
HPM->share(HPM_HookStop,"HookStop");
HPM->share(HPM_HookStopped,"HookStopped");
HPM->share(hpm_add_arg,"addArg");
+ HPM->share(hplugins_addconf,"addConf");
/* core */
HPM->share(&runflag,"runflag");
HPM->share(arg_v,"arg_v");
@@ -661,6 +708,7 @@ void hpm_init(void) {
HPMiMalloc->malloc = HPM_mmalloc;
HPMiMalloc->calloc = HPM_calloc;
HPMiMalloc->realloc = HPM_realloc;
+ HPMiMalloc->reallocz = HPM_reallocz;
HPMiMalloc->astrdup = HPM_astrdup;
sscanf(HPM_VERSION, "%u.%u", &HPM->version[0], &HPM->version[1]);
@@ -728,6 +776,11 @@ void hpm_final(void) {
aFree(HPM->packets[i]);
}
+ for( i = 0; i < HPCT_MAX; i++ ) {
+ if( HPM->confsc[i] )
+ aFree(HPM->confs[i]);
+ }
+
HPM->arg_db->destroy(HPM->arg_db,HPM->arg_db_clear_sub);
/* HPM->fnames is cleared after the memory manager goes down */
@@ -736,13 +789,26 @@ void hpm_final(void) {
return;
}
void hpm_defaults(void) {
+ unsigned int i;
HPM = &HPM_s;
HPM->fnames = NULL;
HPM->fnamec = 0;
HPM->force_return = false;
HPM->hooking = false;
-
+ /* */
+ HPM->fnames = NULL;
+ HPM->fnamec = 0;
+ for(i = 0; i < hpPHP_MAX; i++) {
+ HPM->packets[i] = NULL;
+ HPM->packetsc[i] = 0;
+ }
+ for(i = 0; i < HPCT_MAX; i++) {
+ HPM->confs[i] = NULL;
+ HPM->confsc[i] = 0;
+ }
+ HPM->arg_db = NULL;
+ /* */
HPM->init = hpm_init;
HPM->final = hpm_final;
@@ -767,4 +833,5 @@ void hpm_defaults(void) {
HPM->arg_help = hpm_arg_help;
HPM->grabHPData = hplugins_grabHPData;
HPM->grabHPDataSub = NULL;
+ HPM->parseConf = hplugins_parse_conf;
}
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 5466693ab..1f2ba4648 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -28,8 +28,10 @@
#define plugin_import(x,y,z) (z)dlsym((x),(y))
#define plugin_close(x) dlclose(x)
- #ifdef CYGWIN
+ #if defined CYGWIN
#define DLL_EXT ".dll"
+ #elif defined __DARWIN__
+ #define DLL_EXT ".dylib"
#else
#define DLL_EXT ".so"
#endif
@@ -86,6 +88,12 @@ struct HPDataOperationStorage {
void **HPDataSRCPtr;
unsigned int *hdatac;
};
+/* */
+struct HPConfListenStorage {
+ unsigned int pluginID;
+ char key[HPM_ADDCONF_LENGTH];
+ void (*func) (const char *val);
+};
/* Hercules Plugin Manager Interface */
struct HPM_interface {
@@ -106,6 +114,9 @@ struct HPM_interface {
/* plugin file ptr caching */
struct HPMFileNameCache *fnames;
unsigned int fnamec;
+ /* config listen */
+ struct HPConfListenStorage *confs[HPCT_MAX];
+ unsigned int confsc[HPCT_MAX];
/* --command-line */
DBMap *arg_db;
/* funcs */
@@ -133,6 +144,8 @@ struct HPM_interface {
void (*grabHPData) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr);
/* for server-specific HPData e.g. map_session_data */
void (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr);
+ /* for custom config parsing */
+ bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point);
} HPM_s;
struct HPM_interface *HPM;
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 2cd1075c4..742132cde 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -36,6 +36,7 @@ struct map_session_data;
#include "../common/showmsg.h"
#define HPM_VERSION "1.0"
+#define HPM_ADDCONF_LENGTH 40
struct hplugin_info {
char* name;
@@ -83,6 +84,12 @@ enum HPluginDataTypes {
HPDT_NPCD,
};
+/* used in macros and conf storage */
+enum HPluginConfType {
+ HPCT_BATTLE, /* battle-conf (map-server */
+ HPCT_MAX,
+};
+
#define addHookPre(tname,hook) (HPMi->AddHook(HOOK_TYPE_PRE,(tname),(hook),HPMi->pid))
#define addHookPost(tname,hook) (HPMi->AddHook(HOOK_TYPE_POST,(tname),(hook),HPMi->pid))
/* need better names ;/ */
@@ -128,6 +135,8 @@ enum HPluginDataTypes {
}
/* HPMi->addPacket */
#define addPacket(cmd,len,receive,point) HPMi->addPacket(cmd,len,receive,point,HPMi->pid)
+/* HPMi->addBattleConf */
+#define addBattleConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_BATTLE,bcname,funcname)
/* Hercules Plugin Mananger Include Interface */
HPExport struct HPMi_interface {
@@ -150,6 +159,8 @@ HPExport struct HPMi_interface {
bool (*HookStopped) (void);
/* program --arg/-a */
bool (*addArg) (unsigned int pluginID, char *name, bool has_param,void (*func) (char *param),void (*help) (void));
+ /* battle-config recv param */
+ bool (*addConf) (unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val));
} HPMi_s;
#ifndef _HPM_H_
HPExport struct HPMi_interface *HPMi;
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index 1e23ab5e8..7bb9ae630 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -15,8 +15,8 @@ MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
MT19937AR_INCLUDE = -I$(MT19937AR_D)
COMMON_SHARED_C = conf.c db.c des.c ers.c grfio.c HPM.c mapindex.c md5calc.c \
- mempool.c mutex.c nullpo.c raconf.c random.c showmsg.c strlib.c \
- thread.c timer.c utils.c
+ mutex.c nullpo.c random.c showmsg.c strlib.c thread.c \
+ timer.c utils.c
COMMON_C = $(COMMON_SHARED_C)
COMMON_SHARED_OBJ = $(patsubst %.c,%.o,$(COMMON_SHARED_C))
COMMON_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \
@@ -25,9 +25,8 @@ COMMON_MINI_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \
miniconsole.o minicore.o minimalloc.o minisocket.o)
COMMON_C += console.c core.c malloc.c socket.c
COMMON_H = atomic.h cbasetypes.h conf.h console.h core.h db.h des.h ers.h \
- evdp.h grfio.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h \
- mempool.h mmo.h mutex.h netbuffer.h network.h nullpo.h raconf.h \
- random.h showmsg.h socket.h spinlock.h sql.h strlib.h \
+ grfio.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h mmo.h mutex.h \
+ nullpo.h random.h showmsg.h socket.h spinlock.h sql.h strlib.h \
thread.h timer.h utils.h winapi.h
COMMON_SQL_OBJ = obj_sql/sql.o
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 6de2ace01..120f4f861 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -255,6 +255,13 @@ typedef uintptr_t uintptr;
#define ra_align(n) __attribute__(( aligned(n) ))
#endif
+// Directives for the (clang) static analyzer
+#ifdef __clang__
+#define analyzer_noreturn __attribute__((analyzer_noreturn))
+#else
+#define analyzer_noreturn
+#endif
+
/////////////////////////////
// for those still not building c++
@@ -353,23 +360,6 @@ typedef char bool;
#endif
//////////////////////////////////////////////////////////////////////////
-// Assert
-
-#if ! defined(Assert)
-#if defined(RELEASE)
-#define Assert(EX)
-#else
-// extern "C" {
-#include <assert.h>
-// }
-#if !defined(DEFCPP) && defined(WIN32) && !defined(MINGW)
-#include <crtdbg.h>
-#endif
-#define Assert(EX) assert(EX)
-#endif
-#endif /* ! defined(Assert) */
-
-//////////////////////////////////////////////////////////////////////////
// Has to be unsigned to avoid problems in some systems
// Problems arise when these functions expect an argument in the range [0,256[ and are fed a signed char.
#include <ctype.h>
@@ -405,7 +395,7 @@ typedef char bool;
//////////////////////////////////////////////////////////////////////////
-// Use the preprocessor to 'stringify' stuff (concert to a string).
+// Use the preprocessor to 'stringify' stuff (convert to a string).
// example:
// #define TESTE blabla
// QUOTE(TESTE) -> "TESTE"
diff --git a/src/common/core.c b/src/common/core.c
index dd839b372..8178a48a5 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -15,7 +15,6 @@
#include "../common/socket.h"
#include "../common/timer.h"
#include "../common/thread.h"
- #include "../common/mempool.h"
#include "../common/sql.h"
#include "../config/core.h"
#include "../common/HPM.h"
@@ -328,7 +327,6 @@ int main (int argc, char **argv) {
Sql_Init();
rathread_init();
- mempool_init();
DB->init();
signals_init();
@@ -370,7 +368,6 @@ int main (int argc, char **argv) {
timer->final();
socket_final();
DB->final();
- mempool_final();
rathread_final();
#endif
diff --git a/src/common/db.c b/src/common/db.c
index c3ca7e0a4..efe7ca8b2 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -1696,7 +1696,7 @@ static DBData* db_obj_vensure(DBMap* self, DBKey key, DBCreateData create, va_li
if (db->options&DB_OPT_DUP_KEY) {
node->key = db_dup_key(db, key);
if (db->options&DB_OPT_RELEASE_KEY)
- db->release(key, *data, DB_RELEASE_KEY);
+ db->release(key, node->data, DB_RELEASE_KEY);
} else {
node->key = key;
}
@@ -2446,7 +2446,7 @@ DBMap* db_alloc(const char *file, const char *func, int line, DBType type, DBOpt
db->free_lock = 0;
/* Other */
snprintf(ers_name, 50, "db_alloc:nodes:%s:%s:%d",func,file,line);
- db->nodes = ers_new(sizeof(struct dbn),ers_name,ERS_OPT_WAIT|ERS_OPT_FREE_NAME);
+ db->nodes = ers_new(sizeof(struct dbn),ers_name,ERS_OPT_WAIT|ERS_OPT_FREE_NAME|ERS_OPT_CLEAN);
db->cmp = DB->default_cmp(type);
db->hash = DB->default_hash(type);
db->release = DB->default_release(type, options);
@@ -2609,8 +2609,8 @@ void* db_data2ptr(DBData *data)
* @see #db_final(void)
*/
void db_init(void) {
- db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_NONE);
- db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_NONE);
+ db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_CLEAN);
+ db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_CLEAN);
ers_chunk_size(db_alloc_ers, 50);
DB_COUNTSTAT(db_init);
}
diff --git a/src/common/db.h b/src/common/db.h
index b9d6af382..5f4478909 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -1121,8 +1121,10 @@ void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...);
#define VECTOR_ENSURE(__vec,__n,__step) \
do{ \
size_t _empty_ = VECTOR_CAPACITY(__vec)-VECTOR_LENGTH(__vec); \
- while( (__n) > _empty_ ) _empty_ += (__step); \
- if( _empty_ != VECTOR_CAPACITY(__vec)-VECTOR_LENGTH(__vec) ) VECTOR_RESIZE(__vec,_empty_+VECTOR_LENGTH(__vec)); \
+ if( (__n) > _empty_ ) { \
+ while( (__n) > _empty_ ) _empty_ += (__step); \
+ VECTOR_RESIZE(__vec,_empty_+VECTOR_LENGTH(__vec)); \
+ } \
}while(0)
diff --git a/src/common/ers.c b/src/common/ers.c
index 22269a51f..a7dad49ab 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -40,6 +40,7 @@
* @see common#ers.h *
\*****************************************************************************/
#include <stdlib.h>
+#include <string.h>
#include "../common/cbasetypes.h"
#include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree
@@ -238,6 +239,9 @@ static void ers_obj_free_entry(ERS self, void *entry)
return;
}
+ if( instance->Options & ERS_OPT_CLEAN )
+ memset((unsigned char*)reuse + sizeof(struct ers_list), 0, instance->Cache->ObjectSize - sizeof(struct ers_list));
+
reuse->Next = instance->Cache->ReuseList;
instance->Cache->ReuseList = reuse;
instance->Count--;
diff --git a/src/common/ers.h b/src/common/ers.h
index 4ff2a6230..e63711b81 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -71,10 +71,11 @@
#endif /* not ERS_ALIGN_ENTRY */
enum ERSOptions {
- ERS_OPT_NONE = 0x0,
- ERS_OPT_CLEAR = 0x1,/* silently clears any entries left in the manager upon destruction */
- ERS_OPT_WAIT = 0x2,/* wait for entries to come in order to list! */
- ERS_OPT_FREE_NAME = 0x4,/* name is dynamic memory, and should be freed */
+ ERS_OPT_NONE = 0x0,
+ ERS_OPT_CLEAR = 0x1,/* silently clears any entries left in the manager upon destruction */
+ ERS_OPT_WAIT = 0x2,/* wait for entries to come in order to list! */
+ ERS_OPT_FREE_NAME = 0x4,/* name is dynamic memory, and should be freed */
+ ERS_OPT_CLEAN = 0x8,/* clears used memory upon ers_free so that its all new to be reused on the next alloc */
};
/**
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 77b976926..57e8a5187 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -8,6 +8,7 @@
#include "../common/showmsg.h"
#include "../common/strlib.h"
#include "../common/utils.h"
+#include "../common/nullpo.h"
#include "grfio.h"
#include <stdio.h>
@@ -305,17 +306,21 @@ static FILELIST* filelist_find(const char* fname)
// returns the original file name
char* grfio_find_file(const char* fname)
{
- FILELIST *filelist = filelist_find(fname);
- if (!filelist) return NULL;
- return (!filelist->fnd ? filelist->fn : filelist->fnd);
+ FILELIST *flist = filelist_find(fname);
+ if (!flist) return NULL;
+ return (!flist->fnd ? flist->fn : flist->fnd);
}
// adds a FILELIST entry into the list of loaded files
-static FILELIST* filelist_add(FILELIST* entry)
-{
+static FILELIST* filelist_add(FILELIST* entry) {
int hash;
+ nullpo_ret(entry);
+#ifdef __clang_analyzer__
+ // Make clang's static analyzer shut up about a possible NULL pointer in &filelist[filelist_entrys]
+ nullpo_ret(&filelist[filelist_entrys]);
+#endif // __clang_analyzer__
- #define FILELIST_ADDS 1024 // number increment of file lists `
+#define FILELIST_ADDS 1024 // number increment of file lists `
if (filelist_entrys >= filelist_maxentry) {
filelist = (FILELIST *)aRealloc(filelist, (filelist_maxentry + FILELIST_ADDS) * sizeof(FILELIST));
@@ -323,7 +328,9 @@ static FILELIST* filelist_add(FILELIST* entry)
filelist_maxentry += FILELIST_ADDS;
}
- memcpy (&filelist[filelist_entrys], entry, sizeof(FILELIST));
+#undef FILELIST_ADDS
+
+ memcpy(&filelist[filelist_entrys], entry, sizeof(FILELIST));
hash = filehash(entry->fn);
filelist[filelist_entrys].next = filelist_hash[hash];
@@ -405,7 +412,7 @@ void* grfio_reads(const char* fname, int* size)
if( in != NULL ) {
int declen;
fseek(in,0,SEEK_END);
- declen = ftell(in);
+ declen = (int)ftell(in);
fseek(in,0,SEEK_SET);
buf2 = (unsigned char *)aMalloc(declen+1); // +1 for resnametable zero-termination
if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname);
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 1cb7836ab..f7f108304 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -369,6 +369,37 @@ void* _mrealloc(void *memblock, size_t size, const char *file, int line, const c
}
}
+/* a _mrealloc clone with the difference it 'z'eroes the newly created memory */
+void* _mreallocz(void *memblock, size_t size, const char *file, int line, const char *func ) {
+ size_t old_size;
+ void *p = NULL;
+
+ if(memblock == NULL) {
+ p = iMalloc->malloc(size,file,line,func);
+ memset(p,0,size);
+ return p;
+ }
+
+ old_size = ((struct unit_head *)((char *)memblock - sizeof(struct unit_head) + sizeof(long)))->size;
+ if( old_size == 0 ) {
+ old_size = ((struct unit_head_large *)((char *)memblock - sizeof(struct unit_head_large) + sizeof(long)))->size;
+ }
+ if(old_size > size) {
+ // Size reduction - return> as it is (negligence)
+ return memblock;
+ } else {
+ // Size Large
+ p = iMalloc->malloc(size,file,line,func);
+ if(p != NULL) {
+ memcpy(p,memblock,old_size);
+ memset((char*)p+old_size,0,size-old_size);
+ }
+ iMalloc->free(memblock,file,line,func);
+ return p;
+ }
+}
+
+
char* _mstrdup(const char *p, const char *file, int line, const char *func )
{
if(p == NULL) {
@@ -669,7 +700,7 @@ void memmgr_report (int extra) {
struct {
const char *file;
unsigned short line;
- unsigned int size;
+ size_t size;
unsigned int count;
} data[100];
memset(&data, 0, sizeof(data));
@@ -822,12 +853,14 @@ void malloc_defaults(void) {
iMalloc->malloc = _mmalloc;
iMalloc->calloc = _mcalloc;
iMalloc->realloc = _mrealloc;
+ iMalloc->reallocz= _mreallocz;
iMalloc->astrdup = _mstrdup;
iMalloc->free = _mfree;
#else
iMalloc->malloc = aMalloc_;
iMalloc->calloc = aCalloc_;
iMalloc->realloc = aRealloc_;
+ iMalloc->reallocz= aRealloc_;/* not using memory manager huhum o.o perhaps we could still do something about */
iMalloc->astrdup = aStrdup_;
iMalloc->free = aFree_;
#endif
diff --git a/src/common/malloc.h b/src/common/malloc.h
index cd0ef238b..19b5213bb 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -33,6 +33,7 @@
# define aMalloc(n) (iMalloc->malloc((n),ALC_MARK))
# define aCalloc(m,n) (iMalloc->calloc((m),(n),ALC_MARK))
# define aRealloc(p,n) (iMalloc->realloc((p),(n),ALC_MARK))
+# define aReallocz(p,n) (iMalloc->reallocz((p),(n),ALC_MARK))
# define aStrdup(p) (iMalloc->astrdup((p),ALC_MARK))
# define aFree(p) (iMalloc->free((p),ALC_MARK))
@@ -54,7 +55,7 @@
////////////// Others //////////////////////////
// should be merged with any of above later
#define CREATE(result, type, number) ((result) = (type *) aCalloc((number), sizeof(type)))
-#define RECREATE(result, type, number) ((result) = (type *) aRealloc((result), sizeof(type) * (number)))
+#define RECREATE(result, type, number) ((result) = (type *) aReallocz((result), sizeof(type) * (number)))
////////////////////////////////////////////////
@@ -73,6 +74,7 @@ struct malloc_interface {
void* (*malloc )(size_t size, const char *file, int line, const char *func);
void* (*calloc )(size_t num, size_t size, const char *file, int line, const char *func);
void* (*realloc )(void *p, size_t size, const char *file, int line, const char *func);
+ void* (*reallocz)(void *p, size_t size, const char *file, int line, const char *func);
char* (*astrdup )(const char *p, const char *file, int line, const char *func);
void (*free )(void *p, const char *file, int line, const char *func);
/* */
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 1d2569afe..3128a3cb0 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -13,19 +13,8 @@
#include <stdio.h>
#include <stdlib.h>
-struct _indexes {
- char name[MAP_NAME_LENGTH]; //Stores map name
-} indexes[MAX_MAPINDEX];
-
-int max_index = 0;
-
-char mapindex_cfgfile[80] = "db/map_index.txt";
-
-#define mapindex_exists_sub(id) (indexes[id].name[0] != '\0')
-
-bool mapindex_exists(int id) {
- return mapindex_exists_sub(id);
-}
+/* mapindex.c interface source */
+struct mapindex_interface mapindex_s;
/// Retrieves the map name from 'string' (removing .gat extension if present).
/// Result gets placed either into 'buf' or in a static local buffer.
@@ -83,9 +72,8 @@ int mapindex_addmap(int index, const char* name) {
char map_name[MAP_NAME_LENGTH];
if (index == -1){
- for (index = 1; index < max_index; index++) {
- //if (strcmp(indexes[index].name,"#CLEARED#")==0)
- if (indexes[index].name[0] == '\0')
+ for (index = 1; index < mapindex->num; index++) {
+ if (mapindex->list[index].name[0] == '\0')
break;
}
}
@@ -95,7 +83,7 @@ int mapindex_addmap(int index, const char* name) {
return 0;
}
- mapindex_getmapname(name, map_name);
+ mapindex->getmapname(name, map_name);
if (map_name[0] == '\0') {
ShowError("(mapindex_add) Cannot add maps with no name.\n");
@@ -107,15 +95,16 @@ int mapindex_addmap(int index, const char* name) {
return 0;
}
- if (mapindex_exists_sub(index)) {
- ShowWarning("(mapindex_add) Overriding index %d: map \"%s\" -> \"%s\"\n", index, indexes[index].name, map_name);
- strdb_remove(mapindex_db, indexes[index].name);
+ if (mapindex_exists(index)) {
+ ShowWarning("(mapindex_add) Overriding index %d: map \"%s\" -> \"%s\"\n", index, mapindex->list[index].name, map_name);
+ strdb_remove(mapindex->db, mapindex->list[index].name);
}
- safestrncpy(indexes[index].name, map_name, MAP_NAME_LENGTH);
- strdb_iput(mapindex_db, map_name, index);
- if (max_index <= index)
- max_index = index+1;
+ safestrncpy(mapindex->list[index].name, map_name, MAP_NAME_LENGTH);
+ strdb_iput(mapindex->db, map_name, index);
+
+ if (mapindex->num <= index)
+ mapindex->num = index+1;
return index;
}
@@ -124,9 +113,9 @@ unsigned short mapindex_name2id(const char* name) {
int i;
char map_name[MAP_NAME_LENGTH];
- mapindex_getmapname(name, map_name);
+ mapindex->getmapname(name, map_name);
- if( (i = strdb_iget(mapindex_db, map_name)) )
+ if( (i = strdb_iget(mapindex->db, map_name)) )
return i;
ShowDebug("mapindex_name2id: Map \"%s\" not found in index list!\n", map_name);
@@ -134,11 +123,11 @@ unsigned short mapindex_name2id(const char* name) {
}
const char* mapindex_id2name_sub(unsigned short id,const char *file, int line, const char *func) {
- if (id > MAX_MAPINDEX || !mapindex_exists_sub(id)) {
+ if (id > MAX_MAPINDEX || !mapindex_exists(id)) {
ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache. %s:%s:%d\n", id,file,func,line);
- return indexes[0].name; // dummy empty string so that the callee doesn't crash
+ return mapindex->list[0].name; // dummy empty string so that the callee doesn't crash
}
- return indexes[id].name;
+ return mapindex->list[id].name;
}
int mapindex_init(void) {
@@ -148,12 +137,13 @@ int mapindex_init(void) {
int index, total = 0;
char map_name[12];
- if( ( fp = fopen(mapindex_cfgfile,"r") ) == NULL ){
- ShowFatalError("Unable to read mapindex config file %s!\n", mapindex_cfgfile);
+ if( ( fp = fopen(mapindex->config_file,"r") ) == NULL ){
+ ShowFatalError("Unable to read mapindex config file %s!\n", mapindex->config_file);
exit(EXIT_FAILURE); //Server can't really run without this file.
}
- memset (&indexes, 0, sizeof (indexes));
- mapindex_db = strdb_alloc(DB_OPT_DUP_KEY, MAP_NAME_LENGTH);
+
+ mapindex->db = strdb_alloc(DB_OPT_DUP_KEY, MAP_NAME_LENGTH);
+
while(fgets(line, sizeof(line), fp)) {
if(line[0] == '/' && line[1] == '/')
continue;
@@ -162,7 +152,7 @@ int mapindex_init(void) {
case 1: //Map with no ID given, auto-assign
index = last_index+1;
case 2: //Map with ID given
- mapindex_addmap(index,map_name);
+ mapindex->addmap(index,map_name);
total++;
break;
default:
@@ -172,18 +162,40 @@ int mapindex_init(void) {
}
fclose(fp);
- if( !strdb_iget(mapindex_db, MAP_DEFAULT) ) {
+ if( !strdb_iget(mapindex->db, MAP_DEFAULT) ) {
ShowError("mapindex_init: MAP_DEFAULT '%s' not found in cache! update mapindex.h MAP_DEFAULT var!!!\n",MAP_DEFAULT);
}
+
return total;
}
-int mapindex_removemap(int index){
- strdb_remove(mapindex_db, indexes[index].name);
- indexes[index].name[0] = '\0';
- return 0;
+void mapindex_removemap(int index){
+ strdb_remove(mapindex->db, mapindex->list[index].name);
+ mapindex->list[index].name[0] = '\0';
}
void mapindex_final(void) {
- db_destroy(mapindex_db);
+ db_destroy(mapindex->db);
+}
+
+void mapindex_defaults(void) {
+ mapindex = &mapindex_s;
+
+ /* TODO: place it in inter-server.conf? */
+ snprintf(mapindex->config_file, 80, "%s","db/map_index.txt");
+ /* */
+ mapindex->db = NULL;
+ mapindex->num = 0;
+ memset (&mapindex->list, 0, sizeof (mapindex->list));
+
+ /* */
+ mapindex->init = mapindex_init;
+ mapindex->final = mapindex_final;
+ /* */
+ mapindex->addmap = mapindex_addmap;
+ mapindex->removemap = mapindex_removemap;
+ mapindex->getmapname = mapindex_getmapname;
+ mapindex->getmapname_ext = mapindex_getmapname_ext;
+ mapindex->name2id = mapindex_name2id;
+ mapindex->id2name = mapindex_id2name_sub;
}
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index cf5486808..98150f441 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -6,17 +6,16 @@
#define _MAPINDEX_H_
#include "../common/db.h"
+#include "../common/mmo.h"
+
+#define MAX_MAPINDEX 2000
+
+/* wohoo, someone look at all those |: map_default could (or *should*) be a char-server.conf */
// When a map index search fails, return results from what map? default:prontera
#define MAP_DEFAULT "prontera"
#define MAP_DEFAULT_X 150
#define MAP_DEFAULT_Y 150
-DBMap *mapindex_db;
-
-//File in charge of assigning a numberic ID to each map in existance for space saving when passing map info between servers.
-extern char mapindex_cfgfile[80];
-
-#define MAX_MAPINDEX 2000
//Some definitions for the mayor city maps.
#define MAP_PRONTERA "prontera"
@@ -56,16 +55,39 @@ extern char mapindex_cfgfile[80];
#define MAP_MALAYA "malaya"
#define MAP_ECLAGE "eclage"
-bool mapindex_exists(int id);
-const char* mapindex_getmapname(const char* string, char* output);
-const char* mapindex_getmapname_ext(const char* string, char* output);
-unsigned short mapindex_name2id(const char*);
-#define mapindex_id2name(n) mapindex_id2name_sub((n),__FILE__, __LINE__, __func__)
-const char* mapindex_id2name_sub(unsigned short,const char *file, int line, const char *func);
-int mapindex_init(void);
-void mapindex_final(void);
+#define mapindex_id2name(n) mapindex->id2name((n),__FILE__, __LINE__, __func__)
+#define mapindex_exists(n) ( mapindex->list[(n)].name[0] != '\0' )
+
+/**
+ * mapindex.c interface
+ **/
+struct mapindex_interface {
+ char config_file[80];
+ /* mapname (str) -> index (int) */
+ DBMap *db;
+ /* number of entries in the index table */
+ int num;
+ /* index list -- since map server map count is *unlimited* this should be too */
+ struct {
+ char name[MAP_NAME_LENGTH];
+ } list[MAX_MAPINDEX];
+ /* */
+ int (*init) (void);
+ void (*final) (void);
+ /* */
+ int (*addmap) (int index, const char* name);
+ void (*removemap) (int index);
+ const char* (*getmapname) (const char* string, char* output);
+ /* TODO: server shouldn't be handling the extension, game client automatically adds .gat/.rsw/.whatever
+ * and there are official map names taking advantage of it that we cant support due to the .gat room being saved */
+ const char* (*getmapname_ext) (const char* string, char* output);
+ /* TODO: Hello World! make up your mind, this thing is int on some places and unsigned short on others */
+ unsigned short (*name2id) (const char*);
+ const char* (*id2name) (unsigned short,const char *file, int line, const char *func);
+};
+
+struct mapindex_interface *mapindex;
-int mapindex_addmap(int index, const char* name);
-int mapindex_removemap(int index);
+void mapindex_defaults(void);
#endif /* _MAPINDEX_H_ */
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 5816b467c..b33b01fa7 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -119,7 +119,6 @@
#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
#define MAX_GUILDLEVEL 50
#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
-#define MAX_QUEST_DB 2670 // Max quests that the server will load
#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
@@ -202,14 +201,19 @@ enum item_types {
};
-// Questlog system [Kevin] [Inkfish]
-typedef enum quest_state { Q_INACTIVE, Q_ACTIVE, Q_COMPLETE } quest_state;
+// Questlog states
+enum quest_state {
+ Q_INACTIVE, ///< Inactive quest (the user can toggle between active and inactive quests)
+ Q_ACTIVE, ///< Active quest
+ Q_COMPLETE, ///< Completed quest
+};
+/// Questlog entry
struct quest {
- int quest_id;
- unsigned int time;
- int count[MAX_QUEST_OBJECTIVES];
- quest_state state;
+ int quest_id; ///< Quest ID
+ unsigned int time; ///< Expiration time
+ int count[MAX_QUEST_OBJECTIVES]; ///< Kill counters of each quest objective
+ enum quest_state state; ///< Current quest state
};
struct item {
@@ -280,7 +284,8 @@ struct accreg {
// For saving status changes across sessions. [Skotlex]
struct status_change_data {
unsigned short type; //SC_type
- long val1, val2, val3, val4, tick; //Remaining duration.
+ int val1, val2, val3, val4;
+ unsigned int tick; //Remaining duration.
};
struct storage_data {
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index 4383109a7..20180dd3b 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -4,88 +4,26 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
-#include "nullpo.h"
+#include "../common/nullpo.h"
#include "../common/showmsg.h"
-// #include "logs.h" // •z΂µ‚Ä‚Ý‚é
-static void nullpo_info_core(const char *file, int line, const char *func,
- const char *fmt, va_list ap);
-
-/*======================================
- * Nullƒ`ƒFƒbƒN ‹y‚Ñ î•ño—Í
- *--------------------------------------*/
-int nullpo_chk_f(const char *file, int line, const char *func, const void *target,
- const char *fmt, ...)
-{
- va_list ap;
-
- if (target != NULL)
- return 0;
-
- va_start(ap, fmt);
- nullpo_info_core(file, line, func, fmt, ap);
- va_end(ap);
- return 1;
-}
-
-int nullpo_chk(const char *file, int line, const char *func, const void *target)
-{
- if (target != NULL)
- return 0;
-
- nullpo_info_core(file, line, func, NULL, NULL);
- return 1;
-}
-
-
-/*======================================
- * nullpoî•ño—Í(ŠO•”ŒÄo‚µŒü‚¯ƒ‰ƒbƒp)
- *--------------------------------------*/
-void nullpo_info_f(const char *file, int line, const char *func,
- const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- nullpo_info_core(file, line, func, fmt, ap);
- va_end(ap);
-}
-
-void nullpo_info(const char *file, int line, const char *func)
-{
- nullpo_info_core(file, line, func, NULL, NULL);
-}
-
-
-/*======================================
- * nullpoî•ño—Í(Main)
- *--------------------------------------*/
-static void nullpo_info_core(const char *file, int line, const char *func,
- const char *fmt, va_list ap)
-{
+/**
+ * Reports failed assertions or NULL pointers
+ *
+ * @param file Source file where the error was detected
+ * @param line Line
+ * @param func Function
+ * @param targetname Name of the checked symbol
+ * @param title Message title to display (i.e. failed assertion or nullpo info)
+ */
+void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) {
if (file == NULL)
file = "??";
- func =
- func == NULL ? "unknown":
- func[0] == '\0' ? "unknown":
- func;
-
- ShowMessage("--- nullpo info --------------------------------------------\n");
- ShowMessage("%s:%d: in func `%s'\n", file, line, func);
- if (fmt != NULL)
- {
- if (fmt[0] != '\0')
- {
- vprintf(fmt, ap);
-
- // ÅŒã‚ɉüs‚µ‚½‚©Šm”F
- if (fmt[strlen(fmt)-1] != '\n')
- ShowMessage("\n");
- }
- }
- ShowMessage("--- end nullpo info ----------------------------------------\n");
+ if (func == NULL || *func == '\0')
+ func = "unknown";
- // ‚±‚±‚ç‚ÅnullpoƒƒO‚ðƒtƒ@ƒCƒ‹‚É‘‚«o‚¹‚½‚ç
- // ‚Ü‚Æ‚ß‚Ä’ño‚Å‚«‚é‚È‚ÆŽv‚Á‚Ä‚¢‚½‚èB
+ ShowError("--- %s --------------------------------------------\n", title);
+ ShowError("%s:%d: '%s' in function `%s'\n", file, line, targetname, func);
+ ShowError("--- end %s ----------------------------------------\n", title);
}
diff --git a/src/common/nullpo.h b/src/common/nullpo.h
index 8ee86a782..05484135c 100644
--- a/src/common/nullpo.h
+++ b/src/common/nullpo.h
@@ -1,225 +1,127 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _NULLPO_H_
-#define _NULLPO_H_
-
+#ifndef COMMON_NULLPO_H
+#define COMMON_NULLPO_H
#include "../common/cbasetypes.h"
-#define NLP_MARK __FILE__, __LINE__, __func__
-
// enabled by default on debug builds
#if defined(DEBUG) && !defined(NULLPO_CHECK)
#define NULLPO_CHECK
#endif
-/*----------------------------------------------------------------------------
- * Macros
- *----------------------------------------------------------------------------
- */
-/*======================================
- * Nullƒ`ƒFƒbƒN ‹y‚Ñ î•ño—ÍŒã return
- *E“WŠJ‚·‚é‚Æif‚Æ‚©return“™‚ªo‚é‚Ì‚Å
- * ˆês’P‘Ì‚ÅŽg‚Á‚Ä‚­‚¾‚³‚¢B
- *Enullpo_ret(x = func());
- * ‚̂悤‚ÈŽg—p–@‚à‘z’肵‚Ä‚¢‚Ü‚·B
- *--------------------------------------
- * nullpo_ret(t)
- * –ß‚è’l 0ŒÅ’è
- * [ˆø”]
- * t ƒ`ƒFƒbƒN‘ÎÛ
- *--------------------------------------
- * nullpo_retv(t)
- * –ß‚è’l ‚È‚µ
- * [ˆø”]
- * t ƒ`ƒFƒbƒN‘ÎÛ
- *--------------------------------------
- * nullpo_retr(ret, t)
- * –ß‚è’l Žw’è
- * [ˆø”]
- * ret return(ret);
- * t ƒ`ƒFƒbƒN‘ÎÛ
- *--------------------------------------
- * nullpo_ret_f(t, fmt, ...)
- * Ú×î•ño—Í—p
- * –ß‚è’l 0
- * [ˆø”]
- * t ƒ`ƒFƒbƒN‘ÎÛ
- * fmt ... vprintf‚É“n‚³‚ê‚é
- * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
- *--------------------------------------
- * nullpo_retv_f(t, fmt, ...)
- * Ú×î•ño—Í—p
- * –ß‚è’l ‚È‚µ
- * [ˆø”]
- * t ƒ`ƒFƒbƒN‘ÎÛ
- * fmt ... vprintf‚É“n‚³‚ê‚é
- * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
- *--------------------------------------
- * nullpo_retr_f(ret, t, fmt, ...)
- * Ú×î•ño—Í—p
- * –ß‚è’l Žw’è
- * [ˆø”]
- * ret return(ret);
- * t ƒ`ƒFƒbƒN‘ÎÛ
- * fmt ... vprintf‚É“n‚³‚ê‚é
- * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
- *--------------------------------------
- */
+// Skip assert checks on release builds
+#if !defined(RELEASE) && !defined(ASSERT_CHECK)
+#define ASSERT_CHECK
+#endif
+
+/** Assert */
+
+#if defined(ASSERT_CHECK)
+// extern "C" {
+#include <assert.h>
+// }
+#if !defined(DEFCPP) && defined(WIN32) && !defined(MINGW)
+#include <crtdbg.h>
+#endif // !DEFCPP && WIN && !MINGW
+#define Assert(EX) assert(EX)
+#define Assert_chk(EX) ( (EX) ? false : (assert_report(__FILE__, __LINE__, __func__, #EX, "failed assertion"), true) )
+#else // ! ASSERT_CHECK
+#define Assert(EX) (EX)
+#define Assert_chk(EX) ((EX), false)
+#endif // ASSERT_CHECK
#if defined(NULLPO_CHECK)
+/**
+ * Reports NULL pointer information if the passed pointer is NULL
+ *
+ * @param t pointer to check
+ * @return true if the passed pointer is NULL, false otherwise
+ */
+#define nullpo_chk(t) ( (t) != NULL ? false : (assert_report(__FILE__, __LINE__, __func__, #t, "nullpo info"), true) )
+#else // ! NULLPO_CHECK
+#define nullpo_chk(t) ((void)(t), false)
+#endif // NULLPO_CHECK
+
+/**
+ * The following macros check for NULL pointers and return from the current
+ * function or block in case one is found.
+ *
+ * It is guaranteed that the argument is evaluated once and only once, so it
+ * is safe to call them as:
+ * nullpo_ret(x = func());
+ * The macros can be used safely in any context, as they expand to a do/while
+ * construct, except nullpo_retb, which expands to an if/else construct.
+ */
+/**
+ * Returns 0 if a NULL pointer is found.
+ *
+ * @param t pointer to check
+ */
#define nullpo_ret(t) \
- if (nullpo_chk(NLP_MARK, (void *)(t))) {return(0);}
-
-#define nullpo_retv(t) \
- if (nullpo_chk(NLP_MARK, (void *)(t))) {return;}
-
-#define nullpo_retr(ret, t) \
- if (nullpo_chk(NLP_MARK, (void *)(t))) {return(ret);}
-
-#define nullpo_retb(t) \
- if (nullpo_chk(NLP_MARK, (void *)(t))) {break;}
-
-// ‰Â•Ïˆø”ƒ}ƒNƒ‚ÉŠÖ‚·‚éðŒƒRƒ“ƒpƒCƒ‹
-#if __STDC_VERSION__ >= 199901L
-/* C99‚ɑΉž */
-#define nullpo_ret_f(t, fmt, ...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(0);}
-
-#define nullpo_retv_f(t, fmt, ...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return;}
-
-#define nullpo_retr_f(ret, t, fmt, ...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {return(ret);}
-
-#define nullpo_retb_f(t, fmt, ...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), __VA_ARGS__)) {break;}
+ do { if (nullpo_chk(t)) return(0); } while(0)
-#elif __GNUC__ >= 2
-/* GCC—p */
-#define nullpo_ret_f(t, fmt, args...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(0);}
-
-#define nullpo_retv_f(t, fmt, args...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return;}
-
-#define nullpo_retr_f(ret, t, fmt, args...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {return(ret);}
-
-#define nullpo_retb_f(t, fmt, args...) \
- if (nullpo_chk_f(NLP_MARK, (void *)(t), (fmt), ## args)) {break;}
-
-#else
-
-/* ‚»‚Ì‘¼‚Ìê‡EEE orz */
-
-#endif
-
-#else /* NULLPO_CHECK */
-/* No Nullpo check */
-
-// if((t)){;}
-// —Ç‚¢•û–@‚ªŽv‚¢‚‚©‚È‚©‚Á‚½‚Ì‚ÅEEE‹ê“÷‚Ìô‚Å‚·B
-// ˆê‰žƒ[ƒjƒ“ƒO‚Ío‚È‚¢‚Í‚¸
-
-#define nullpo_ret(t) (void)(t)
-#define nullpo_retv(t) (void)(t)
-#define nullpo_retr(ret, t) (void)(t)
-#define nullpo_retb(t) (void)(t)
-
-// ‰Â•Ïˆø”ƒ}ƒNƒ‚ÉŠÖ‚·‚éðŒƒRƒ“ƒpƒCƒ‹
-#if __STDC_VERSION__ >= 199901L
-/* C99‚ɑΉž */
-#define nullpo_ret_f(t, fmt, ...) (void)(t)
-#define nullpo_retv_f(t, fmt, ...) (void)(t)
-#define nullpo_retr_f(ret, t, fmt, ...) (void)(t)
-#define nullpo_retb_f(t, fmt, ...) (void)(t)
-
-#elif __GNUC__ >= 2
-/* GCC—p */
-#define nullpo_ret_f(t, fmt, args...) (void)(t)
-#define nullpo_retv_f(t, fmt, args...) (void)(t)
-#define nullpo_retr_f(ret, t, fmt, args...) (void)(t)
-#define nullpo_retb_f(t, fmt, args...) (void)(t)
-
-#else
-/* ‚»‚Ì‘¼‚Ìê‡EEE orz */
-#endif
+/**
+ * Returns 0 if the given assertion fails.
+ *
+ * @param t statement to check
+ */
+#define Assert_ret(t) \
+ do { if (Assert_chk(t)) return(0); } while(0)
-#endif /* NULLPO_CHECK */
+/**
+ * Returns void if a NULL pointer is found.
+ *
+ * @param t pointer to check
+ */
+#define nullpo_retv(t) \
+ do { if (nullpo_chk(t)) return; } while(0)
-/*----------------------------------------------------------------------------
- * Functions
- *----------------------------------------------------------------------------
+/**
+ * Returns void if the given assertion fails.
+ *
+ * @param t statement to check
*/
-/*======================================
- * nullpo_chk
- * Nullƒ`ƒFƒbƒN ‹y‚Ñ î•ño—Í
- * [ˆø”]
- * file __FILE__
- * line __LINE__
- * func __func__ (ŠÖ”–¼)
- * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
- * target ƒ`ƒFƒbƒN‘ÎÛ
- * [•Ô‚è’l]
- * 0 OK
- * 1 NULL
- *--------------------------------------
+#define Assert_retv(t) \
+ do { if (Assert_chk(t)) return; } while(0)
+
+/**
+ * Returns the given value if a NULL pointer is found.
+ *
+ * @param ret value to return
+ * @param t pointer to check
*/
-int nullpo_chk(const char *file, int line, const char *func, const void *target);
-
-
-/*======================================
- * nullpo_chk_f
- * Nullƒ`ƒFƒbƒN ‹y‚Ñ ÚׂÈî•ño—Í
- * [ˆø”]
- * file __FILE__
- * line __LINE__
- * func __func__ (ŠÖ”–¼)
- * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
- * target ƒ`ƒFƒbƒN‘ÎÛ
- * fmt ... vprintf‚É“n‚³‚ê‚é
- * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
- * [•Ô‚è’l]
- * 0 OK
- * 1 NULL
- *--------------------------------------
+#define nullpo_retr(ret, t) \
+ do { if (nullpo_chk(t)) return(ret); } while(0)
+
+/**
+ * Returns the given value if the given assertion fails.
+ *
+ * @param ret value to return
+ * @param t statement to check
*/
-int nullpo_chk_f(const char *file, int line, const char *func, const void *target,
- const char *fmt, ...)
- __attribute__((format(printf,5,6)));
-
-
-/*======================================
- * nullpo_info
- * nullpoî•ño—Í
- * [ˆø”]
- * file __FILE__
- * line __LINE__
- * func __func__ (ŠÖ”–¼)
- * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
- *--------------------------------------
+#define Assert_retr(ret, t) \
+ do { if (Assert_chk(t)) return(ret); } while(0)
+
+/**
+ * Breaks from the current loop/switch if a NULL pointer is found.
+ *
+ * @param t pointer to check
*/
-void nullpo_info(const char *file, int line, const char *func);
-
-
-/*======================================
- * nullpo_info_f
- * nullpoÚ×î•ño—Í
- * [ˆø”]
- * file __FILE__
- * line __LINE__
- * func __func__ (ŠÖ”–¼)
- * ‚±‚ê‚ç‚É‚Í NLP_MARK ‚ðŽg‚¤‚Æ‚æ‚¢
- * fmt ... vprintf‚É“n‚³‚ê‚é
- * ”õl‚âŠÖŒW•Ï”‚Ì‘‚«o‚µ‚È‚Ç‚É
- *--------------------------------------
+#define nullpo_retb(t) \
+ if (nullpo_chk(t)) break; else (void)0
+
+/**
+ * Breaks from the current loop/switch if the given assertion fails.
+ *
+ * @param t statement to check
*/
-void nullpo_info_f(const char *file, int line, const char *func,
- const char *fmt, ...)
- __attribute__((format(printf,4,5)));
+#define Assert_retb(t) \
+ if (Assert_chk(t)) break; else (void)0
+
+void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title);
-#endif /* _NULLPO_H_ */
+#endif /* COMMON_NULLPO_H */
diff --git a/src/common/socket.c b/src/common/socket.c
index 2ae9d44b3..9c6938008 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -340,7 +340,7 @@ void set_eof(int fd)
int recv_to_fifo(int fd)
{
- int len;
+ ssize_t len;
if( !session_isActive(fd) )
return -1;
@@ -377,7 +377,7 @@ int recv_to_fifo(int fd)
int send_from_fifo(int fd)
{
- int len;
+ ssize_t len;
if( !session_isValid(fd) )
return -1;
@@ -855,6 +855,10 @@ int do_sockets(int next)
}
}
+#ifdef __clang_analyzer__
+ // Let Clang's static analyzer know this never happens (it thinks it might because of a NULL check in session_isValid)
+ if (!session[i]) continue;
+#endif // __clang_analyzer__
session[i]->func_parse(i);
if(!session[i])
@@ -1330,7 +1334,7 @@ int socket_getips(uint32* ips, int max)
void socket_init(void)
{
char *SOCKET_CONF_FILENAME = "conf/packet.conf";
- unsigned int rlim_cur = FD_SETSIZE;
+ uint64 rlim_cur = FD_SETSIZE;
#ifdef WIN32
{// Start up windows networking
@@ -1403,7 +1407,7 @@ void socket_init(void)
timer->add_interval(timer->gettick()+1000, connect_check_clear, 0, 0, 5*60*1000);
#endif
- ShowInfo("Server supports up to '"CL_WHITE"%u"CL_RESET"' concurrent connections.\n", rlim_cur);
+ ShowInfo("Server supports up to '"CL_WHITE"%lld"CL_RESET"' concurrent connections.\n", rlim_cur);
/* Hercules Plugin Manager */
HPM->share(session,"session");
diff --git a/src/common/sql.c b/src/common/sql.c
index 0e06d6d18..79ccc8e92 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -1036,7 +1036,7 @@ void Sql_HerculesUpdateCheck(Sql* self) {
fseek (ufp,1,SEEK_SET);/* woo. skip the # */
if( fgets(timestamp,sizeof(timestamp),ufp) ) {
- unsigned int timestampui = atol(timestamp);
+ unsigned int timestampui = (unsigned int)atol(timestamp);
if( SQL_ERROR == SQL->Query(self, "SELECT 1 FROM `sql_updates` WHERE `timestamp` = '%u' LIMIT 1", timestampui) )
Sql_ShowDebug(self);
if( Sql_NumRows(self) != 1 ) {
@@ -1079,7 +1079,7 @@ void Sql_HerculesUpdateSkip(Sql* self,const char *filename) {
fseek (ifp,1,SEEK_SET);/* woo. skip the # */
if( fgets(timestamp,sizeof(timestamp),ifp) ) {
- unsigned int timestampui = atol(timestamp);
+ unsigned int timestampui = (unsigned int)atol(timestamp);
if( SQL_ERROR == SQL->Query(self, "SELECT 1 FROM `sql_updates` WHERE `timestamp` = '%u' LIMIT 1", timestampui) )
Sql_ShowDebug(self);
else if( Sql_NumRows(self) == 1 ) {
diff --git a/src/common/strlib.c b/src/common/strlib.c
index e45cb0789..0f68eb206 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -952,7 +952,7 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc
if( line[0] == '\0' || line[0] == '\n' || line[0] == '\r')
continue;
- columns = sv_split(line, strlen(line), 0, delim, fields, fields_length, (e_svopt)(SV_TERMINATE_LF|SV_TERMINATE_CRLF));
+ columns = sv_split(line, (int)strlen(line), 0, delim, fields, fields_length, (e_svopt)(SV_TERMINATE_LF|SV_TERMINATE_CRLF));
if( columns < mincols ) {
ShowError("sv_readdb: Insufficient columns in line %d of \"%s\" (found %d, need at least %d).\n", lines, path, columns, mincols);
@@ -1018,7 +1018,8 @@ int StringBuf_Printf(StringBuf* self, const char* fmt, ...) {
/// Appends the result of vprintf to the StringBuf
int StringBuf_Vprintf(StringBuf* self, const char* fmt, va_list ap) {
- int n, size, off;
+ int n, off;
+ size_t size;
for(;;) {
va_list apcopy;
@@ -1028,7 +1029,7 @@ int StringBuf_Vprintf(StringBuf* self, const char* fmt, va_list ap) {
n = vsnprintf(self->ptr_, size, fmt, apcopy);
va_end(apcopy);
/* If that worked, return the length. */
- if( n > -1 && n < size ) {
+ if( n > -1 && (size_t)n < size ) {
self->ptr_ += n;
return (int)(self->ptr_ - self->buf_);
}
@@ -1042,11 +1043,11 @@ int StringBuf_Vprintf(StringBuf* self, const char* fmt, va_list ap) {
/// Appends the contents of another StringBuf to the StringBuf
int StringBuf_Append(StringBuf* self, const StringBuf* sbuf) {
- int available = self->max_ - (self->ptr_ - self->buf_);
- int needed = (int)(sbuf->ptr_ - sbuf->buf_);
+ size_t available = self->max_ - (self->ptr_ - self->buf_);
+ size_t needed = sbuf->ptr_ - sbuf->buf_;
if( needed >= available ) {
- int off = (int)(self->ptr_ - self->buf_);
+ size_t off = (self->ptr_ - self->buf_);
self->max_ += needed;
self->buf_ = (char*)aRealloc(self->buf_, self->max_ + 1);
self->ptr_ = self->buf_ + off;
@@ -1059,12 +1060,12 @@ int StringBuf_Append(StringBuf* self, const StringBuf* sbuf) {
// Appends str to the StringBuf
int StringBuf_AppendStr(StringBuf* self, const char* str) {
- int available = self->max_ - (self->ptr_ - self->buf_);
- int needed = (int)strlen(str);
+ size_t available = self->max_ - (self->ptr_ - self->buf_);
+ size_t needed = strlen(str);
if( needed >= available ) {
// not enough space, expand the buffer (minimum expansion = 1024)
- int off = (int)(self->ptr_ - self->buf_);
+ size_t off = (self->ptr_ - self->buf_);
self->max_ += max(needed, 1024);
self->buf_ = (char*)aRealloc(self->buf_, self->max_ + 1);
self->ptr_ = self->buf_ + off;
diff --git a/src/common/timer.c b/src/common/timer.c
index e5cf5df2a..7f9e20dad 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -142,7 +142,7 @@ static void rdtsc_calibrate(){
* platform-abstracted tick retrieval
* @return server's current tick
*/
-static int64 tick(void) {
+static int64 sys_tick(void) {
#if defined(WIN32)
// Windows: GetTickCount/GetTickCount64: Return the number of
// milliseconds that have elapsed since the system was started.
@@ -206,7 +206,7 @@ static int gettick_count = 1;
int64 timer_gettick_nocache(void) {
gettick_count = TICK_CACHE;
- gettick_cache = tick();
+ gettick_cache = sys_tick();
return gettick_cache;
}
@@ -219,11 +219,11 @@ int64 timer_gettick(void) {
// tick doesn't get cached
int64 timer_gettick_nocache(void)
{
- return tick();
+ return sys_tick();
}
int64 timer_gettick(void) {
- return tick();
+ return sys_tick();
}
//////////////////////////////////////////////////////////////////////////
#endif
diff --git a/src/config/classes/general.h b/src/config/classes/general.h
index 206f57b37..147fddb55 100644
--- a/src/config/classes/general.h
+++ b/src/config/classes/general.h
@@ -10,8 +10,8 @@
/**
* Default Magical Reflection Behavior
- * - When reflecting, reflected damage depends on gears caster is wearing, not target
- * - When disabled damage depends on gears target is wearing, not caster.
+ * - When reflecting, reflected damage depends on gears caster is wearing, not target (official)
+ * - When disabled damage depends on gears target is wearing, not caster. (old/eathena)
* @values 1 (enabled) or 0 (disabled)
**/
#define MAGIC_REFLECTION_TYPE 1
@@ -22,6 +22,12 @@
#define MAX_SPIRITBALL 15
/**
+ * when enabled, reflect damage doesn't bypass devotion (and thus damage is passed to crusader)
+ * uncomment to enable
+ **/
+//#define DEVOTION_REFLECT_DAMAGE
+
+/**
* No settings past this point
**/
diff --git a/src/config/renewal.h b/src/config/renewal.h
index a7fd22c37..3b11aff74 100644
--- a/src/config/renewal.h
+++ b/src/config/renewal.h
@@ -13,6 +13,7 @@
* @INFO: This file holds general-purpose renewal settings, for class-specific ones check /src/config/classes folder
**/
+//#define DISABLE_RENEWAL
#ifndef DISABLE_RENEWAL
/// game renewal server mode
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 533b3d860..283eb3a0d 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -543,16 +543,16 @@ static bool mmo_auth_fromsql(AccountDB_SQL* db, struct mmo_account* acc, int acc
SQL->GetData(sql_handle, 3, &data, NULL); acc->sex = data[0];
SQL->GetData(sql_handle, 4, &data, NULL); safestrncpy(acc->email, data, sizeof(acc->email));
SQL->GetData(sql_handle, 5, &data, NULL); acc->group_id = atoi(data);
- SQL->GetData(sql_handle, 6, &data, NULL); acc->state = strtoul(data, NULL, 10);
+ SQL->GetData(sql_handle, 6, &data, NULL); acc->state = (unsigned int)strtoul(data, NULL, 10);
SQL->GetData(sql_handle, 7, &data, NULL); acc->unban_time = atol(data);
SQL->GetData(sql_handle, 8, &data, NULL); acc->expiration_time = atol(data);
- SQL->GetData(sql_handle, 9, &data, NULL); acc->logincount = strtoul(data, NULL, 10);
+ SQL->GetData(sql_handle, 9, &data, NULL); acc->logincount = (unsigned int)strtoul(data, NULL, 10);
SQL->GetData(sql_handle, 10, &data, NULL); safestrncpy(acc->lastlogin, data, sizeof(acc->lastlogin));
SQL->GetData(sql_handle, 11, &data, NULL); safestrncpy(acc->last_ip, data, sizeof(acc->last_ip));
SQL->GetData(sql_handle, 12, &data, NULL); safestrncpy(acc->birthdate, data, sizeof(acc->birthdate));
SQL->GetData(sql_handle, 13, &data, NULL); acc->char_slots = (uint8)atoi(data);
SQL->GetData(sql_handle, 14, &data, NULL); safestrncpy(acc->pincode, data, sizeof(acc->pincode));
- SQL->GetData(sql_handle, 15, &data, NULL); acc->pincode_change = atol(data);
+ SQL->GetData(sql_handle, 15, &data, NULL); acc->pincode_change = (unsigned int)atol(data);
SQL->FreeResult(sql_handle);
@@ -568,7 +568,6 @@ static bool mmo_auth_fromsql(AccountDB_SQL* db, struct mmo_account* acc, int acc
while( SQL_SUCCESS == SQL->NextRow(sql_handle) )
{
- char* data;
SQL->GetData(sql_handle, 0, &data, NULL); safestrncpy(acc->account_reg2[i].str, data, sizeof(acc->account_reg2[i].str));
SQL->GetData(sql_handle, 1, &data, NULL); safestrncpy(acc->account_reg2[i].value, data, sizeof(acc->account_reg2[i].value));
++i;
diff --git a/src/login/login.c b/src/login/login.c
index 75247845d..feed7239b 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -140,8 +140,8 @@ static int waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data)
static int online_db_setoffline(DBKey key, DBData *data, va_list ap)
{
struct online_login_data* p = DB->data2ptr(data);
- int server = va_arg(ap, int);
- if( server == -1 )
+ int server_id = va_arg(ap, int);
+ if( server_id == -1 )
{
p->char_server = -1;
if( p->waiting_disconnect != INVALID_TIMER )
@@ -150,7 +150,7 @@ static int online_db_setoffline(DBKey key, DBData *data, va_list ap)
p->waiting_disconnect = INVALID_TIMER;
}
}
- else if( p->char_server == server )
+ else if( p->char_server == server_id )
p->char_server = -2; //Char server disconnected.
return 0;
}
@@ -948,7 +948,7 @@ int mmo_auth_new(const char* userid, const char* pass, const char sex, const cha
//-----------------------------------------------------
int mmo_auth(struct login_session_data* sd, bool isServer) {
struct mmo_account acc;
- int len;
+ size_t len;
char ip[16];
ip2str(session[sd->fd]->client_addr, ip);
@@ -1615,7 +1615,7 @@ int login_config_read(const char* cfgName)
else if(!strcmpi(w1, "check_client_version"))
login_config.check_client_version = (bool)config_switch(w2);
else if(!strcmpi(w1, "client_version_to_connect"))
- login_config.client_version_to_connect = strtoul(w2, NULL, 10);
+ login_config.client_version_to_connect = (unsigned int)strtoul(w2, NULL, 10);
else if(!strcmpi(w1, "use_MD5_passwords"))
login_config.use_md5_passwds = (bool)config_switch(w2);
else if(!strcmpi(w1, "group_id_to_connect"))
diff --git a/src/login/login.h b/src/login/login.h
index 15edb14dc..494912698 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -23,8 +23,8 @@ enum E_LOGINSERVER_ST
struct login_session_data {
int account_id;
- long login_id1;
- long login_id2;
+ int login_id1;
+ int login_id2;
char sex;// 'F','M','S'
char userid[NAME_LENGTH];
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3976c8427..953f1a0dc 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -375,7 +375,7 @@ ACMD(send)
*------------------------------------------*/
ACMD(mapmove) {
char map_name[MAP_NAME_LENGTH_EXT];
- unsigned short mapindex;
+ unsigned short map_index;
short x = 0, y = 0;
int16 m = -1;
@@ -389,30 +389,30 @@ ACMD(mapmove) {
return false;
}
- mapindex = mapindex_name2id(map_name);
- if (mapindex)
- m = map->mapindex2mapid(mapindex);
+ map_index = mapindex->name2id(map_name);
+ if (map_index)
+ m = map->mapindex2mapid(map_index);
- if (!mapindex || m < 0) { // m < 0 means on different server or that map is disabled! [Kevin]
+ if (!map_index || m < 0) { // m < 0 means on different server or that map is disabled! [Kevin]
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
- if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc->get_group_level(sd) < battle_config.gm_ignore_warpable_area) {
+ if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc_get_group_level(sd) < battle_config.gm_ignore_warpable_area) {
//This is to prevent the pc->setpos call from printing an error.
clif->message(fd, msg_txt(2));
if (!map->search_freecell(NULL, m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
- if (map->list[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(247));
return false;
}
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(248));
return false;
}
- if (pc->setpos(sd, mapindex, x, y, CLR_TELEPORT) != 0) {
+ if (pc->setpos(sd, map_index, x, y, CLR_TELEPORT) != 0) {
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
@@ -437,7 +437,7 @@ ACMD(where) {
pl_sd = map->nick2sd(atcmd_player_name);
if (pl_sd == NULL ||
strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 ||
- (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc->get_group_level(pl_sd) > pc->get_group_level(sd) && !pc->has_permission(sd, PC_PERM_WHO_DISPLAY_AID))
+ (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID))
) {
clif->message(fd, msg_txt(3)); // Character not found.
return false;
@@ -465,12 +465,12 @@ ACMD(jumpto) {
return false;
}
- if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(247)); // You are not authorized to warp to this map.
return false;
}
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
return false;
}
@@ -498,7 +498,7 @@ ACMD(jump)
sscanf(message, "%hd %hd", &x, &y);
- if (map->list[sd->bl.m].flag.noteleport && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (map->list[sd->bl.m].flag.noteleport && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
return false;
}
@@ -554,12 +554,12 @@ ACMD(who) {
else if (stristr(info->command, "3") != NULL)
display_type = 3;
- level = pc->get_group_level(sd);
+ level = pc_get_group_level(sd);
StrBuf->Init(&buf);
iter = mapit_getallusers();
for (pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter)) {
- if (!((pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc->get_group_level(pl_sd) > level)) { // you can look only lower or same level
+ if (!((pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) || (pl_sd->sc.option & OPTION_INVISIBLE)) && pc_get_group_level(pl_sd) > level)) { // you can look only lower or same level
if (stristr(pl_sd->status.name, player_name) == NULL // search with no case sensitive
|| (map_id >= 0 && pl_sd->bl.m != map_id))
continue;
@@ -573,7 +573,7 @@ ACMD(who) {
break;
}
case 3: {
- if (pc->has_permission(sd, PC_PERM_WHO_DISPLAY_AID))
+ if (pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID))
StrBuf->Printf(&buf, msg_txt(912), pl_sd->status.char_id, pl_sd->status.account_id); // "(CID:%d/AID:%d) "
StrBuf->Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s "
if (pc_get_group_id(pl_sd) > 0) // Player title, if exists
@@ -646,12 +646,12 @@ ACMD(whogm)
match_text[j] = TOLOWER(match_text[j]);
count = 0;
- level = pc->get_group_level(sd);
+ level = pc_get_group_level(sd);
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
- pl_level = pc->get_group_level(pl_sd);
+ pl_level = pc_get_group_level(pl_sd);
if (!pl_level)
continue;
@@ -729,11 +729,11 @@ ACMD(load) {
int16 m;
m = map->mapindex2mapid(sd->status.save_point.map);
- if (m >= 0 && map->list[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(249)); // You are not authorized to warp to your save map.
return false;
}
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
return false;
}
@@ -900,50 +900,52 @@ ACMD(hide) {
/*==========================================
* Changes a character's class
*------------------------------------------*/
-ACMD(jobchange)
-{
+ACMD(jobchange) {
int job = 0, upper = 0;
const char* text;
- if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) {
- int i;
- bool found = false;
-
+ if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) {
upper = 0;
-
- // Normal Jobs
- for( i = JOB_NOVICE; i < JOB_MAX_BASIC && !found; i++ ){
- if (strncmpi(message, pc->job_name(i), 16) == 0) {
- job = i;
- found = true;
+
+ if( message ) {
+ int i;
+ bool found = false;
+
+ // Normal Jobs
+ for( i = JOB_NOVICE; i < JOB_MAX_BASIC && !found; i++ ) {
+ if (strncmpi(message, pc->job_name(i), 16) == 0) {
+ job = i;
+ found = true;
+ }
}
- }
-
- // High Jobs, Babys and Third
- for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){
- if (strncmpi(message, pc->job_name(i), 16) == 0) {
- job = i;
- found = true;
+
+ // High Jobs, Babys and Third
+ for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){
+ if (strncmpi(message, pc->job_name(i), 16) == 0) {
+ job = i;
+ found = true;
+ }
+ }
+
+ if (!found) {
+ text = atcommand_help_string(info);
+ if (text)
+ clif->messageln(fd, text);
+ return false;
}
- }
-
- if (!found) {
- text = atcommand_help_string(info);
- if (text)
- clif->messageln(fd, text);
- return false;
}
}
-
+ /* WHY DO WE LIST THEM THEN? */
+ // Deny direct transformation into dummy jobs
if (job == JOB_KNIGHT2 || job == JOB_CRUSADER2 || job == JOB_WEDDING || job == JOB_XMAS || job == JOB_SUMMER
|| job == JOB_LORD_KNIGHT2 || job == JOB_PALADIN2 || job == JOB_BABY_KNIGHT2 || job == JOB_BABY_CRUSADER2 || job == JOB_STAR_GLADIATOR2
|| (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2)
- ) // Deny direct transformation into dummy jobs
- {clif->message(fd, msg_txt(923)); //"You can not change to this job by command."
- return true;}
+ ) {
+ clif->message(fd, msg_txt(923)); //"You can not change to this job by command."
+ return true;
+ }
- if (pcdb_checkid(job))
- {
+ if (pcdb_checkid(job)) {
if (pc->jobchange(sd, job, upper) == 0)
clif->message(fd, msg_txt(12)); // Your job has been changed.
else {
@@ -991,7 +993,7 @@ ACMD(alive)
*------------------------------------------*/
ACMD(kami)
{
- unsigned long color=0;
+ unsigned int color=0;
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -1007,7 +1009,7 @@ ACMD(kami)
else
intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(info->command + 4) == 'b' || *(info->command + 4) == 'B') ? BC_BLUE : BC_YELLOW);
} else {
- if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) {
+ if(!message || !*message || (sscanf(message, "%u %199[^\n]", &color, atcmd_output) < 2)) {
clif->message(fd, msg_txt(981)); // Please enter color and message (usage: @kamic <color> <message>).
return false;
}
@@ -1857,15 +1859,15 @@ ACMD(go)
if (town >= 0 && town < ARRAYLENGTH(data)) {
m = map->mapname2mapid(data[town].map);
- if (m >= 0 && map->list[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (m >= 0 && map->list[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(247));
return false;
}
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(248));
return false;
}
- if (pc->setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
+ if (pc->setpos(sd, mapindex->name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
clif->message(fd, msg_txt(0)); // Warped.
} else {
clif->message(fd, msg_txt(1)); // Map not found.
@@ -2051,9 +2053,10 @@ ACMD(refine)
refine = cap_value(refine, -MAX_REFINE, MAX_REFINE);
count = 0;
- for (j = 0; j < EQI_MAX-1; j++) {
+ for (j = 0; j < EQI_MAX; j++) {
if ((i = sd->equip_index[j]) < 0)
continue;
+ if(j == EQI_AMMO) continue; /* can't equip ammo */
if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == i)
continue;
if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == i)
@@ -2671,17 +2674,17 @@ ACMD(recall) {
return false;
}
- if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) )
+ if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
clif->message(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player.
return false;
}
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(1019)); // You are not authorized to warp someone to this map.
return false;
}
- if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(1020)); // You are not authorized to warp this player from their map.
return false;
}
@@ -2892,7 +2895,7 @@ ACMD(doom)
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
- if (pl_sd->fd != fd && pc->get_group_level(sd) >= pc->get_group_level(pl_sd))
+ if (pl_sd->fd != fd && pc_get_group_level(sd) >= pc_get_group_level(pl_sd))
{
status_kill(&pl_sd->bl);
clif->specialeffect(&pl_sd->bl,450,AREA);
@@ -2917,7 +2920,7 @@ ACMD(doommap)
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
- if (pl_sd->fd != fd && sd->bl.m == pl_sd->bl.m && pc->get_group_level(sd) >= pc->get_group_level(pl_sd))
+ if (pl_sd->fd != fd && sd->bl.m == pl_sd->bl.m && pc_get_group_level(sd) >= pc_get_group_level(pl_sd))
{
status_kill(&pl_sd->bl);
clif->specialeffect(&pl_sd->bl,450,AREA);
@@ -2999,7 +3002,7 @@ ACMD(kick)
return false;
}
- if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) )
+ if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return false;
@@ -3021,7 +3024,7 @@ ACMD(kickall)
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
- if (pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) { // you can kick only lower or same gm level
+ if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can kick only lower or same gm level
if (sd->status.account_id != pl_sd->status.account_id)
clif->GM_kick(NULL, pl_sd);
}
@@ -3349,7 +3352,7 @@ ACMD(recallall)
memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
return false;
}
@@ -3357,10 +3360,10 @@ ACMD(recallall)
count = 0;
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) {
- if (sd->status.account_id != pl_sd->status.account_id && pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) {
+ if (sd->status.account_id != pl_sd->status.account_id && pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) {
if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)
continue; // Don't waste time warping the character to the same place.
- if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE))
+ if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
count++;
else {
if (pc_isdead(pl_sd)) { //Wake them up
@@ -3401,7 +3404,7 @@ ACMD(guildrecall)
return false;
}
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
return false;
}
@@ -3419,9 +3422,9 @@ ACMD(guildrecall)
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.guild_id == g->guild_id) {
- if (pc->get_group_level(pl_sd) > pc->get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y))
+ if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y))
continue; // Skip GMs greater than you... or chars already on the cell
- if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE))
+ if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
count++;
else
pc->setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
@@ -3458,7 +3461,7 @@ ACMD(partyrecall)
return false;
}
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
return false;
}
@@ -3475,9 +3478,9 @@ ACMD(partyrecall)
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) {
if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.party_id == p->party.party_id) {
- if (pc->get_group_level(pl_sd) > pc->get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y))
+ if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y))
continue; // Skip GMs greater than you... or chars already on the cell
- if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE))
+ if (pl_sd->bl.m >= 0 && map->list[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
count++;
else
pc->setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
@@ -3707,7 +3710,7 @@ ACMD(mapinfo) {
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
- m_index = mapindex_name2id(mapname); //This one shouldn't fail since the previous seek did not.
+ m_index = mapindex->name2id(mapname); //This one shouldn't fail since the previous seek did not.
clif->message(fd, msg_txt(1039)); // ------ Map Info ------
@@ -4103,7 +4106,7 @@ ACMD(nuke) {
}
if ((pl_sd = map->nick2sd(atcmd_player_name)) != NULL) {
- if (pc->get_group_level(sd) >= pc->get_group_level(pl_sd)) { // you can kill only lower or same GM level
+ if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can kill only lower or same GM level
skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0);
clif->message(fd, msg_txt(109)); // Player has been nuked!
} else {
@@ -4275,9 +4278,9 @@ char* txt_time(unsigned int duration)
else
tlen += sprintf(tlen + temp1, msg_txt(224), minutes); // %d minutes
if (seconds == 1)
- tlen += sprintf(tlen + temp1, msg_txt(225), seconds); // and %d second
+ sprintf(tlen + temp1, msg_txt(225), seconds); // and %d second
else if (seconds > 1)
- tlen += sprintf(tlen + temp1, msg_txt(226), seconds); // and %d seconds
+ sprintf(tlen + temp1, msg_txt(226), seconds); // and %d seconds
return temp1;
}
@@ -4387,7 +4390,7 @@ ACMD(jail) {
return false;
}
- if (pc->get_group_level(sd) < pc->get_group_level(pl_sd))
+ if (pc_get_group_level(sd) < pc_get_group_level(pl_sd))
{ // you can jail only lower or same GM
clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return false;
@@ -4401,12 +4404,12 @@ ACMD(jail) {
switch(rnd() % 2) { //Jail Locations
case 0:
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 24;
y = 75;
break;
default:
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 49;
y = 75;
break;
@@ -4438,7 +4441,7 @@ ACMD(unjail) {
return false;
}
- if (pc->get_group_level(sd) < pc->get_group_level(pl_sd)) { // you can jail only lower or same GM
+ if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM
clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return false;
@@ -4516,7 +4519,7 @@ ACMD(jailfor) {
return false;
}
- if (pc->get_group_level(pl_sd) > pc->get_group_level(sd)) {
+ if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return false;
}
@@ -4553,11 +4556,11 @@ ACMD(jailfor) {
switch(rnd()%2)
{
case 1: //Jail #1
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 49; y = 75;
break;
default: //Default Jail
- m_index = mapindex_name2id(MAP_JAIL);
+ m_index = mapindex->name2id(MAP_JAIL);
x = 24; y = 75;
break;
}
@@ -5009,7 +5012,7 @@ ACMD(addwarp)
return false;
}
- m = mapindex_name2id(mapname);
+ m = mapindex->name2id(mapname);
if( m == 0 )
{
sprintf(atcmd_output, msg_txt(1157), mapname); // Unknown map '%s'.
@@ -5197,7 +5200,8 @@ ACMD(clearcart)
#define MAX_SKILLID_PARTIAL_RESULTS 5
#define MAX_SKILLID_PARTIAL_RESULTS_LEN 74 /* "skill " (6) + "%d:" (up to 5) + "%s" (up to 30) + " (%s)" (up to 33) */
ACMD(skillid) {
- int skillen, idx, i, found = 0;
+ int idx, i, found = 0;
+ size_t skillen;
DBIterator* iter;
DBKey key;
DBData *data;
@@ -5259,7 +5263,7 @@ ACMD(useskill) {
return false;
}
- if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) )
+ if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return false;
@@ -6058,7 +6062,7 @@ ACMD(npctalk)
char name[NAME_LENGTH],mes[100],temp[100];
struct npc_data *nd;
bool ifcolor=(*(info->command + 7) != 'c' && *(info->command + 7) != 'C')?0:1;
- unsigned long color=0;
+ unsigned int color = 0;
if (sd->sc.count && //no "chatting" while muted.
(sd->sc.data[SC_BERSERK] || sd->sc.data[SC_DEEP_SLEEP] ||
@@ -6072,7 +6076,7 @@ ACMD(npctalk)
}
}
else {
- if (!message || !*message || sscanf(message, "%lx %23[^,], %99[^\n]", &color, name, mes) < 3) {
+ if (!message || !*message || sscanf(message, "%u %23[^,], %99[^\n]", &color, name, mes) < 3) {
clif->message(fd, msg_txt(1223)); // Please enter the correct parameters (usage: @npctalkc <color> <npc name>, <message>).
return false;
}
@@ -6411,7 +6415,7 @@ ACMD(mute) {
return false;
}
- if ( pc->get_group_level(sd) < pc->get_group_level(pl_sd) )
+ if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
clif->message(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
return false;
@@ -6661,7 +6665,7 @@ ACMD(showmobs)
return true;
}
- if(mob->db(mob_id)->status.mode&MD_BOSS && !pc->has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs.
+ if(mob->db(mob_id)->status.mode&MD_BOSS && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs.
clif->message(fd, msg_txt(1251)); // Can't show boss mobs!
return true;
}
@@ -7214,7 +7218,7 @@ int atcommand_mutearea_sub(struct block_list *bl,va_list ap)
id = va_arg(ap, int);
time = va_arg(ap, int);
- if (id != bl->id && !pc->get_group_level(pl_sd)) {
+ if (id != bl->id && !pc_get_group_level(pl_sd)) {
pl_sd->status.manner -= time;
if (pl_sd->status.manner < 0)
sc_start(&pl_sd->bl,SC_NOCHAT,100,0,0);
@@ -7797,7 +7801,7 @@ ACMD(clone) {
return true;
}
- if(pc->get_group_level(pl_sd) > pc->get_group_level(sd)) {
+ if(pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
clif->message(fd, msg_txt(126)); // Cannot clone a player of higher GM level than yourself.
return true;
}
@@ -8283,7 +8287,7 @@ void atcommand_commands_sub(struct map_session_data* sd, const int fd, AtCommand
clif->message(fd, msg_txt(273)); // "Commands available:"
for (cmd = dbi_first(iter); dbi_exists(iter); cmd = dbi_next(iter)) {
- unsigned int slen = 0;
+ size_t slen;
switch( type ) {
case COMMAND_CHARCOMMAND:
@@ -8372,7 +8376,7 @@ ACMD(accinfo) {
//remove const type
safestrncpy(query, message, NAME_LENGTH);
- intif->request_accinfo( sd->fd, sd->bl.id, pc->get_group_level(sd), query );
+ intif->request_accinfo( sd->fd, sd->bl.id, pc_get_group_level(sd), query );
return true;
}
@@ -8381,8 +8385,9 @@ ACMD(accinfo) {
ACMD(set) {
char reg[32], val[128];
struct script_data* data;
- int toset = 0, len;
+ int toset = 0;
bool is_str = false;
+ size_t len;
if( !message || !*message || (toset = sscanf(message, "%31s %128[^\n]s", reg, val)) < 1 ) {
clif->message(fd, msg_txt(1367)); // Usage: @set <variable name> <value>
@@ -8655,7 +8660,7 @@ ACMD(join) {
return false;
}
if( channel->pass[0] != '\0' && strcmp(channel->pass,pass) != 0 ) {
- if( pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
sd->stealth = true;
} else {
sprintf(atcmd_output, msg_txt(1401),name,command); // '%s' Channel is password protected (usage: %s <#channel_name> <password>)
@@ -8743,16 +8748,16 @@ static inline void atcmd_channel_help(int fd, const char *command, bool can_crea
/* [Ind/Hercules] */
ACMD(channel) {
struct hChSysCh *channel;
- char key[HCHSYS_NAME_LENGTH], sub1[HCHSYS_NAME_LENGTH], sub2[HCHSYS_NAME_LENGTH], sub3[HCHSYS_NAME_LENGTH];
+ char subcmd[HCHSYS_NAME_LENGTH], sub1[HCHSYS_NAME_LENGTH], sub2[HCHSYS_NAME_LENGTH], sub3[HCHSYS_NAME_LENGTH];
unsigned char k = 0;
sub1[0] = sub2[0] = sub3[0] = '\0';
- if( !message || !*message || sscanf(message, "%s %s %s %s", key, sub1, sub2, sub3) < 1 ) {
- atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ));
+ if( !message || !*message || sscanf(message, "%s %s %s %s", subcmd, sub1, sub2, sub3) < 1 ) {
+ atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ));
return true;
}
- if( strcmpi(key,"create") == 0 && ( hChSys.allow_user_channel_creation || pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) ) {
+ if( strcmpi(subcmd,"create") == 0 && ( hChSys.allow_user_channel_creation || pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) ) {
if( sub1[0] != '#' ) {
clif->message(fd, msg_txt(1405));// Channel name must start with a '#'
return false;
@@ -8784,7 +8789,7 @@ ACMD(channel) {
clif->chsys_join(channel,sd);
- } else if ( strcmpi(key,"list") == 0 ) {
+ } else if ( strcmpi(subcmd,"list") == 0 ) {
if( sub1[0] != '\0' && strcmpi(sub1,"colors") == 0 ) {
char mout[40];
for( k = 0; k < hChSys.colors_count; k++ ) {
@@ -8801,7 +8806,7 @@ ACMD(channel) {
}
} else {
DBIterator *iter = db_iterator(clif->channel_db);
- bool show_all = pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ? true : false;
+ bool show_all = pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ? true : false;
clif->message(fd, msg_txt(1410)); // -- Public Channels
if( hChSys.local ) {
sprintf(atcmd_output, msg_txt(1409), hChSys.local_name, map->list[sd->bl.m].channel ? db_size(map->list[sd->bl.m].channel->users) : 0);// - #%s ( %d users )
@@ -8821,7 +8826,7 @@ ACMD(channel) {
}
dbi_destroy(iter);
}
- } else if ( strcmpi(key,"setcolor") == 0 ) {
+ } else if ( strcmpi(subcmd,"setcolor") == 0 ) {
if( sub1[0] != '#' ) {
clif->message(fd, msg_txt(1405));// Channel name must start with a '#'
@@ -8834,7 +8839,7 @@ ACMD(channel) {
return false;
}
- if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s'
clif->message(fd, atcmd_output);
return false;
@@ -8852,7 +8857,7 @@ ACMD(channel) {
channel->color = k;
sprintf(atcmd_output, msg_txt(1413),sub1,hChSys.colors_name[k]);// '%s' channel color updated to '%s'
clif->message(fd, atcmd_output);
- } else if ( strcmpi(key,"leave") == 0 ) {
+ } else if ( strcmpi(subcmd,"leave") == 0 ) {
if( sub1[0] != '#' ) {
clif->message(fd, msg_txt(1405));// Channel name must start with a '#'
@@ -8880,7 +8885,7 @@ ACMD(channel) {
clif->chsys_left(sd->channels[k],sd);
sprintf(atcmd_output, msg_txt(1426),sub1); // You've left the '%s' channel
clif->message(fd, atcmd_output);
- } else if ( strcmpi(key,"bindto") == 0 ) {
+ } else if ( strcmpi(subcmd,"bindto") == 0 ) {
if( sub1[0] != '#' ) {
clif->message(fd, msg_txt(1405));// Channel name must start with a '#'
@@ -8900,7 +8905,7 @@ ACMD(channel) {
sd->gcbind = sd->channels[k];
sprintf(atcmd_output, msg_txt(1431),sub1); // Your global chat is now binded to the '%s' channel
clif->message(fd, atcmd_output);
- } else if ( strcmpi(key,"unbind") == 0 ) {
+ } else if ( strcmpi(subcmd,"unbind") == 0 ) {
if( sd->gcbind == NULL ) {
clif->message(fd, msg_txt(1432));// Your global chat is not binded to any channel
@@ -8911,7 +8916,7 @@ ACMD(channel) {
clif->message(fd, atcmd_output);
sd->gcbind = NULL;
- } else if ( strcmpi(key,"ban") == 0 ) {
+ } else if ( strcmpi(subcmd,"ban") == 0 ) {
struct map_session_data *pl_sd = NULL;
struct hChSysBanEntry *entry = NULL;
@@ -8926,13 +8931,13 @@ ACMD(channel) {
return false;
}
- if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s'
clif->message(fd, atcmd_output);
return false;
}
- if (!message || !*message || sscanf(message, "%s %s %24[^\n]", key, sub1, sub2) < 1) {
+ if (!message || !*message || sscanf(message, "%s %s %24[^\n]", subcmd, sub1, sub2) < 1) {
sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found
clif->message(fd, atcmd_output);
return false;
@@ -8944,7 +8949,7 @@ ACMD(channel) {
return false;
}
- if( pc->has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( pc_has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) {
clif->message(fd, msg_txt(1464)); // Ban failed, not possible to ban this user.
return false;
}
@@ -8968,7 +8973,7 @@ ACMD(channel) {
sprintf(atcmd_output, msg_txt(1437),pl_sd->status.name,sub1); // Player '%s' has now been banned from '%s' channel
clif->message(fd, atcmd_output);
- } else if ( strcmpi(key,"unban") == 0 ) {
+ } else if ( strcmpi(subcmd,"unban") == 0 ) {
struct map_session_data *pl_sd = NULL;
if( sub1[0] != '#' ) {
@@ -8982,7 +8987,7 @@ ACMD(channel) {
return false;
}
- if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s'
clif->message(fd, atcmd_output);
return false;
@@ -9015,7 +9020,7 @@ ACMD(channel) {
sprintf(atcmd_output, msg_txt(1441),pl_sd->status.name,sub1); // Player '%s' has now been unbanned from the '%s' channel
clif->message(fd, atcmd_output);
- } else if ( strcmpi(key,"unbanall") == 0 ) {
+ } else if ( strcmpi(subcmd,"unbanall") == 0 ) {
if( sub1[0] != '#' ) {
clif->message(fd, msg_txt(1405));// Channel name must start with a '#'
return false;
@@ -9027,7 +9032,7 @@ ACMD(channel) {
return false;
}
- if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s'
clif->message(fd, atcmd_output);
return false;
@@ -9044,11 +9049,11 @@ ACMD(channel) {
sprintf(atcmd_output, msg_txt(1442),sub1); // Removed all bans from '%s' channel
clif->message(fd, atcmd_output);
- } else if ( strcmpi(key,"banlist") == 0 ) {
+ } else if ( strcmpi(subcmd,"banlist") == 0 ) {
DBIterator *iter = NULL;
DBKey key;
DBData *data;
- bool isA = pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN)?true:false;
+ bool isA = pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN)?true:false;
if( sub1[0] != '#' ) {
clif->message(fd, msg_txt(1405));// Channel name must start with a '#'
return false;
@@ -9089,7 +9094,7 @@ ACMD(channel) {
dbi_destroy(iter);
- } else if ( strcmpi(key,"setopt") == 0 ) {
+ } else if ( strcmpi(subcmd,"setopt") == 0 ) {
const char* opt_str[3] = {
"None",
"JoinAnnounce",
@@ -9107,7 +9112,7 @@ ACMD(channel) {
return false;
}
- if( channel->owner != sd->status.char_id && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( channel->owner != sd->status.char_id && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
sprintf(atcmd_output, msg_txt(1412), sub1);// You're not the owner of channel '%s'
clif->message(fd, atcmd_output);
return false;
@@ -9198,7 +9203,7 @@ ACMD(channel) {
}
} else {
- atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ));
+ atcmd_channel_help(fd,command,( hChSys.allow_user_channel_creation || pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ));
}
return true;
@@ -9765,7 +9770,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
// 1 = player invoked
if ( type == 1) {
//Commands are disabled on maps flagged as 'nocommand'
- if ( map->list[sd->bl.m].nocommand && pc->get_group_level(sd) < map->list[sd->bl.m].nocommand ) {
+ if ( map->list[sd->bl.m].nocommand && pc_get_group_level(sd) < map->list[sd->bl.m].nocommand ) {
clif->message(fd, msg_txt(143));
return false;
}
@@ -9800,7 +9805,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
break;
}
- if( !pc->get_group_level(sd) ) {
+ if( !pc_get_group_level(sd) ) {
if( x >= 1 || y >= 1 ) { /* we have command */
info = atcommand->get_info_byname(atcommand->check_alias(command + 1));
if( !info || info->char_groups[pcg->get_idx(sd->group)] == 0 ) /* if we can't use or doesn't exist: don't even display the command failed message */
@@ -9814,7 +9819,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
return true;
} while(0);
}
- else if (*message == atcommand->at_symbol) {
+ else /*if (*message == atcommand->at_symbol)*/ {
//atcmd_msg is constructed above differently for charcommands
//it's copied from message if not a charcommand so it can
//pass through the rest of the code compatible with both symbols
@@ -9843,8 +9848,8 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
if( binding != NULL
&& binding->npc_event[0]
&& (
- (*atcmd_msg == atcommand->at_symbol && pc->get_group_level(sd) >= binding->group_lv)
- || (*atcmd_msg == atcommand->char_symbol && pc->get_group_level(sd) >= binding->group_lv_char)
+ (*atcmd_msg == atcommand->at_symbol && pc_get_group_level(sd) >= binding->group_lv)
+ || (*atcmd_msg == atcommand->char_symbol && pc_get_group_level(sd) >= binding->group_lv_char)
)
) {
// Check if self or character invoking; if self == character invoked, then self invoke.
@@ -9871,7 +9876,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
//Grab the command information and check for the proper GM level required to use it or if the command exists
info = atcommand->get_info_byname(atcommand->check_alias(command + 1));
if (info == NULL) {
- if( pc->get_group_level(sd) ) { // TODO: remove or replace with proper permission
+ if( pc_get_group_level(sd) ) { // TODO: remove or replace with proper permission
sprintf(output, msg_txt(153), command); // "%s is Unknown Command."
clif->message(fd, output);
atcommand->get_suggestions(sd, command + 1, *message == atcommand->at_symbol);
@@ -9887,13 +9892,13 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
(*command == atcommand->char_symbol && info->char_groups[pcg->get_idx(sd->group)] == 0) ) {
return false;
}
- if( pc_isdead(sd) && pc->has_permission(sd,PC_PERM_DISABLE_CMD_DEAD) ) {
+ if( pc_isdead(sd) && pc_has_permission(sd,PC_PERM_DISABLE_CMD_DEAD) ) {
clif->message(fd, msg_txt(1393)); // You can't use commands while dead
return true;
}
for(i = 0; i < map->list[sd->bl.m].zone->disabled_commands_count; i++) {
if( info->func == map->list[sd->bl.m].zone->disabled_commands[i]->cmd ) {
- if( pc->get_group_level(sd) < map->list[sd->bl.m].zone->disabled_commands[i]->group_lv ) {
+ if( pc_get_group_level(sd) < map->list[sd->bl.m].zone->disabled_commands[i]->group_lv ) {
clif->colormes(sd->fd,COLOR_RED,"This command is disabled in this area");
return true;
} else
@@ -10034,7 +10039,7 @@ void atcommand_config_read(const char* config_filename) {
else {
if( commandinfo->help == NULL ) {
const char *str = config_setting_get_string(command);
- int len = strlen(str);
+ size_t len = strlen(str);
commandinfo->help = aMalloc( len * sizeof(char) );
safestrncpy(commandinfo->help, str, len);
}
diff --git a/src/map/battle.c b/src/map/battle.c
index d65bb910f..b8143213a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -12,6 +12,7 @@
#include "../common/socket.h"
#include "../common/strlib.h"
#include "../common/utils.h"
+#include "../common/HPM.h"
#include "map.h"
#include "path.h"
@@ -335,11 +336,11 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
if( atk_elem == ELE_FIRE && battle->get_current_skill(target) == GN_WALLOFTHORN ) {
struct skill_unit *su = (struct skill_unit*)target;
struct skill_unit_group *sg;
- struct block_list *src;
+ struct block_list *sgsrc;
if( !su || !su->alive
|| (sg = su->group) == NULL || sg->val3 == -1
- || (src = map->id2bl(sg->src_id)) == NULL || status->isdead(src)
+ || (sgsrc = map->id2bl(sg->src_id)) == NULL || status->isdead(sgsrc)
)
return 0;
@@ -347,7 +348,7 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
int x,y;
x = sg->val3 >> 16;
y = sg->val3 & 0xffff;
- skill->unitsetting(src,su->group->skill_id,su->group->skill_lv,x,y,1);
+ skill->unitsetting(sgsrc,su->group->skill_id,su->group->skill_lv,x,y,1);
sg->val3 = -1;
sg->limit = DIFF_TICK32(timer->gettick(),sg->tick)+300;
}
@@ -2332,11 +2333,12 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
break;
case SR_RAMPAGEBLASTER:
skillratio += 20 * skill_lv * (sd?sd->spiritball_old:5) - 100;
- if( sc && sc->data[SC_EXPLOSIONSPIRITS] ){
+ if( sc && sc->data[SC_EXPLOSIONSPIRITS] ) {
skillratio += sc->data[SC_EXPLOSIONSPIRITS]->val1 * 20;
RE_LVL_DMOD(120);
- }else
+ } else {
RE_LVL_DMOD(150);
+ }
break;
case SR_KNUCKLEARROW:
if( flag&4 ){ // ATK [(Skill Level x 150) + (1000 x Target current weight / Maximum weight) + (Target Base Level x 5) x (Caster Base Level / 150)] %
@@ -2600,10 +2602,10 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
if( sc->data[SC_SAFETYWALL] && (flag&(BF_SHORT|BF_MAGIC))==BF_SHORT )
{
struct skill_unit_group* group = skill->id2group(sc->data[SC_SAFETYWALL]->val3);
- uint16 skill_id = sc->data[SC_SAFETYWALL]->val2;
+ uint16 src_skill_id = sc->data[SC_SAFETYWALL]->val2;
if (group) {
d->dmg_lv = ATK_BLOCK;
- if(skill_id == MH_STEINWAND){
+ if(src_skill_id == MH_STEINWAND){
if (--group->val2<=0)
skill->del_unitgroup(group,ALC_MARK);
return 0;
@@ -3209,11 +3211,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
memset(&ad,0,sizeof(ad));
memset(&flag,0,sizeof(flag));
- if(src==NULL || target==NULL)
- {
- nullpo_info(NLP_MARK);
- return ad;
- }
+ nullpo_retr(ad, src);
+ nullpo_retr(ad, target);
+
//Initial Values
ad.damage = 1;
ad.div_=skill->get_num(skill_id,skill_lv);
@@ -3521,10 +3521,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
memset(&md,0,sizeof(md));
- if( src == NULL || target == NULL ){
- nullpo_info(NLP_MARK);
- return md;
- }
+ nullpo_retr(md, src);
+ nullpo_retr(md, target);
//Some initial values
md.amotion=skill->get_inf(skill_id)&INF_GROUND_SKILL?0:sstatus->amotion;
@@ -3642,12 +3640,12 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.damage = 7 * md.damage / 20;
}*/
}else{
- float vitfactor = 0.0f, temp;
+ float vitfactor = 0.0f, ftemp;
if( (vitfactor=(status_get_vit(target)-120.0f)) > 0)
vitfactor = (vitfactor * (matk + atk) / 10) / status_get_vit(target);
- temp = max(0, vitfactor) + (targetVit * (matk + atk)) / 10;
- md.damage = (int64)(temp * 70 * skill_lv / 100);
+ ftemp = max(0, vitfactor) + (targetVit * (matk + atk)) / 10;
+ md.damage = (int64)(ftemp * 70 * skill_lv / 100);
}
md.damage -= totaldef;
}
@@ -3947,11 +3945,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
memset(&wd,0,sizeof(wd));
memset(&flag,0,sizeof(flag));
- if(src==NULL || target==NULL)
- {
- nullpo_info(NLP_MARK);
- return wd;
- }
+ nullpo_retr(wd, src);
+ nullpo_retr(wd, target);
+
//Initial flag
flag.rh=1;
flag.weapon=1;
@@ -4559,7 +4555,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
short index = sd?sd->equip_index[EQI_HAND_R]:0;
GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0) );
wd.damage = wd.damage * 70 / 100;
- n_ele = true;
+ //n_ele = true; // FIXME: This is has no effect if it's after GET_NORMAL_ATTACK (was this intended, or was it supposed to be put above?)
if (sd && index >= 0 &&
sd->inventory_data[index] &&
@@ -5267,6 +5263,11 @@ void battle_reflect_damage(struct block_list *target, struct block_list *src, st
delay += 100;/* gradual increase so the numbers don't clip in the client */
}
}
+
+#ifdef __clang_analyzer__
+ // Tell Clang's static analyzer that we want to += it even the value is currently unused (it'd be used if we added new checks)
+ (void)delay;
+#endif // __clang_analyzer
/* something caused reflect */
if( trdamage ) {
@@ -5815,6 +5816,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
m = target->m;
+ if (flag&BCT_ENEMY && ( map->getcell(m,src->x,src->y,CELL_CHKBASILICA) || map->getcell(m,target->x,target->y,CELL_CHKBASILICA) ) ) {
+ return -1;
+ }
+
//t_bl/s_bl hold the 'master' of the attack, while src/target are the actual
//objects involved.
if( (t_bl = battle->get_master(target)) == NULL )
@@ -5826,11 +5831,11 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if ( s_bl->type == BL_PC ) {
switch( t_bl->type ) {
case BL_MOB: // Source => PC, Target => MOB
- if (pc->has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVM) )
+ if (pc_has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVM) )
return 0;
break;
case BL_PC:
- if (pc->has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVP))
+ if (pc_has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVP))
return 0;
break;
default:/* anything else goes */
@@ -6066,9 +6071,11 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
}
if( flag&(BCT_PARTY|BCT_ENEMY) ) {
int s_party = status->get_party_id(s_bl);
+ int s_guild = status->get_guild_id(s_bl);
+
if( s_party && s_party == status->get_party_id(t_bl)
&& !(map->list[m].flag.pvp && map->list[m].flag.pvp_noparty)
- && !(map_flag_gvg(m) && map->list[m].flag.gvg_noparty)
+ && !(map_flag_gvg(m) && map->list[m].flag.gvg_noparty && !( s_guild && s_guild == status->get_guild_id(t_bl) ))
&& (!map->list[m].flag.battleground || sbg_id == tbg_id) )
state |= BCT_PARTY;
else
@@ -6456,7 +6463,7 @@ static const struct _battle_data {
{ "duel_time_interval", &battle_config.duel_time_interval, 60, 0, INT_MAX, },
{ "duel_only_on_same_map", &battle_config.duel_only_on_same_map, 0, 0, 1, },
{ "skip_teleport_lv1_menu", &battle_config.skip_teleport_lv1_menu, 0, 0, 1, },
- { "mob_max_skilllvl", &battle_config.mob_max_skilllvl, 100, 1, INT_MAX, },
+ { "mob_max_skilllvl", &battle_config.mob_max_skilllvl, 100, 1, INT_MAX, },
{ "allow_skill_without_day", &battle_config.allow_skill_without_day, 0, 0, 1, },
{ "allow_es_magic_player", &battle_config.allow_es_magic_pc, 0, 0, 1, },
{ "skill_caster_check", &battle_config.skill_caster_check, 1, 0, 1, },
@@ -6525,24 +6532,25 @@ static const struct _battle_data {
{ "atcommand_mobinfo_type", &battle_config.atcommand_mobinfo_type, 0, 0, 1 },
{ "homunculus_max_level", &battle_config.hom_max_level, 99, 0, MAX_LEVEL, },
{ "homunculus_S_max_level", &battle_config.hom_S_max_level, 150, 0, MAX_LEVEL, },
- { "mob_size_influence", &battle_config.mob_size_influence, 0, 0, 1, },
+ { "mob_size_influence", &battle_config.mob_size_influence, 0, 0, 1, },
/**
* Hercules
**/
{ "skill_trap_type", &battle_config.skill_trap_type, 0, 0, 1, },
{ "item_restricted_consumption_type", &battle_config.item_restricted_consumption_type,1, 0, 1, },
- { "max_walk_path", &battle_config.max_walk_path, 17, 1, MAX_WALKPATH, },
- { "item_enabled_npc", &battle_config.item_enabled_npc, 1, 0, 1, },
- { "gm_ignore_warpable_area", &battle_config.gm_ignore_warpable_area, 0, 2, 100, },
- { "packet_obfuscation", &battle_config.packet_obfuscation, 1, 0, 3, },
- { "client_accept_chatdori", &battle_config.client_accept_chatdori, 0, 0, INT_MAX, },
- { "snovice_call_type", &battle_config.snovice_call_type, 0, 0, 1, },
- { "guild_notice_changemap", &battle_config.guild_notice_changemap, 2, 0, 2, },
+ { "max_walk_path", &battle_config.max_walk_path, 17, 1, MAX_WALKPATH, },
+ { "item_enabled_npc", &battle_config.item_enabled_npc, 1, 0, 1, },
+ { "gm_ignore_warpable_area", &battle_config.gm_ignore_warpable_area, 0, 2, 100, },
+ { "packet_obfuscation", &battle_config.packet_obfuscation, 1, 0, 3, },
+ { "client_accept_chatdori", &battle_config.client_accept_chatdori, 0, 0, INT_MAX, },
+ { "snovice_call_type", &battle_config.snovice_call_type, 0, 0, 1, },
+ { "guild_notice_changemap", &battle_config.guild_notice_changemap, 2, 0, 2, },
{ "feature.banking", &battle_config.feature_banking, 1, 0, 1, },
{ "feature.auction", &battle_config.feature_auction, 0, 0, 2, },
{ "idletime_criteria", &battle_config.idletime_criteria, 0x25, 1, INT_MAX, },
{ "mon_trans_disable_in_gvg", &battle_config.mon_trans_disable_in_gvg, 0, 0, 1, },
+ { "case_sensitive_aegisnames", &battle_config.case_sensitive_aegisnames, 1, 0, 1, },
};
#ifndef STATS_OPT_OUT
/**
@@ -6701,8 +6709,11 @@ int battle_set_value(const char* w1, const char* w2)
int i;
ARR_FIND(0, ARRAYLENGTH(battle_data), i, strcmpi(w1, battle_data[i].str) == 0);
- if (i == ARRAYLENGTH(battle_data))
+ if (i == ARRAYLENGTH(battle_data)) {
+ if( HPM->parseConf(w1,w2,HPCT_BATTLE) ) /* if plugin-owned, succeed */
+ return 1;
return 0; // not found
+ }
if (val < battle_data[i].min || val > battle_data[i].max)
{
diff --git a/src/map/battle.h b/src/map/battle.h
index 4d4508742..ed5e40988 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -444,7 +444,7 @@ struct Battle_Config {
int mvp_tomb_enabled;
int atcommand_suggestions_enabled;
- int min_npc_vendchat_distance;
+ int min_npc_vendchat_distance;
int atcommand_mobinfo_type;
int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95]
@@ -466,6 +466,8 @@ struct Battle_Config {
int feature_auction;
int mon_trans_disable_in_gvg;
+
+ int case_sensitive_aegisnames;
} battle_config;
/* criteria for battle_config.idletime_critera */
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 6b9695849..6029a8c35 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -60,12 +60,12 @@ int bg_team_delete(int bg_id) {
}
/// Warps a Team
-int bg_team_warp(int bg_id, unsigned short mapindex, short x, short y) {
+int bg_team_warp(int bg_id, unsigned short map_index, short x, short y) {
int i;
struct battleground_data *bgd = bg->team_search(bg_id);
if( bgd == NULL ) return 0;
for( i = 0; i < MAX_BG_MEMBERS; i++ )
- if( bgd->members[i].sd != NULL ) pc->setpos(bgd->members[i].sd, mapindex, x, y, CLR_TELEPORT);
+ if( bgd->members[i].sd != NULL ) pc->setpos(bgd->members[i].sd, map_index, x, y, CLR_TELEPORT);
return 1;
}
@@ -168,14 +168,14 @@ int bg_member_respawn(struct map_session_data *sd) {
return 1; // Warped
}
-int bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev) {
+int bg_create(unsigned short map_index, short rx, short ry, const char *ev, const char *dev) {
struct battleground_data *bgd;
bg->team_counter++;
CREATE(bgd, struct battleground_data, 1);
bgd->bg_id = bg->team_counter;
bgd->count = 0;
- bgd->mapindex = mapindex;
+ bgd->mapindex = map_index;
bgd->x = rx;
bgd->y = ry;
safestrncpy(bgd->logout_event, ev, sizeof(bgd->logout_event));
diff --git a/src/map/battleground.h b/src/map/battleground.h
index 7f15a4bbc..a24ae5ea9 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -94,12 +94,12 @@ struct battleground_interface {
struct battleground_data* (*team_search) (int bg_id);
struct map_session_data* (*getavailablesd) (struct battleground_data *bgd);
int (*team_delete) (int bg_id);
- int (*team_warp) (int bg_id, unsigned short mapindex, short x, short y);
+ int (*team_warp) (int bg_id, unsigned short map_index, short x, short y);
int (*send_dot_remove) (struct map_session_data *sd);
int (*team_join) (int bg_id, struct map_session_data *sd);
int (*team_leave) (struct map_session_data *sd, int flag);
int (*member_respawn) (struct map_session_data *sd);
- int (*create) (unsigned short mapindex, short rx, short ry, const char *ev, const char *dev);
+ int (*create) (unsigned short map_index, short rx, short ry, const char *ev, const char *dev);
int (*team_get_id) (struct block_list *bl);
int (*send_message) (struct map_session_data *sd, const char *mes, int len);
int (*send_xy_timer_sub) (DBKey key, DBData *data, va_list ap);
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index a9f1412ed..2a15e66fc 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -76,7 +76,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha
return;
}
- if( !pc->can_give_items(sd) )
+ if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to buy (give zeny)
sd->buyingstore.slots = 0;
clif->message(sd->fd, msg_txt(246));
@@ -123,7 +123,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha
break;
}
- if( !id->flag.buyingstore || !itemdb->cantrade_sub(id, pc->get_group_level(sd), pc->get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 )
+ if( !id->flag.buyingstore || !itemdb->cantrade_sub(id, pc_get_group_level(sd), pc_get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 )
{// restrictions: allowed, no character-bound items and at least one must be owned
break;
}
@@ -197,7 +197,7 @@ void buyingstore_open(struct map_session_data* sd, int account_id)
return;
}
- if( !pc->can_give_items(sd) )
+ if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to sell
clif->message(sd->fd, msg_txt(246));
return;
@@ -235,7 +235,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int
return;
}
- if( !pc->can_give_items(sd) )
+ if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to sell
clif->message(sd->fd, msg_txt(246));
clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0);
@@ -290,7 +290,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int
return;
}
- if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) )
+ if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc_can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc_get_group_level(sd), pc_get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) )
{// non-tradable item
clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid);
return;
diff --git a/src/map/chat.c b/src/map/chat.c
index 187d40337..52d7f246a 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -54,11 +54,11 @@ struct chat_data* chat_createchat(struct block_list* bl, const char* title, cons
if( cd->bl.id == 0 ) {
aFree(cd);
- cd = NULL;
+ return NULL;
}
map->addiddb(&cd->bl);
-
+
if( bl->type != BL_NPC )
cd->kick_list = idb_alloc(DB_OPT_BASE);
@@ -121,7 +121,7 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) {
return 0;
}
- if( !cd->pub && strncmp(pass, cd->pass, sizeof(cd->pass)) != 0 && !pc->has_permission(sd, PC_PERM_JOIN_ALL_CHAT) )
+ if( !cd->pub && strncmp(pass, cd->pass, sizeof(cd->pass)) != 0 && !pc_has_permission(sd, PC_PERM_JOIN_ALL_CHAT) )
{
clif->joinchatfail(sd,1);
return 0;
@@ -315,7 +315,7 @@ int chat_kickchat(struct map_session_data* sd, const char* kickusername) {
if( i == cd->users )
return -1;
- if (pc->has_permission(cd->usersd[i], PC_PERM_NO_CHAT_KICK))
+ if (pc_has_permission(cd->usersd[i], PC_PERM_NO_CHAT_KICK))
return 0; //gm kick protection [Valaris]
idb_put(cd->kick_list,cd->usersd[i]->status.char_id,(void*)1);
diff --git a/src/map/clif.c b/src/map/clif.c
index 2257df0aa..6a55ad344 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -578,12 +578,12 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target
struct hQueue *queue = &script->hq[sd->bg_queue.arena->queue_id];
for( i = 0; i < queue->size; i++ ) {
- struct map_session_data * sd = NULL;
+ struct map_session_data *qsd = NULL;
- if( queue->item[i] > 0 && ( sd = map->id2sd(queue->item[i]) ) ) {
- WFIFOHEAD(sd->fd,len);
- memcpy(WFIFOP(sd->fd,0), buf, len);
- WFIFOSET(sd->fd,len);
+ if( queue->item[i] > 0 && ( qsd = map->id2sd(queue->item[i]) ) ) {
+ WFIFOHEAD(qsd->fd,len);
+ memcpy(WFIFOP(qsd->fd,0), buf, len);
+ WFIFOSET(qsd->fd,len);
}
}
}
@@ -930,6 +930,8 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu
struct view_data* vd = status->get_viewdata(bl);
struct packet_idle_unit p;
int g_id = status->get_guild_id(bl);
+
+ nullpo_retv(bl);
#if PACKETVER < 20091103
if( !pcdb_checkid(vd->class_) ) {
@@ -1060,6 +1062,8 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
struct packet_spawn_unit p;
int g_id = status->get_guild_id(bl);
+ nullpo_retv(bl);
+
#if PACKETVER < 20091103
if( !pcdb_checkid(vd->class_) ) {
clif->spawn_unit2(bl,target);
@@ -1123,6 +1127,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
}
#endif
if( disguised(bl) ) {
+ nullpo_retv(sd);
if( sd->status.class_ != sd->disguise )
clif->send(&p,sizeof(p),bl,target);
#if PACKETVER >= 20091103
@@ -1146,6 +1151,8 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
struct view_data* vd = status->get_viewdata(bl);
struct packet_unit_walking p;
int g_id = status->get_guild_id(bl);
+
+ nullpo_retv(bl);
sd = BL_CAST(BL_PC, bl);
@@ -1663,7 +1670,7 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y) {
WFIFOHEAD(fd,packet_len(0x91));
WFIFOW(fd,0) = 0x91;
- mapindex_getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name, (char*)WFIFOP(fd,2));
+ mapindex->getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name, (char*)WFIFOP(fd,2));
WFIFOW(fd,18) = x;
WFIFOW(fd,20) = y;
WFIFOSET(fd,packet_len(0x91));
@@ -1679,7 +1686,7 @@ void clif_changemapserver(struct map_session_data* sd, unsigned short map_index,
WFIFOHEAD(fd,packet_len(0x92));
WFIFOW(fd,0) = 0x92;
- mapindex_getmapname_ext(mapindex_id2name(map_index), (char*)WFIFOP(fd,2));
+ mapindex->getmapname_ext(mapindex_id2name(map_index), (char*)WFIFOP(fd,2));
WFIFOW(fd,18) = x;
WFIFOW(fd,20) = y;
WFIFOL(fd,22) = htonl(ip);
@@ -1798,13 +1805,13 @@ void clif_selllist(struct map_session_data *sd)
{
if( sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] )
{
- if( !itemdb_cansell(&sd->status.inventory[i], pc->get_group_level(sd)) )
+ if( !itemdb_cansell(&sd->status.inventory[i], pc_get_group_level(sd)) )
continue;
if( sd->status.inventory[i].expire_time )
continue; // Cannot Sell Rental Items
- if( sd->status.inventory[i].bound && !pc->can_give_bound_items(sd))
+ if( sd->status.inventory[i].bound && !pc_can_give_bound_items(sd))
continue; // Don't allow sale of bound items
val=sd->inventory_data[i]->value_sell;
@@ -1831,7 +1838,7 @@ void clif_selllist(struct map_session_data *sd)
/// - append this text
void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) {
int fd = sd->fd;
- int slen = strlen(mes) + 9;
+ size_t slen = strlen(mes) + 9;
sd->state.dialog = 1;
@@ -1943,7 +1950,7 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid) {
/// TODO investigate behavior of other windows [FlavioJS]
void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes) {
int fd = sd->fd;
- int slen = strlen(mes) + 9;
+ size_t slen = strlen(mes) + 9;
struct block_list *bl = NULL;
if (!sd->state.using_fake_npc && (npcid == npc->fake_nd->bl.id || ((bl = map->id2bl(npcid)) && (bl->m!=sd->bl.m ||
@@ -2714,7 +2721,7 @@ void read_channels_config(void) {
if( (colors = config_setting_get_member(settings, "colors")) != NULL ) {
int color_count = config_setting_length(colors);
- CREATE( hChSys.colors, unsigned long, color_count );
+ CREATE( hChSys.colors, unsigned int, color_count );
CREATE( hChSys.colors_name, char *, color_count );
for(i = 0; i < color_count; i++) {
config_setting_t *color = config_setting_get_elem(colors, i);
@@ -2723,7 +2730,7 @@ void read_channels_config(void) {
safestrncpy(hChSys.colors_name[i], config_setting_name(color), HCHSYS_NAME_LENGTH);
- hChSys.colors[i] = strtoul(config_setting_get_string_elem(colors,i),NULL,0);
+ hChSys.colors[i] = (unsigned int)strtoul(config_setting_get_string_elem(colors,i),NULL,0);
hChSys.colors[i] = (hChSys.colors[i] & 0x0000FF) << 16 | (hChSys.colors[i] & 0x00FF00) | (hChSys.colors[i] & 0xFF0000) >> 16;//RGB to BGR
}
hChSys.colors_count = color_count;
@@ -2839,7 +2846,7 @@ int clif_hpmeter_sub(struct block_list *bl, va_list ap) {
if( !tsd->fd || tsd == sd )
return 0;
- if( !pc->has_permission(tsd, PC_PERM_VIEW_HPMETER) )
+ if( !pc_has_permission(tsd, PC_PERM_VIEW_HPMETER) )
return 0;
WFIFOHEAD(tsd->fd,packet_len(cmd));
WFIFOW(tsd->fd,0) = cmd;
@@ -3141,7 +3148,7 @@ void clif_changelook(struct block_list *bl,int type,int val)
sd = BL_CAST(BL_PC, bl);
sc = status->get_sc(bl);
vd = status->get_viewdata(bl);
- //nullpo_ret(vd);
+
if( vd ) //temp hack to let Warp Portal change appearance
switch(type) {
case LOOK_WEAPON:
@@ -3250,6 +3257,7 @@ void clif_changelook(struct block_list *bl,int type,int val)
WBUFW(buf,0)=0x1d7;
WBUFL(buf,2)=bl->id;
if(type == LOOK_WEAPON || type == LOOK_SHIELD) {
+ nullpo_retv(vd);
WBUFB(buf,6)=LOOK_WEAPON;
WBUFW(buf,7)=vd->weapon;
WBUFW(buf,9)=vd->shield;
@@ -3258,7 +3266,7 @@ void clif_changelook(struct block_list *bl,int type,int val)
WBUFL(buf,7)=val;
}
clif->send(buf,packet_len(0x1d7),bl,target);
- if( disguised(bl) && ((TBL_PC*)sd)->fontcolor ) {
+ if( disguised(bl) && sd && sd->fontcolor ) {
WBUFL(buf,2)=-bl->id;
clif->send(buf,packet_len(0x1d7),bl,SELF);
}
@@ -3655,7 +3663,7 @@ void clif_useitemack(struct map_session_data *sd,int index,int amount,bool ok)
}
void clif_hercules_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) {
- if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
clif->colormes(sd->fd,COLOR_RED,msg_txt(1455));
return;
} else {
@@ -4224,7 +4232,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
}
if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
- pc->has_permission(sd, PC_PERM_VIEW_HPMETER)
+ pc_has_permission(sd, PC_PERM_VIEW_HPMETER)
)
clif->hpmeter_single(sd->fd, dstsd->bl.id, dstsd->battle_status.hp, dstsd->battle_status.max_hp);
@@ -4501,7 +4509,7 @@ void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_targe
WBUFW(buf,2) = x;
WBUFW(buf,4) = y;
WBUFW(buf,6) = type;
- mapindex_getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name,(char*)WBUFP(buf,8));
+ mapindex->getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name,(char*)WBUFP(buf,8));
if( fd ) {
WFIFOHEAD(fd,packet_len(0x192));
@@ -4696,6 +4704,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
tsd = BL_CAST(BL_PC, tbl);
if (tsd && tsd->fd) { //tsd has lost sight of the bl object.
+ nullpo_ret(bl);
switch(bl->type){
case BL_PC:
if (sd->vd.class_ != INVISIBLE_CLASS)
@@ -4728,6 +4737,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
}
}
if (sd && sd->fd) { //sd is watching tbl go out of view.
+ nullpo_ret(tbl);
if (((vd=status->get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS) &&
!(tbl->type == BL_NPC && (((TBL_NPC*)tbl)->option&OPTION_INVISIBLE)))
clif->clearunit_single(tbl->id,CLR_OUTSIGHT,sd->fd);
@@ -4750,6 +4760,7 @@ int clif_insight(struct block_list *bl,va_list ap)
tsd = BL_CAST(BL_PC, tbl);
if (tsd && tsd->fd) { //Tell tsd that bl entered into his view
+ nullpo_ret(bl);
switch(bl->type) {
case BL_ITEM:
clif->getareachar_item(tsd,(struct flooritem_data*)bl);
@@ -5258,10 +5269,10 @@ void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 s
memset(WFIFOP(fd,4), 0x00, 4*MAP_NAME_LENGTH_EXT);
if (map1 == (unsigned short)-1) strcpy((char*)WFIFOP(fd,4), "Random");
else // normal map name
- if (map1 > 0) mapindex_getmapname_ext(mapindex_id2name(map1), (char*)WFIFOP(fd,4));
- if (map2 > 0) mapindex_getmapname_ext(mapindex_id2name(map2), (char*)WFIFOP(fd,20));
- if (map3 > 0) mapindex_getmapname_ext(mapindex_id2name(map3), (char*)WFIFOP(fd,36));
- if (map4 > 0) mapindex_getmapname_ext(mapindex_id2name(map4), (char*)WFIFOP(fd,52));
+ if (map1 > 0) mapindex->getmapname_ext(mapindex_id2name(map1), (char*)WFIFOP(fd,4));
+ if (map2 > 0) mapindex->getmapname_ext(mapindex_id2name(map2), (char*)WFIFOP(fd,20));
+ if (map3 > 0) mapindex->getmapname_ext(mapindex_id2name(map3), (char*)WFIFOP(fd,36));
+ if (map4 > 0) mapindex->getmapname_ext(mapindex_id2name(map4), (char*)WFIFOP(fd,52));
WFIFOSET(fd,packet_len(0x11c));
sd->menuskill_id = skill_id;
@@ -5528,7 +5539,7 @@ void clif_displaymessage(const int fd, const char* mes) {
if( fd == -2 ) {
ShowInfo("HCP: %s\n",mes);
} else if ( fd > 0 ) {
- int len;
+ size_t len;
if ( ( len = strnlen(mes, 255) ) > 0 ) { // don't send a void message (it's not displaying on the client chat). @help can send void line.
WFIFOHEAD(fd, 5 + len);
@@ -5554,7 +5565,7 @@ void clif_displaymessage2(const int fd, const char* mes) {
line = strtok(message, "\n");
while(line != NULL) {
// Limit message to 255+1 characters (otherwise it causes a buffer overflow in the client)
- int len = strnlen(line, 255);
+ size_t len = strnlen(line, 255);
if (len > 0) { // don't send a void message (it's not displaying on the client chat). @help can send void line.
if( fd == -2 ) {
@@ -5606,7 +5617,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) {
}
/// Send broadcast message in yellow or blue without font formatting (ZC_BROADCAST).
/// 009a <packet len>.W <message>.?B
-void clif_broadcast(struct block_list* bl, const char* mes, int len, int type, enum send_target target)
+void clif_broadcast(struct block_list* bl, const char* mes, size_t len, int type, enum send_target target)
{
int lp = (type&BC_COLOR_MASK) ? 4 : 0;
unsigned char *buf = (unsigned char*)aMalloc((4 + lp + len)*sizeof(unsigned char));
@@ -5630,7 +5641,7 @@ void clif_broadcast(struct block_list* bl, const char* mes, int len, int type, e
*------------------------------------------*/
void clif_GlobalMessage(struct block_list* bl, const char* message) {
char buf[256];
- int len;
+ size_t len;
nullpo_retv(bl);
if(!message)
@@ -5653,7 +5664,7 @@ void clif_GlobalMessage(struct block_list* bl, const char* message) {
/// Send broadcast message with font formatting (ZC_BROADCAST2).
/// 01c3 <packet len>.W <fontColor>.L <fontType>.W <fontSize>.W <fontAlign>.W <fontY>.W <message>.?B
-void clif_broadcast2(struct block_list* bl, const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target)
+void clif_broadcast2(struct block_list* bl, const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target)
{
unsigned char *buf = (unsigned char*)aMalloc((16 + len)*sizeof(unsigned char));
@@ -5829,7 +5840,7 @@ void clif_upgrademessage(int fd, int result, int item_id)
/// Whisper is transmitted to the destination player (ZC_WHISPER).
/// 0097 <packet len>.W <nick>.24B <message>.?B
/// 0097 <packet len>.W <nick>.24B <isAdmin>.L <message>.?B (PACKETVER >= 20091104)
-void clif_wis_message(int fd, const char* nick, const char* mes, int mes_len) {
+void clif_wis_message(int fd, const char* nick, const char* mes, size_t mes_len) {
#if PACKETVER < 20091104
WFIFOHEAD(fd, mes_len + NAME_LENGTH + 4);
WFIFOW(fd,0) = 0x97;
@@ -5844,7 +5855,7 @@ void clif_wis_message(int fd, const char* nick, const char* mes, int mes_len) {
WFIFOW(fd,0) = 0x97;
WFIFOW(fd,2) = mes_len + NAME_LENGTH + 8;
safestrncpy((char*)WFIFOP(fd,4), nick, NAME_LENGTH);
- WFIFOL(fd,28) = (ssd && pc->get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char
+ WFIFOL(fd,28) = (ssd && pc_get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char
safestrncpy((char*)WFIFOP(fd,32), mes, mes_len);
WFIFOSET(fd,WFIFOW(fd,2));
#endif
@@ -6430,7 +6441,7 @@ void clif_party_member_info(struct party_data *p, struct map_session_data *sd)
WBUFB(buf,14) = (p->party.member[i].online)?0:1;
memcpy(WBUFP(buf,15), p->party.name, NAME_LENGTH);
memcpy(WBUFP(buf,39), sd->status.name, NAME_LENGTH);
- mapindex_getmapname_ext(map->list[sd->bl.m].custom_name ? map->list[map->list[sd->bl.m].instance_src_map].name : map->list[sd->bl.m].name, (char*)WBUFP(buf,63));
+ mapindex->getmapname_ext(map->list[sd->bl.m].custom_name ? map->list[map->list[sd->bl.m].instance_src_map].name : map->list[sd->bl.m].name, (char*)WBUFP(buf,63));
WBUFB(buf,79) = (p->party.item&1)?1:0;
WBUFB(buf,80) = (p->party.item&2)?1:0;
clif->send(buf,packet_len(0x1e9),&sd->bl,PARTY);
@@ -6464,7 +6475,7 @@ void clif_party_info(struct party_data* p, struct map_session_data *sd)
WBUFL(buf,28+c*46) = m->account_id;
memcpy(WBUFP(buf,28+c*46+4), m->name, NAME_LENGTH);
- mapindex_getmapname_ext(mapindex_id2name(m->map), (char*)WBUFP(buf,28+c*46+28));
+ mapindex->getmapname_ext(mapindex_id2name(m->map), (char*)WBUFP(buf,28+c*46+28));
WBUFB(buf,28+c*46+44) = (m->leader) ? 0 : 1;
WBUFB(buf,28+c*46+45) = (m->online) ? 0 : 1;
c++;
@@ -8053,14 +8064,14 @@ void clif_marriage_proposal(int fd, struct map_session_data *sd, struct map_sess
/*==========================================
*
*------------------------------------------*/
-void clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len) {
+void clif_disp_onlyself(struct map_session_data *sd, const char *mes, size_t len) {
clif->disp_message(&sd->bl, mes, len, SELF);
}
/*==========================================
* Displays a message using the guild-chat colors to the specified targets. [Skotlex]
*------------------------------------------*/
-void clif_disp_message(struct block_list* src, const char* mes, int len, enum send_target target)
+void clif_disp_message(struct block_list* src, const char* mes, size_t len, enum send_target target)
{
unsigned char buf[256];
@@ -8317,7 +8328,7 @@ void clif_specialeffect_value(struct block_list* bl, int effect_id, int num, sen
// Modification of clif_messagecolor to send colored messages to players to chat log only (doesn't display overhead)
/// 02c1 <packet len>.W <id>.L <color>.L <message>.?B
int clif_colormes(int fd, enum clif_colors color, const char* msg) {
- unsigned short msg_len = strlen(msg) + 1;
+ size_t msg_len = strlen(msg) + 1;
WFIFOHEAD(fd,msg_len + 12);
WFIFOW(fd,0) = 0x2C1;
@@ -8332,8 +8343,8 @@ int clif_colormes(int fd, enum clif_colors color, const char* msg) {
/// Monster/NPC color chat [SnakeDrak] (ZC_NPC_CHAT).
/// 02c1 <packet len>.W <id>.L <color>.L <message>.?B
-void clif_messagecolor(struct block_list* bl, unsigned long color, const char* msg) {
- unsigned short msg_len = strlen(msg) + 1;
+void clif_messagecolor(struct block_list* bl, unsigned int color, const char* msg) {
+ size_t msg_len = strlen(msg) + 1;
uint8 buf[256];
color = (color & 0x0000FF) << 16 | (color & 0x00FF00) | (color & 0xFF0000) >> 16; // RGB to BGR
@@ -8657,7 +8668,7 @@ void clif_slide(struct block_list *bl, int x, int y)
void clif_disp_overhead(struct block_list *bl, const char* mes)
{
unsigned char buf[256]; //This should be more than sufficient, the theorical max is CHAT_SIZE + 8 (pads and extra inserted crap)
- int len_mes = strlen(mes)+1; //Account for \0
+ size_t len_mes = strlen(mes)+1; //Account for \0
if (len_mes > sizeof(buf)-8) {
ShowError("clif_disp_overhead: Message too long (length %d)\n", len_mes);
@@ -8771,7 +8782,7 @@ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsig
{
char mapname[MAP_NAME_LENGTH_EXT];
- mapindex_getmapname_ext(mapindex_id2name(sd->feel_map[feel_level].index), mapname);
+ mapindex->getmapname_ext(mapindex_id2name(sd->feel_map[feel_level].index), mapname);
clif->starskill(sd, mapname, 0, feel_level, type ? 1 : 0);
}
@@ -8946,9 +8957,10 @@ void clif_viewequip_fail(struct map_session_data* sd)
/// Returns true if the packet was parsed successfully.
/// Formats: 0 - <packet id>.w <packet len>.w (<name> : <message>).?B 00
/// 1 - <packet id>.w <packet len>.w <name>.24B <message>.?B 00
-bool clif_process_message(struct map_session_data* sd, int format, char** name_, int* namelen_, char** message_, int* messagelen_) {
+bool clif_process_message(struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) {
char *text, *name, *message;
- unsigned int packetlen, textlen, namelen, messagelen;
+ unsigned int packetlen, textlen;
+ size_t namelen, messagelen;
int fd = sd->fd;
*name_ = NULL;
@@ -9255,7 +9267,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
instance->check_idle(map->list[sd->bl.m].instance_id);
}
- if( pc->has_permission(sd,PC_PERM_VIEW_HPMETER) ) {
+ if( pc_has_permission(sd,PC_PERM_VIEW_HPMETER) ) {
map->list[sd->bl.m].hpmeter_visible++;
sd->state.hpmeter_visible = 1;
}
@@ -9604,7 +9616,7 @@ void clif_parse_Hotkey(int fd, struct map_session_data *sd) {
/// Displays cast-like progress bar (ZC_PROGRESS).
/// 02f0 <color>.L <time>.L
-void clif_progressbar(struct map_session_data * sd, unsigned long color, unsigned int second)
+void clif_progressbar(struct map_session_data * sd, unsigned int color, unsigned int second)
{
int fd = sd->fd;
@@ -9737,7 +9749,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
sc = status->get_sc(bl);
if (sc && sc->option&OPTION_INVISIBLE && !disguised(bl) &&
bl->type != BL_NPC && //Skip hidden NPCs which can be seen using Maya Purple
- pc->get_group_level(sd) < battle_config.hack_info_GM_level
+ pc_get_group_level(sd) < battle_config.hack_info_GM_level
) {
char gm_msg[256];
sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target (id: %d).\n", sd->status.name, sd->status.account_id, id);
@@ -9766,10 +9778,10 @@ int clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) {
void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
{
const char* text = (char*)RFIFOP(fd,4);
- int textlen = RFIFOW(fd,2) - 4;
+ size_t textlen = RFIFOW(fd,2) - 4;
char *name, *message, *fakename = NULL;
- int namelen, messagelen;
+ size_t namelen, messagelen;
bool is_fake;
@@ -10274,7 +10286,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
int i;
char *target, *message;
- int namelen, messagelen;
+ size_t namelen, messagelen;
// validate packet and retrieve name and message
if( !clif->process_message(sd, 1, &target, &namelen, &message, &messagelen) )
@@ -10354,7 +10366,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
channel = (struct hChSysCh *)g->channel;
}
if( channel || (channel = strdb_get(clif->channel_db,chname)) ) {
- unsigned char k;
+ int k;
for( k = 0; k < sd->channel_count; k++ ) {
if( sd->channels[k] == channel )
break;
@@ -10364,7 +10376,6 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
} else if( channel->pass[0] == '\0' && !(channel->banned && idb_exists(channel->banned, sd->status.account_id)) ) {
if( channel->type == hChSys_ALLY ) {
struct guild *g = sd->guild, *sg = NULL;
- int k;
for (k = 0; k < MAX_GUILDALLIANCE; k++) {
if( g->alliance[k].opposition == 0 && g->alliance[k].guild_id && (sg = guild->search(g->alliance[k].guild_id) ) ) {
if( !(((struct hChSysCh*)sg->channel)->banned && idb_exists(((struct hChSysCh*)sg->channel)->banned, sd->status.account_id)))
@@ -10395,8 +10406,8 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
}
// if player ignores everyone
- if (dstsd->state.ignoreAll && pc->get_group_level(sd) <= pc->get_group_level(dstsd)) {
- if (dstsd->sc.option & OPTION_INVISIBLE && pc->get_group_level(sd) < pc->get_group_level(dstsd))
+ if (dstsd->state.ignoreAll && pc_get_group_level(sd) <= pc_get_group_level(dstsd)) {
+ if (dstsd->sc.option & OPTION_INVISIBLE && pc_get_group_level(sd) < pc_get_group_level(dstsd))
clif->wis_end(fd, 1); // 1: target character is not logged in
else
clif->wis_end(fd, 3); // 3: everyone ignored by target
@@ -10411,7 +10422,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
return;
}
- if( pc->get_group_level(sd) <= pc->get_group_level(dstsd) ) {
+ if( pc_get_group_level(sd) <= pc_get_group_level(dstsd) ) {
// if player ignores the source character
ARR_FIND(0, MAX_IGNORE_LIST, i, dstsd->ignore[i].name[0] == '\0' || strcmp(dstsd->ignore[i].name, sd->status.name) == 0);
if(i < MAX_IGNORE_LIST && dstsd->ignore[i].name[0] != '\0') { // source char present in ignore list
@@ -11088,8 +11099,10 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
{// TODO: State tracking?
int type;
+
+ nullpo_retv(sd);
- if( sd && pc->checkskill(sd, MC_CHANGECART) < 1 )
+ if( pc->checkskill(sd, MC_CHANGECART) < 1 )
return;
#ifdef RENEWAL
@@ -11462,7 +11475,7 @@ void clif_parse_UseSkillMap(int fd, struct map_session_data* sd)
uint16 skill_id = RFIFOW(fd,2);
char map_name[MAP_NAME_LENGTH];
- mapindex_getmapname((char*)RFIFOP(fd,4), map_name);
+ mapindex->getmapname((char*)RFIFOP(fd,4), map_name);
sd->state.workinprogress = 0;
if(skill_id != sd->menuskill_id)
@@ -12095,7 +12108,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd)
int textlen = RFIFOW(fd,2) - 4;
char *name, *message;
- int namelen, messagelen;
+ size_t namelen, messagelen;
// validate packet and retrieve name and message
if( !clif->process_message(sd, 0, &name, &namelen, &message, &messagelen) )
@@ -12627,7 +12640,7 @@ void clif_PartyBookingFailedRecall(int fd, struct map_session_data *sd)
void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
- unsigned long aid = RFIFOL(fd, 2);
+ unsigned int aid = RFIFOL(fd, 2);
clif->PartyBookingRefuseVolunteer(aid, sd);
#else
@@ -12636,7 +12649,7 @@ void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
}
/// 08fa <index>.L
-void clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_data *sd)
+void clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd)
{
#ifdef PARTY_RECRUIT
unsigned char buf[2+6];
@@ -13033,7 +13046,7 @@ bool clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) {
/// 0153 <packet len>.W <emblem data>.?B
void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd)
{
- unsigned long emblem_len = RFIFOW(fd,2)-4;
+ unsigned int emblem_len = RFIFOW(fd,2)-4;
const uint8* emblem = RFIFOP(fd,4);
if( !emblem_len || !sd->state.gmaster_flag )
@@ -13155,7 +13168,7 @@ void clif_parse_GuildMessage(int fd, struct map_session_data* sd)
int textlen = RFIFOW(fd,2) - 4;
char *name, *message;
- int namelen, messagelen;
+ size_t namelen, messagelen;
// validate packet and retrieve name and message
if( !clif->process_message(sd, 0, &name, &namelen, &message, &messagelen) )
@@ -13524,7 +13537,12 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
if ( (count=itemdb->search_name_array(item_array, 10, item_monster_name, 1)) > 0 ){
for(i = 0; i < count; i++){
- if( item_array[i] && strcmp(item_array[i]->name, item_monster_name) == 0 )// It only accepts aegis name
+ if( !item_array[i] )
+ continue;
+ // It only accepts aegis name
+ if( battle_config.case_sensitive_aegisnames && strcmp(item_array[i]->name, item_monster_name) == 0 )
+ break;
+ if( !battle_config.case_sensitive_aegisnames && strcasecmp(item_array[i]->name, item_monster_name) == 0 )
break;
}
@@ -13546,7 +13564,12 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
if( (count=mob->db_searchname_array(mob_array, 10, item_monster_name, 1)) > 0){
for(i = 0; i < count; i++){
- if( mob_array[i] && strcmp(mob_array[i]->sprite, item_monster_name) == 0 ) // It only accepts sprite name
+ if( !mob_array[i] )
+ continue;
+ // It only accepts sprite name
+ if( battle_config.case_sensitive_aegisnames && strcmp(mob_array[i]->sprite, item_monster_name) == 0 )
+ break;
+ if( !battle_config.case_sensitive_aegisnames && strcasecmp(mob_array[i]->sprite, item_monster_name) == 0 )
break;
}
@@ -13592,7 +13615,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
if (type == 2) {
if (!battle_config.client_accept_chatdori)
return;
- if (pc->get_group_level(sd) > 0 || sd->bl.id != id)
+ if (pc_get_group_level(sd) > 0 || sd->bl.id != id)
return;
value = battle_config.client_accept_chatdori;
@@ -13603,7 +13626,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
return;
}
- if (type == 2 || ( (pc->get_group_level(sd)) > pc->get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) {
+ if (type == 2 || ( (pc_get_group_level(sd)) > pc_get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) {
clif->manner_message(sd, 0);
clif->manner_message(dstsd, 5);
@@ -13672,7 +13695,7 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) {
int x,y,type;
- if (!pc->has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE))
+ if (!pc_has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE))
return;
x = RFIFOW(fd,2);
@@ -14556,12 +14579,12 @@ void clif_parse_Check(int fd, struct map_session_data *sd)
char charname[NAME_LENGTH];
struct map_session_data* pl_sd;
- if(!pc->has_permission(sd, PC_PERM_USE_CHECK))
+ if(!pc_has_permission(sd, PC_PERM_USE_CHECK))
return;
safestrncpy(charname, (const char*)RFIFOP(fd,packet_db[RFIFOW(fd,0)].pos[0]), sizeof(charname));
- if( ( pl_sd = map->nick2sd(charname) ) == NULL || pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) {
+ if( ( pl_sd = map->nick2sd(charname) ) == NULL || pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) {
return;
}
@@ -14749,7 +14772,7 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id)
struct mail_message *msg = &sd->mail.inbox.msg[i];
struct item *item = &msg->item;
struct item_data *data;
- int msg_len = strlen(msg->body), len;
+ size_t msg_len = strlen(msg->body), len;
if( msg_len == 0 ) {
strcpy(msg->body, "(no message)");
@@ -14843,6 +14866,11 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
if ((data = itemdb->exists(sd->mail.inbox.msg[i].item.nameid)) == NULL)
return;
+ if( pc_is90overweight(sd) ) {
+ clif->mail_getattachment(fd, 2);
+ return;
+ }
+
switch( pc->checkadditem(sd, data->nameid, sd->mail.inbox.msg[i].item.amount) ) {
case ADDITEM_NEW:
fail = ( pc->inventoryblank(sd) == 0 );
@@ -15143,10 +15171,10 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
return;
}
- if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time ||
+ if( !pc_can_give_items(sd) || sd->status.inventory[idx].expire_time ||
!sd->status.inventory[idx].identify ||
- !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || // Quest Item or something else
- (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) {
+ !itemdb_canauction(&sd->status.inventory[idx],pc_get_group_level(sd)) || // Quest Item or something else
+ (sd->status.inventory[idx].bound && !pc_can_give_bound_items(sd)) ) {
clif->auction_setitem(sd->fd, idx, true);
return;
}
@@ -15254,7 +15282,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)
}
// Auction checks...
- if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bound_items(sd) ) {
+ if( sd->status.inventory[sd->auction.index].bound && !pc_can_give_bound_items(sd) ) {
clif->message(sd->fd, msg_txt(293));
clif->auction_message(fd, 2); // The auction has been canceled
return;
@@ -15307,7 +15335,7 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
unsigned int auction_id = RFIFOL(fd,2);
int bid = RFIFOL(fd,6);
- if( !pc->can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish]
+ if( !pc_can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish]
clif->message(sd->fd, msg_txt(246));
return;
}
@@ -15598,7 +15626,7 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) {
if (!tsd)
return;
- if( tsd->status.show_equip || pc->has_permission(sd, PC_PERM_VIEW_EQUIPMENT) )
+ if( tsd->status.show_equip || pc_has_permission(sd, PC_PERM_VIEW_EQUIPMENT) )
clif->viewequip_ack(sd, tsd);
else
clif->viewequip_fail(sd);
@@ -15635,8 +15663,7 @@ void clif_parse_PartyTick(int fd, struct map_session_data* sd)
/// Sends list of all quest states (ZC_ALL_QUEST_LIST).
/// 02b1 <packet len>.W <num>.L { <quest id>.L <active>.B }*num
-void clif_quest_send_list(struct map_session_data * sd)
-{
+void clif_quest_send_list(struct map_session_data *sd) {
int fd = sd->fd;
int i;
int len = sd->avail_quests*5+8;
@@ -15657,8 +15684,7 @@ void clif_quest_send_list(struct map_session_data * sd)
/// Sends list of all quest missions (ZC_ALL_QUEST_MISSION).
/// 02b2 <packet len>.W <num>.L { <quest id>.L <start time>.L <expire time>.L <mobs>.W { <mob id>.L <mob count>.W <mob name>.24B }*3 }*num
-void clif_quest_send_mission(struct map_session_data * sd)
-{
+void clif_quest_send_mission(struct map_session_data *sd) {
int fd = sd->fd;
int i, j;
int len = sd->avail_quests*104+8;
@@ -15670,17 +15696,17 @@ void clif_quest_send_mission(struct map_session_data * sd)
WFIFOL(fd, 4) = sd->avail_quests;
for( i = 0; i < sd->avail_quests; i++ ) {
+ struct quest_db *qi = quest->db(sd->quest_log[i].quest_id);
WFIFOL(fd, i*104+8) = sd->quest_log[i].quest_id;
- WFIFOL(fd, i*104+12) = sd->quest_log[i].time - quest->db[sd->quest_index[i]].time;
+ WFIFOL(fd, i*104+12) = sd->quest_log[i].time - qi->time;
WFIFOL(fd, i*104+16) = sd->quest_log[i].time;
- WFIFOW(fd, i*104+20) = quest->db[sd->quest_index[i]].num_objectives;
+ WFIFOW(fd, i*104+20) = qi->num_objectives;
- for( j = 0 ; j < quest->db[sd->quest_index[i]].num_objectives; j++ )
- {
- WFIFOL(fd, i*104+22+j*30) = quest->db[sd->quest_index[i]].mob[j];
+ for( j = 0 ; j < qi->num_objectives; j++ ) {
+ WFIFOL(fd, i*104+22+j*30) = qi->mob[j];
WFIFOW(fd, i*104+26+j*30) = sd->quest_log[i].count[j];
- monster = mob->db(quest->db[sd->quest_index[i]].mob[j]);
- memcpy(WFIFOP(fd, i*104+28+j*30), monster?monster->jname:"NULL", NAME_LENGTH);
+ monster = mob->db(qi->mob[j]);
+ memcpy(WFIFOP(fd, i*104+28+j*30), monster->jname, NAME_LENGTH);
}
}
@@ -15690,25 +15716,25 @@ void clif_quest_send_mission(struct map_session_data * sd)
/// Notification about a new quest (ZC_ADD_QUEST).
/// 02b3 <quest id>.L <active>.B <start time>.L <expire time>.L <mobs>.W { <mob id>.L <mob count>.W <mob name>.24B }*3
-void clif_quest_add(struct map_session_data * sd, struct quest * qd, int index)
-{
+void clif_quest_add(struct map_session_data *sd, struct quest *qd) {
int fd = sd->fd;
int i;
struct mob_db *monster;
+ struct quest_db *qi = quest->db(qd->quest_id);
WFIFOHEAD(fd, packet_len(0x2b3));
WFIFOW(fd, 0) = 0x2b3;
WFIFOL(fd, 2) = qd->quest_id;
WFIFOB(fd, 6) = qd->state;
- WFIFOB(fd, 7) = qd->time - quest->db[index].time;
+ WFIFOB(fd, 7) = qd->time - qi->time;
WFIFOL(fd, 11) = qd->time;
- WFIFOW(fd, 15) = quest->db[index].num_objectives;
+ WFIFOW(fd, 15) = qi->num_objectives;
- for( i = 0; i < quest->db[index].num_objectives; i++ ) {
- WFIFOL(fd, i*30+17) = quest->db[index].mob[i];
+ for( i = 0; i < qi->num_objectives; i++ ) {
+ WFIFOL(fd, i*30+17) = qi->mob[i];
WFIFOW(fd, i*30+21) = qd->count[i];
- monster = mob->db(quest->db[index].mob[i]);
- memcpy(WFIFOP(fd, i*30+23), monster?monster->jname:"NULL", NAME_LENGTH);
+ monster = mob->db(qi->mob[i]);
+ memcpy(WFIFOP(fd, i*30+23), monster->jname, NAME_LENGTH);
}
WFIFOSET(fd, packet_len(0x2b3));
@@ -15717,8 +15743,7 @@ void clif_quest_add(struct map_session_data * sd, struct quest * qd, int index)
/// Notification about a quest being removed (ZC_DEL_QUEST).
/// 02b4 <quest id>.L
-void clif_quest_delete(struct map_session_data * sd, int quest_id)
-{
+void clif_quest_delete(struct map_session_data *sd, int quest_id) {
int fd = sd->fd;
WFIFOHEAD(fd, packet_len(0x2b4));
@@ -15730,21 +15755,21 @@ void clif_quest_delete(struct map_session_data * sd, int quest_id)
/// Notification of an update to the hunting mission counter (ZC_UPDATE_MISSION_HUNT).
/// 02b5 <packet len>.W <mobs>.W { <quest id>.L <mob id>.L <total count>.W <current count>.W }*3
-void clif_quest_update_objective(struct map_session_data * sd, struct quest * qd, int index)
-{
+void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd) {
int fd = sd->fd;
int i;
- int len = quest->db[index].num_objectives*12+6;
+ struct quest_db *qi = quest->db(qd->quest_id);
+ int len = qi->num_objectives*12+6;
WFIFOHEAD(fd, len);
WFIFOW(fd, 0) = 0x2b5;
WFIFOW(fd, 2) = len;
- WFIFOW(fd, 4) = quest->db[index].num_objectives;
+ WFIFOW(fd, 4) = qi->num_objectives;
- for( i = 0; i < quest->db[index].num_objectives; i++ ) {
+ for( i = 0; i < qi->num_objectives; i++ ) {
WFIFOL(fd, i*12+6) = qd->quest_id;
- WFIFOL(fd, i*12+10) = quest->db[index].mob[i];
- WFIFOW(fd, i*12+14) = quest->db[index].count[i];
+ WFIFOL(fd, i*12+10) = qi->mob[i];
+ WFIFOW(fd, i*12+14) = qi->count[i];
WFIFOW(fd, i*12+16) = qd->count[i];
}
@@ -15754,16 +15779,14 @@ void clif_quest_update_objective(struct map_session_data * sd, struct quest * qd
/// Request to change the state of a quest (CZ_ACTIVE_QUEST).
/// 02b6 <quest id>.L <active>.B
-void clif_parse_questStateAck(int fd, struct map_session_data * sd)
-{
+void clif_parse_questStateAck(int fd, struct map_session_data *sd) {
quest->update_status(sd, RFIFOL(fd,2), RFIFOB(fd,6)?Q_ACTIVE:Q_INACTIVE);
}
/// Notification about the change of a quest state (ZC_ACTIVE_QUEST).
/// 02b7 <quest id>.L <active>.B
-void clif_quest_update_status(struct map_session_data * sd, int quest_id, bool active)
-{
+void clif_quest_update_status(struct map_session_data *sd, int quest_id, bool active) {
int fd = sd->fd;
WFIFOHEAD(fd, packet_len(0x2b7));
@@ -16075,7 +16098,7 @@ void clif_bg_xy_remove(struct map_session_data *sd)
/// Notifies clients of a battleground message (ZC_BATTLEFIELD_CHAT).
/// 02dc <packet len>.W <account id>.L <name>.24B <message>.?B
-void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, int len)
+void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, size_t len)
{
struct map_session_data *sd;
unsigned char *buf;
@@ -16104,7 +16127,7 @@ void clif_parse_BattleChat(int fd, struct map_session_data* sd)
int textlen = RFIFOW(fd,2) - 4;
char *name, *message;
- int namelen, messagelen;
+ size_t namelen, messagelen;
if( !clif->process_message(sd, 0, &name, &namelen, &message, &messagelen) )
return;
@@ -16982,7 +17005,7 @@ void clif_parse_debug(int fd,struct map_session_data *sd) {
}
ShowDebug("Packet debug of 0x%04X (length %d), %s session #%d, %d/%d (AID/CID)\n", cmd, packet_len, sd->state.active ? "authed" : "unauthed", fd, sd->status.account_id, sd->status.char_id);
} else {
- packet_len = RFIFOREST(fd);
+ packet_len = (int)RFIFOREST(fd);
ShowDebug("Packet debug of 0x%04X (length %d), session #%d\n", cmd, packet_len, fd);
}
@@ -17590,7 +17613,7 @@ void clif_partytickack(struct map_session_data* sd, bool flag) {
void clif_ShowScript(struct block_list* bl, const char* message) {
char buf[256];
- int len;
+ size_t len;
nullpo_retv(bl);
if(!message)
@@ -17933,7 +17956,7 @@ void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) {
int i;
/* TODO maybe this could be a new permission? using gm level in the meantime */
- if( !tsd || pc->get_group_level(tsd) >= pc->get_group_level(sd) )
+ if( !tsd || pc_get_group_level(tsd) >= pc_get_group_level(sd) )
return;
for( i = 0; i < EQI_MAX; i++ ) {
@@ -18240,6 +18263,7 @@ static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...)
packet_db[cmd].pos[i] = pos;
}
+ va_end(va);
}
void packetdb_loaddb(void) {
@@ -18284,7 +18308,7 @@ int do_init_clif(bool minimal) {
* Setup Color Table (saves unnecessary load of strtoul on every call)
**/
for(i = 0; i < COLOR_MAX; i++) {
- color_table[i] = strtoul(colors[i],NULL,0);
+ color_table[i] = (unsigned int)strtoul(colors[i],NULL,0);
color_table[i] = (color_table[i] & 0x0000FF) << 16 | (color_table[i] & 0x00FF00) | (color_table[i] & 0xFF0000) >> 16;//RGB to BGR
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 8b78f27e9..c4088893a 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -342,6 +342,7 @@ typedef enum useskill_fail_cause { // clif_skill_fail
}useskill_fail_cause;
enum clif_messages {
+ ITEM_CANT_OBTAIN_WEIGHT = 0x34, /* you cannot carry more items because you are overweight. */
SKILL_CANT_USE_AREA = 0x536,
ITEM_CANT_USE_AREA = 0x537,
};
@@ -471,7 +472,7 @@ struct s_packet_db {
};
struct {
- unsigned long *colors;
+ unsigned int *colors;
char **colors_name;
unsigned char colors_count;
bool local, ally, irc;
@@ -516,7 +517,7 @@ struct cdelayed_damage {
* Vars
**/
struct s_packet_db packet_db[MAX_PACKET_DB + 1];
-unsigned long color_table[COLOR_MAX];
+unsigned int color_table[COLOR_MAX];
/**
* Clif.c Interface
@@ -705,7 +706,7 @@ struct clif_interface {
void (*equpcheckbox) (struct map_session_data* sd);
void (*displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest);
void (*font) (struct map_session_data *sd);
- void (*progressbar) (struct map_session_data * sd, unsigned long color, unsigned int second);
+ void (*progressbar) (struct map_session_data * sd, unsigned int color, unsigned int second);
void (*progressbar_abort) (struct map_session_data * sd);
void (*showdigit) (struct map_session_data* sd, unsigned char type, int value);
int (*elementalconverter_list) (struct map_session_data *sd);
@@ -782,13 +783,13 @@ struct clif_interface {
void (*clearchat) (struct chat_data *cd,int fd);
void (*leavechat) (struct chat_data* cd, struct map_session_data* sd, bool flag);
void (*changechatstatus) (struct chat_data* cd);
- void (*wis_message) (int fd, const char* nick, const char* mes, int mes_len);
+ void (*wis_message) (int fd, const char* nick, const char* mes, size_t mes_len);
void (*wis_end) (int fd, int flag);
- void (*disp_onlyself) (struct map_session_data *sd, const char *mes, int len);
- void (*disp_message) (struct block_list* src, const char* mes, int len, enum send_target target);
- void (*broadcast) (struct block_list* bl, const char* mes, int len, int type, enum send_target target);
- void (*broadcast2) (struct block_list* bl, const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target);
- void (*messagecolor) (struct block_list* bl, unsigned long color, const char* msg);
+ void (*disp_onlyself) (struct map_session_data *sd, const char *mes, size_t len);
+ void (*disp_message) (struct block_list* src, const char* mes, size_t len, enum send_target target);
+ void (*broadcast) (struct block_list* bl, const char* mes, size_t len, int type, enum send_target target);
+ void (*broadcast2) (struct block_list* bl, const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target);
+ void (*messagecolor) (struct block_list* bl, unsigned int color, const char* msg);
void (*disp_overhead) (struct block_list *bl, const char* mes);
void (*msg) (struct map_session_data* sd, unsigned short id);
void (*msg_value) (struct map_session_data* sd, unsigned short id, int value);
@@ -800,7 +801,7 @@ struct clif_interface {
/* message+s(printf) */
void (*messages) (const int fd, const char* mes, ...);
int (*colormes) (int fd, enum clif_colors color, const char* msg);
- bool (*process_message) (struct map_session_data* sd, int format, char** name_, int* namelen_, char** message_, int* messagelen_);
+ bool (*process_message) (struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_);
void (*wisexin) (struct map_session_data *sd,int type,int flag);
void (*wisall) (struct map_session_data *sd,int type,int flag);
void (*PMIgnoreList) (struct map_session_data* sd);
@@ -886,7 +887,7 @@ struct clif_interface {
void (*bg_hp) (struct map_session_data *sd);
void (*bg_xy) (struct map_session_data *sd);
void (*bg_xy_remove) (struct map_session_data *sd);
- void (*bg_message) (struct battleground_data *bgd, int src_id, const char *name, const char *mes, int len);
+ void (*bg_message) (struct battleground_data *bgd, int src_id, const char *name, const char *mes, size_t len);
void (*bg_updatescore) (int16 m);
void (*bg_updatescore_single) (struct map_session_data *sd);
void (*sendbgemblem_area) (struct map_session_data *sd);
@@ -923,12 +924,12 @@ struct clif_interface {
int (*hom_food) (struct map_session_data *sd,int foodid,int fail);
void (*send_homdata) (struct map_session_data *sd, int state, int param);
/* questlog-related */
- void (*quest_send_list) (struct map_session_data * sd);
- void (*quest_send_mission) (struct map_session_data * sd);
- void (*quest_add) (struct map_session_data * sd, struct quest * qd, int index);
- void (*quest_delete) (struct map_session_data * sd, int quest_id);
- void (*quest_update_status) (struct map_session_data * sd, int quest_id, bool active);
- void (*quest_update_objective) (struct map_session_data * sd, struct quest * qd, int index);
+ void (*quest_send_list) (struct map_session_data *sd);
+ void (*quest_send_mission) (struct map_session_data *sd);
+ void (*quest_add) (struct map_session_data *sd, struct quest *qd);
+ void (*quest_delete) (struct map_session_data *sd, int quest_id);
+ void (*quest_update_status) (struct map_session_data *sd, int quest_id, bool active);
+ void (*quest_update_objective) (struct map_session_data *sd, struct quest *qd);
void (*quest_show_event) (struct map_session_data *sd, struct block_list *bl, short state, short color);
/* mail-related */
void (*mail_window) (int fd, int flag);
@@ -969,7 +970,7 @@ struct clif_interface {
void (*PartyRecruitInsertNotify) (struct map_session_data* sd, struct party_booking_ad_info* pb_ad);
/* Group Search System Update */
void (*PartyBookingVolunteerInfo) (int index, struct map_session_data *sd);
- void (*PartyBookingRefuseVolunteer) (unsigned long aid, struct map_session_data *sd);
+ void (*PartyBookingRefuseVolunteer) (unsigned int aid, struct map_session_data *sd);
void (*PartyBookingCancelVolunteer) (int index, struct map_session_data *sd);
void (*PartyBookingAddFilteringList) (int index, struct map_session_data *sd);
void (*PartyBookingSubFilteringList) (int gid, struct map_session_data *sd);
diff --git a/src/map/guild.c b/src/map/guild.c
index cca4da6cf..8a34b7f4b 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -124,14 +124,14 @@ int guild_check_skill_require(struct guild *g,int id)
bool guild_read_castledb(char* str[], int columns, int current)
{// <castle id>,<map name>,<castle name>,<castle event>[,<reserved/unused switch flag>]
struct guild_castle *gc;
- int mapindex = mapindex_name2id(str[1]);
+ int index = mapindex->name2id(str[1]);
- if (map->mapindex2mapid(mapindex) < 0) // Map not found or on another map-server
+ if (map->mapindex2mapid(index) < 0) // Map not found or on another map-server
return false;
CREATE(gc, struct guild_castle, 1);
gc->castle_id = atoi(str[0]);
- gc->mapindex = mapindex;
+ gc->mapindex = index;
safestrncpy(gc->castle_name, str[2], sizeof(gc->castle_name));
safestrncpy(gc->castle_event, str[3], sizeof(gc->castle_event));
@@ -171,14 +171,14 @@ struct guild_castle* guild_castle_search(int gcid)
}
/// lookup: map index -> castle*
-struct guild_castle* guild_mapindex2gc(short mapindex)
+struct guild_castle* guild_mapindex2gc(short map_index)
{
struct guild_castle* gc;
DBIterator *iter = db_iterator(guild->castle_db);
for( gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter) )
{
- if( gc->mapindex == mapindex )
+ if( gc->mapindex == map_index )
break;
}
dbi_destroy(iter);
@@ -189,7 +189,7 @@ struct guild_castle* guild_mapindex2gc(short mapindex)
/// lookup: map name -> castle*
struct guild_castle* guild_mapname2gc(const char* mapname)
{
- return guild->mapindex2gc(mapindex_name2id(mapname));
+ return guild->mapindex2gc(mapindex->name2id(mapname));
}
struct map_session_data* guild_getavailablesd(struct guild* g)
@@ -1594,10 +1594,10 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
* Notification of a relationship between 2 guilds
*---------------------------------------------------*/
int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag,const char *name1,const char *name2) {
- struct guild *g[2];
- int guild_id[2];
- const char *guild_name[2];
- struct map_session_data *sd[2];
+ struct guild *g[2] = { NULL };
+ int guild_id[2] = { 0 };
+ const char *guild_name[2] = { NULL };
+ struct map_session_data *sd[2] = { NULL };
int j,i;
guild_id[0] = guild_id1;
@@ -1664,11 +1664,11 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
for (i = 0; i < 2 - (flag & 1); i++) { // Retransmission of the relationship list to all members
- struct map_session_data *sd;
+ struct map_session_data *msd;
if(g[i]!=NULL)
for(j=0;j<g[i]->max_member;j++)
- if((sd=g[i]->member[j].sd)!=NULL)
- clif->guild_allianceinfo(sd);
+ if((msd=g[i]->member[j].sd)!=NULL)
+ clif->guild_allianceinfo(msd);
}
return 0;
}
diff --git a/src/map/guild.h b/src/map/guild.h
index 1a04a98ef..7878d75c3 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -83,7 +83,7 @@ struct guild_interface {
struct guild_castle *(*castle_search) (int gcid);
/* */
struct guild_castle *(*mapname2gc) (const char* mapname);
- struct guild_castle *(*mapindex2gc) (short mapindex);
+ struct guild_castle *(*mapindex2gc) (short map_index);
/* */
struct map_session_data *(*getavailablesd) (struct guild *g);
int (*getindex) (struct guild *g,int account_id,int char_id);
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 7ab471b9d..c6fa68d7f 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -1209,7 +1209,7 @@ void homunculus_exp_db_read(void) {
if(line[0] == '/' && line[1] == '/')
continue;
- if (!(homun->exptable[j++] = strtoul(line, NULL, 10)))
+ if (!(homun->exptable[j++] = (unsigned int)strtoul(line, NULL, 10)))
break;
}
// Last permitted level have to be 0!
diff --git a/src/map/instance.c b/src/map/instance.c
index ab68c9e22..924bbfd14 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -157,7 +157,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
return -1;
}
- if( map_name != NULL && strdb_iget(mapindex_db, map_name) ) {
+ if( map_name != NULL && strdb_iget(mapindex->db, map_name) ) {
ShowError("instance_add_map: trying to create instanced map with existent name '%s'\n", map_name);
return -2;
}
@@ -186,7 +186,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
map->list[im].custom_name = true;
} else
snprintf(map->list[im].name, MAP_NAME_LENGTH, (usebasename ? "%.3d#%s" : "%.3d%s"), instance_id, name); // Generate Name for Instance Map
- map->list[im].index = mapindex_addmap(-1, map->list[im].name); // Add map index
+ map->list[im].index = mapindex->addmap(-1, map->list[im].name); // Add map index
map->list[im].channel = NULL;
@@ -419,7 +419,7 @@ void instance_del_map(int16 m) {
if( map->list[m].mob_delete_timer != INVALID_TIMER )
timer->delete(map->list[m].mob_delete_timer, map->removemobs_timer);
- mapindex_removemap(map_id2index(m));
+ mapindex->removemap(map_id2index(m));
// Free memory
aFree(map->list[m].cell);
diff --git a/src/map/intif.c b/src/map/intif.c
index 36ae753db..b9d4d1746 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -125,7 +125,7 @@ int intif_rename(struct map_session_data *sd, int type, char *name)
}
// GM Send a message
-int intif_broadcast(const char* mes, int len, int type)
+int intif_broadcast(const char* mes, size_t len, int type)
{
int lp = (type|BC_COLOR_MASK) ? 4 : 0;
@@ -155,7 +155,7 @@ int intif_broadcast(const char* mes, int len, int type)
return 0;
}
-int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY)
+int intif_broadcast2(const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY)
{
// Send to the local players
clif->broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT);
@@ -192,7 +192,7 @@ int intif_main_message(struct map_session_data* sd, const char* message)
snprintf( output, sizeof(output), msg_txt(386), sd->status.name, message );
// send the message using the inter-server broadcast service
- intif_broadcast2( output, strlen(output) + 1, 0xFE000000, 0, 0, 0, 0 );
+ intif->broadcast2( output, strlen(output) + 1, 0xFE000000, 0, 0, 0, 0 );
// log the chat message
logs->chat( LOG_CHAT_MAINCHAT, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message );
@@ -201,7 +201,7 @@ int intif_main_message(struct map_session_data* sd, const char* message)
}
// The transmission of Wisp/Page to inter-server (player not found on this server)
-int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len)
+int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, size_t mes_len)
{
nullpo_ret(sd);
if (intif->CheckForCharServer())
@@ -247,7 +247,7 @@ int intif_wis_replay(int id, int flag)
// The transmission of GM only Wisp/Page from server to inter-server
int intif_wis_message_to_gm(char *wisp_name, int permission, char *mes)
{
- int mes_len;
+ size_t mes_len;
if (intif->CheckForCharServer())
return 0;
mes_len = strlen(mes) + 1; // + null
@@ -447,7 +447,7 @@ int intif_party_leave(int party_id,int account_id, int char_id)
// Request keeping party for new map ??
int intif_party_changemap(struct map_session_data *sd,int online) {
- int16 m, mapindex;
+ int16 m, map_index;
if (intif->CheckForCharServer())
return 0;
@@ -455,16 +455,16 @@ int intif_party_changemap(struct map_session_data *sd,int online) {
return 0;
if( (m=map->mapindex2mapid(sd->mapindex)) >= 0 && map->list[m].instance_id >= 0 )
- mapindex = map_id2index(map->list[m].instance_src_map);
+ map_index = map_id2index(map->list[m].instance_src_map);
else
- mapindex = sd->mapindex;
+ map_index = sd->mapindex;
WFIFOHEAD(inter_fd,19);
WFIFOW(inter_fd,0)=0x3025;
WFIFOL(inter_fd,2)=sd->status.party_id;
WFIFOL(inter_fd,6)=sd->status.account_id;
WFIFOL(inter_fd,10)=sd->status.char_id;
- WFIFOW(inter_fd,14)=mapindex;
+ WFIFOW(inter_fd,14)=map_index;
WFIFOB(inter_fd,16)=online;
WFIFOW(inter_fd,17)=sd->status.base_level;
WFIFOSET(inter_fd,19);
@@ -560,7 +560,7 @@ int intif_guild_addmember(int guild_id,struct guild_member *m)
}
// Request a new leader for guild
-int intif_guild_change_gm(int guild_id, const char* name, int len)
+int intif_guild_change_gm(int guild_id, const char* name, size_t len)
{
if (intif->CheckForCharServer())
return 0;
@@ -893,7 +893,7 @@ int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) {
char *message;
int len;
- if (!pc->has_permission(sd, permission))
+ if (!pc_has_permission(sd, permission))
return 0;
wisp_name = va_arg(va, char*);
message = va_arg(va, char*);
@@ -1311,50 +1311,80 @@ QUESTLOG SYSTEM FUNCTIONS
***************************************/
-int intif_request_questlog(TBL_PC *sd)
-{
+/**
+ * Requests a character's quest log entries to the inter server.
+ *
+ * @param sd Character's data
+ */
+void intif_request_questlog(TBL_PC *sd) {
WFIFOHEAD(inter_fd,6);
WFIFOW(inter_fd,0) = 0x3060;
WFIFOL(inter_fd,2) = sd->status.char_id;
WFIFOSET(inter_fd,6);
- return 0;
}
+/**
+ * Parses the received quest log entries for a character from the inter server.
+ *
+ * Received in reply to the requests made by intif_request_questlog.
+ *
+ * @see intif_parse
+ */
void intif_parse_QuestLog(int fd) {
- int char_id = RFIFOL(fd, 4);
- int i;
- TBL_PC * sd = map->charid2sd(char_id);
+ int char_id = RFIFOL(fd, 4), num_received = (RFIFOW(fd, 2)-8)/sizeof(struct quest);
+ TBL_PC *sd = map->charid2sd(char_id);
- //User not online anymore
- if(!sd)
+ if (!sd) // User not online anymore
return;
- sd->avail_quests = sd->num_quests = (RFIFOW(fd, 2)-8)/sizeof(struct quest);
-
- memset(&sd->quest_log, 0, sizeof(sd->quest_log));
-
- for( i = 0; i < sd->num_quests; i++ )
- {
- memcpy(&sd->quest_log[i], RFIFOP(fd, i*sizeof(struct quest)+8), sizeof(struct quest));
+ sd->num_quests = sd->avail_quests = 0;
- sd->quest_index[i] = quest->search_db(sd->quest_log[i].quest_id);
-
- if( sd->quest_index[i] < 0 )
- {
- ShowError("intif_parse_QuestLog: quest %d not found in DB.\n",sd->quest_log[i].quest_id);
- sd->avail_quests--;
- sd->num_quests--;
- i--;
- continue;
+ if (num_received == 0) {
+ if (sd->quest_log) {
+ aFree(sd->quest_log);
+ sd->quest_log = NULL;
+ }
+ } else {
+ struct quest *received = (struct quest *)RFIFOP(fd, 8);
+ int i, k = num_received;
+ if (sd->quest_log) {
+ RECREATE(sd->quest_log, struct quest, num_received);
+ } else {
+ CREATE(sd->quest_log, struct quest, num_received);
}
- if( sd->quest_log[i].state == Q_COMPLETE )
- sd->avail_quests--;
+ for (i = 0; i < num_received; i++) {
+ if( quest->db(received[i].quest_id) == &quest->dummy ) {
+ ShowError("intif_parse_QuestLog: quest %d not found in DB.\n", received[i].quest_id);
+ continue;
+ }
+ if (received[i].state != Q_COMPLETE) {
+ // Insert at the beginning
+ memcpy(&sd->quest_log[sd->avail_quests++], &received[i], sizeof(struct quest));
+ } else {
+ // Insert at the end
+ memcpy(&sd->quest_log[--k], &received[i], sizeof(struct quest));
+ }
+ sd->num_quests++;
+ }
+ if (sd->avail_quests < k) {
+ // sd->avail_quests and k didn't meet in the middle: some entries were skipped
+ if (k < num_received) // Move the entries at the end to fill the gap
+ memmove(&sd->quest_log[k], &sd->quest_log[sd->avail_quests], sizeof(struct quest)*(num_received - k));
+ sd->quest_log = aRealloc(sd->quest_log, sizeof(struct quest)*sd->num_quests);
+ }
}
quest->pc_login(sd);
}
+/**
+ * Parses the quest log save ack for a character from the inter server.
+ *
+ * Received in reply to the requests made by intif_quest_save.
+ *
+ * @see intif_parse
+ */
void intif_parse_QuestSave(int fd) {
int cid = RFIFOL(fd, 2);
TBL_PC *sd = map->id2sd(cid);
@@ -1365,21 +1395,24 @@ void intif_parse_QuestSave(int fd) {
sd->save_quest = false;
}
-int intif_quest_save(TBL_PC *sd)
-{
- int len;
+/**
+ * Requests to the inter server to save a character's quest log entries.
+ *
+ * @param sd Character's data
+ * @return 0 in case of success, nonzero otherwise
+ */
+int intif_quest_save(TBL_PC *sd) {
+ int len = sizeof(struct quest)*sd->num_quests + 8;
if(intif->CheckForCharServer())
- return 0;
-
- len = sizeof(struct quest)*sd->num_quests + 8;
+ return 1;
WFIFOHEAD(inter_fd, len);
WFIFOW(inter_fd,0) = 0x3061;
WFIFOW(inter_fd,2) = len;
WFIFOL(inter_fd,4) = sd->status.char_id;
if( sd->num_quests )
- memcpy(WFIFOP(inter_fd,8), &sd->quest_log, sizeof(struct quest)*sd->num_quests);
+ memcpy(WFIFOP(inter_fd,8), sd->quest_log, sizeof(struct quest)*sd->num_quests);
WFIFOSET(inter_fd, len);
return 0;
@@ -1526,7 +1559,7 @@ void intif_parse_MailDelete(int fd) {
}
if( sd->mail.inbox.full )
- intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails
+ intif->Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails
}
clif->mail_delete(sd->fd, mail_id, failed);
@@ -1567,7 +1600,7 @@ void intif_parse_MailReturn(int fd) {
}
if( sd->mail.inbox.full )
- intif_Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails
+ intif->Mail_requestinbox(sd->status.char_id, 1); // Free space is available for new mails
}
clif->mail_return(sd->fd, mail_id, fail);
@@ -1764,7 +1797,7 @@ void intif_parse_AuctionClose(int fd) {
if( result == 0 ) {
// FIXME: Leeching off a parse function
clif->pAuction_cancelreg(fd, sd);
- intif_Auction_requestlist(sd->status.char_id, 6, 0, "", 1);
+ intif->Auction_requestlist(sd->status.char_id, 6, 0, "", 1);
}
}
@@ -1801,7 +1834,7 @@ void intif_parse_AuctionBid(int fd) {
}
if( result == 1 ) { // To update the list, display your buy list
clif->pAuction_cancelreg(fd, sd);
- intif_Auction_requestlist(sd->status.char_id, 7, 0, "", 1);
+ intif->Auction_requestlist(sd->status.char_id, 7, 0, "", 1);
}
}
diff --git a/src/map/intif.h b/src/map/intif.h
index d0dfd25cd..bd3908ce7 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -40,10 +40,10 @@ struct intif_interface {
int (*parse) (int fd);
int (*create_pet)(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id,
short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name);
- int (*broadcast) (const char* mes, int len, int type);
- int (*broadcast2) (const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY);
+ int (*broadcast) (const char* mes, size_t len, int type);
+ int (*broadcast2) (const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY);
int (*main_message) (struct map_session_data* sd, const char* message);
- int (*wis_message) (struct map_session_data *sd,char *nick,char *mes,int mes_len);
+ int (*wis_message) (struct map_session_data *sd,char *nick,char *mes,size_t mes_len);
int (*wis_message_to_gm) (char *Wisp_name, int permission, char *mes);
int (*saveregistry) (struct map_session_data *sd, int type);
int (*request_registry) (struct map_session_data *sd, int flag);
@@ -65,7 +65,7 @@ struct intif_interface {
int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class_);
int (*guild_break) (int guild_id);
int (*guild_message) (int guild_id, int account_id, const char *mes, int len);
- int (*guild_change_gm) (int guild_id, const char* name, int len);
+ int (*guild_change_gm) (int guild_id, const char* name, size_t len);
int (*guild_change_basicinfo) (int guild_id, int type, const void *data, int len);
int (*guild_change_memberinfo) (int guild_id, int account_id, int char_id, int type, const void *data, int len);
int (*guild_position) (int guild_id, int idx, struct guild_position *p);
@@ -85,7 +85,7 @@ struct intif_interface {
int (*homunculus_requestsave) (int account_id, struct s_homunculus* sh);
int (*homunculus_requestdelete) (int homun_id);
/******QUEST SYTEM*******/
- int (*request_questlog) (struct map_session_data * sd);
+ void (*request_questlog) (struct map_session_data * sd);
int (*quest_save) (struct map_session_data * sd);
// MERCENARY SYSTEM
int (*mercenary_create) (struct s_mercenary *merc);
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index 0f487d8f7..ff28082e7 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -152,7 +152,8 @@ int irc_parse(int fd) {
* NULL, needs to be able to fit an IRC_HOST_LENGTH long string)
*/
void irc_parse_source(char *source, char *nick, char *ident, char *host) {
- int i, len = strlen(source), pos = 0;
+ int i, pos = 0;
+ size_t len = strlen(source);
unsigned char stage = 0;
for(i = 0; i < len; i++) {
@@ -208,7 +209,7 @@ void irc_parse_sub(int fd, char *str) {
* @param str Command to send
*/
void irc_send(char *str) {
- int len = strlen(str) + 2;
+ size_t len = strlen(str) + 2;
if (len > IRC_MESSAGE_LENGTH-3)
len = IRC_MESSAGE_LENGTH-3;
WFIFOHEAD(ircbot->fd, len);
@@ -289,7 +290,7 @@ void irc_privmsg(int fd, char *cmd, char *source, char *target, char *msg) {
} else if( strcmpi(target,hChSys.irc_nick) == 0 ) {
ShowDebug("irc_privmsg: Received message from %s: '%s'\n", source ? source : "(null)", msg);
#endif // IRCBOT_DEBUG
- } else if( strcmpi(target,hChSys.irc_channel) == 0 ) {
+ } else if( msg && strcmpi(target,hChSys.irc_channel) == 0 ) {
char source_nick[IRC_NICK_LENGTH], source_ident[IRC_IDENT_LENGTH], source_host[IRC_HOST_LENGTH];
source_nick[0] = source_ident[0] = source_host[0] = '\0';
@@ -298,7 +299,7 @@ void irc_privmsg(int fd, char *cmd, char *source, char *target, char *msg) {
ircbot->parse_source(source,source_nick,source_ident,source_host);
if( ircbot->channel ) {
- int padding_len = strlen(ircbot->channel->name) + strlen(source_nick) + 13;
+ size_t padding_len = strlen(ircbot->channel->name) + strlen(source_nick) + 13;
while (1) {
snprintf(send_string, 150, "[ #%s ] IRC.%s : %s",ircbot->channel->name,source_nick,msg);
clif->chsys_msg2(ircbot->channel,send_string);
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index 305cdfd91..7d6a19eba 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -24,7 +24,7 @@ struct irc_bot_interface {
bool isIn, isOn;
int64 last_try;
unsigned char fails;
- unsigned long ip;
+ uint32 ip;
unsigned short port;
/* */
struct hChSysCh *channel;
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index dc4559483..3f7d06e36 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -33,11 +33,13 @@ int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap)
str=va_arg(ap,char *);
dst=va_arg(ap,struct item_data **);
dst2=va_arg(ap,struct item_data **);
- if(item == &itemdb->dummy) return 0;
+ if (item == &itemdb->dummy) return 0;
//Absolute priority to Aegis code name.
if (*dst != NULL) return 0;
- if( strcmpi(item->name,str)==0 )
+ if ( battle_config.case_sensitive_aegisnames && strcmp(item->name,str) == 0 )
+ *dst=item;
+ else if ( !battle_config.case_sensitive_aegisnames && strcasecmp(item->name,str) == 0 )
*dst=item;
//Second priority to Client displayed name.
@@ -61,7 +63,9 @@ struct item_data* itemdb_searchname(const char *str) {
continue;
// Absolute priority to Aegis code name.
- if( strcasecmp(item->name,str) == 0 )
+ if ( battle_config.case_sensitive_aegisnames && strcmp(item->name,str) == 0 )
+ return item;
+ else if ( !battle_config.case_sensitive_aegisnames && strcasecmp(item->name,str) == 0 )
return item;
//Second priority to Client displayed name.
@@ -90,7 +94,9 @@ int itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap)
return 1; //Invalid item.
if(stristr(item->jname,str))
return 0;
- if(stristr(item->name,str))
+ if(battle_config.case_sensitive_aegisnames && strstr(item->name,str))
+ return 0;
+ if(!battle_config.case_sensitive_aegisnames && stristr(item->name,str))
return 0;
return strcmpi(item->jname,str);
}
@@ -113,9 +119,18 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str,
if( item == NULL )
continue;
- if( (!flag && (stristr(item->jname,str) || stristr(item->name,str))) ||
- (flag && (strcmp(item->jname,str) == 0 || strcmp(item->name,str) == 0)) )
- {
+ if(
+ (!flag
+ && (stristr(item->jname,str)
+ || (battle_config.case_sensitive_aegisnames && strstr(item->name,str))
+ || (!battle_config.case_sensitive_aegisnames && stristr(item->name,str))
+ ))
+ || (flag
+ && (strcmp(item->jname,str) == 0
+ || (battle_config.case_sensitive_aegisnames && strcmp(item->name,str) == 0)
+ || (!battle_config.case_sensitive_aegisnames && strcasecmp(item->name,str) == 0)
+ ))
+ ) {
if( count < size )
data[count] = item;
++count;
@@ -791,7 +806,7 @@ bool itemdb_read_cached_packages(const char *config_filename) {
for( i = 0; i < pcount; i++ ) {
unsigned short id = 0, random_qty = 0, must_qty = 0;
- struct item_data *data;
+ struct item_data *pdata;
struct item_package *package = &itemdb->packages[i];
unsigned short c;
@@ -802,10 +817,10 @@ bool itemdb_read_cached_packages(const char *config_filename) {
//next 2 bytes = random count
hread(&random_qty,sizeof(random_qty),1,file);
- if( !(data = itemdb->exists(id)) )
+ if( !(pdata = itemdb->exists(id)) )
ShowWarning("itemdb_read_packages: unknown package item '%d', skipping..\n",id);
else
- data->package = &itemdb->packages[i];
+ pdata->package = &itemdb->packages[i];
package->id = id;
package->random_qty = random_qty;
@@ -1007,7 +1022,6 @@ void itemdb_read_packages(void) {
for(r = 0; r < highest_gcount; r++) {
prev[r] = NULL;
}
- r = 0;
data->package = &itemdb->packages[count];
@@ -1285,7 +1299,7 @@ bool itemdb_read_stack(char* fields[], int columns, int current)
}
amount = (unsigned short)strtoul(fields[1], NULL, 10);
- type = strtoul(fields[2], NULL, 10);
+ type = (unsigned int)strtoul(fields[2], NULL, 10);
if( !amount )
{// ignore
@@ -2208,10 +2222,10 @@ void itemdb_reload(void) {
iter = mapit_geteachpc();
for( sd = (struct map_session_data*)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data*)mapit->next(iter) ) {
memset(sd->item_delay, 0, sizeof(sd->item_delay)); // reset item delays
+ pc->setinventorydata(sd);
if( battle_config.item_check )
sd->state.itemcheck = 1;
pc->checkitem(sd);
- pc->setinventorydata(sd);
/* clear combo bonuses */
if( sd->combos.count ) {
aFree(sd->combos.bonus);
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 1030035ea..d74b92d4b 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -70,6 +70,7 @@ enum item_itemid {
ITEMID_PHRACON = 1010,
ITEMID_EMVERETARCON = 1011,
ITEMID_TRAP = 1065,
+ ITEMID_ANGRA_MANYU = 1599,
ITEMID_STRANGE_EMBRYO = 6415,
ITEMID_FACE_PAINT = 6120,
ITEMID_STONE = 7049,
diff --git a/src/map/mail.c b/src/map/mail.c
index 007f7592d..371aa892f 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -64,7 +64,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) {
return 1;
if( idx == 0 ) { // Zeny Transfer
- if( amount < 0 || !pc->can_give_items(sd) )
+ if( amount < 0 || !pc_can_give_items(sd) )
return 1;
if( amount > sd->status.zeny )
@@ -81,9 +81,9 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) {
return 1;
if( amount < 0 || amount > sd->status.inventory[idx].amount )
return 1;
- if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time ||
- !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) ||
- (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) )
+ if( !pc_can_give_items(sd) || sd->status.inventory[idx].expire_time ||
+ !itemdb_canmail(&sd->status.inventory[idx],pc_get_group_level(sd)) ||
+ (sd->status.inventory[idx].bound && !pc_can_give_bound_items(sd)) )
return 1;
sd->mail.index = idx;
diff --git a/src/map/map.c b/src/map/map.c
index 099d2c6ea..7ff4ebcc5 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -695,7 +695,7 @@ int map_vforeachinrange(int (*func)(struct block_list*, va_list), struct block_l
va_copy(apcopy, ap);
returnCount = bl_vforeach(func, blockcount, INT_MAX, apcopy);
- va_end(ap);
+ va_end(apcopy);
return returnCount;
}
@@ -2239,7 +2239,7 @@ bool map_addnpc(int16 m,struct npc_data *nd) {
// Stores the spawn data entry in the mob list.
// Returns the index of successful, or -1 if the list was full.
int map_addmobtolist(unsigned short m, struct spawn_data *spawn) {
- size_t i;
+ int i;
ARR_FIND( 0, MAX_MOB_LIST_PER_MAP, i, map->list[m].moblist[i] == NULL );
if( i < MAX_MOB_LIST_PER_MAP ) {
map->list[m].moblist[i] = spawn;
@@ -2330,7 +2330,7 @@ void map_removemobs(int16 m) {
*------------------------------------------*/
int16 map_mapname2mapid(const char* name) {
unsigned short map_index;
- map_index = mapindex_name2id(name);
+ map_index = mapindex->name2id(name);
if (!map_index)
return -1;
return map->mapindex2mapid(map_index);
@@ -2339,12 +2339,12 @@ int16 map_mapname2mapid(const char* name) {
/*==========================================
* Returns the map of the given mapindex. [Skotlex]
*------------------------------------------*/
-int16 map_mapindex2mapid(unsigned short mapindex) {
+int16 map_mapindex2mapid(unsigned short map_index) {
- if (!mapindex || mapindex > MAX_MAPINDEX)
+ if (!map_index || map_index > MAX_MAPINDEX)
return -1;
- return map->index2mapid[mapindex];
+ return map->index2mapid[map_index];
}
/*==========================================
@@ -2766,27 +2766,27 @@ void map_iwall_remove(const char *wall_name)
DBData create_map_data_other_server(DBKey key, va_list args)
{
struct map_data_other_server *mdos;
- unsigned short mapindex = (unsigned short)key.ui;
+ unsigned short map_index = (unsigned short)key.ui;
mdos=(struct map_data_other_server *)aCalloc(1,sizeof(struct map_data_other_server));
- mdos->index = mapindex;
- memcpy(mdos->name, mapindex_id2name(mapindex), MAP_NAME_LENGTH);
+ mdos->index = map_index;
+ memcpy(mdos->name, mapindex_id2name(map_index), MAP_NAME_LENGTH);
return DB->ptr2data(mdos);
}
/*==========================================
* Add mapindex to db of another map server
*------------------------------------------*/
-int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
+int map_setipport(unsigned short map_index, uint32 ip, uint16 port)
{
struct map_data_other_server *mdos;
- mdos= uidb_ensure(map->map_db,(unsigned int)mapindex, map->create_map_data_other_server);
+ mdos= uidb_ensure(map->map_db,(unsigned int)map_index, map->create_map_data_other_server);
if(mdos->cell) //Local map,Do nothing. Give priority to our own local maps over ones from another server. [Skotlex]
return 0;
if(ip == clif->map_ip && port == clif->map_port) {
//That's odd, we received info that we are the ones with this map, but... we don't have it.
- ShowFatalError("map_setipport : received info that this map-server SHOULD have map '%s', but it is not loaded.\n",mapindex_id2name(mapindex));
+ ShowFatalError("map_setipport : received info that this map-server SHOULD have map '%s', but it is not loaded.\n",mapindex_id2name(map_index));
exit(EXIT_FAILURE);
}
mdos->ip = ip;
@@ -2816,15 +2816,15 @@ int map_eraseallipport(void) {
/*==========================================
* Delete mapindex from db of another map server
*------------------------------------------*/
-int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
+int map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) {
struct map_data_other_server *mdos;
- mdos = (struct map_data_other_server*)uidb_get(map->map_db,(unsigned int)mapindex);
+ mdos = (struct map_data_other_server*)uidb_get(map->map_db,(unsigned int)map_index);
if(!mdos || mdos->cell) //Map either does not exists or is a local map.
return 0;
if(mdos->ip==ip && mdos->port == port) {
- uidb_remove(map->map_db,(unsigned int)mapindex);
+ uidb_remove(map->map_db,(unsigned int)map_index);
aFree(mdos);
return 1;
}
@@ -2908,7 +2908,7 @@ int map_readfromcache(struct map_data *m, char *buffer) {
int map_addmap(const char* mapname) {
map->list[map->count].instance_id = -1;
- mapindex_getmapname(mapname, map->list[map->count++].name);
+ mapindex->getmapname(mapname, map->list[map->count++].name);
return 0;
}
@@ -2927,7 +2927,7 @@ int map_delmap(char* mapname) {
return 0;
}
- mapindex_getmapname(mapname, map_name);
+ mapindex->getmapname(mapname, map_name);
for(i = 0; i < map->count; i++) {
if (strcmp(map->list[i].name, map_name) == 0) {
map->delmapid(i);
@@ -3318,7 +3318,7 @@ int map_readallmaps (void) {
continue;
}
- map->list[i].index = mapindex_name2id(map->list[i].name);
+ map->list[i].index = mapindex->name2id(map->list[i].name);
if ( map->index2mapid[map_id2index(i)] != -1 ) {
ShowWarning("Map %s already loaded!"CL_CLL"\n", map->list[i].name);
@@ -3684,7 +3684,7 @@ void map_zone_remove(int m) {
unsigned short k;
char empty[1] = "\0";
for(k = 0; k < map->list[m].zone_mf_count; k++) {
- int len = strlen(map->list[m].zone_mf[k]),j;
+ size_t len = strlen(map->list[m].zone_mf[k]),j;
params[0] = '\0';
memcpy(flag, map->list[m].zone_mf[k], MAP_ZONE_MAPFLAG_LENGTH);
for(j = 0; j < len; j++) {
@@ -4236,7 +4236,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
} else if (!strcmpi(flag,"adjust_unit_duration")) {
int skill_id, k;
char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH];
- int len = strlen(params);
+ size_t len = strlen(params);
modifier[0] = '\0';
memcpy(skill_name, params, MAP_ZONE_MAPFLAG_LENGTH);
@@ -4254,7 +4254,6 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
} else {
int idx = map->list[m].unit_count;
- k = 0;
ARR_FIND(0, idx, k, map->list[m].units[k]->skill_id == skill_id);
if( k < idx ) {
@@ -4270,7 +4269,7 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
} else if (!strcmpi(flag,"adjust_skill_damage")) {
int skill_id, k;
char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH];
- int len = strlen(params);
+ size_t len = strlen(params);
modifier[0] = '\0';
memcpy(skill_name, params, MAP_ZONE_MAPFLAG_LENGTH);
@@ -4288,7 +4287,6 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
} else {
int idx = map->list[m].skill_count;
- k = 0;
ARR_FIND(0, idx, k, map->list[m].skills[k]->skill_id == skill_id);
if( k < idx ) {
@@ -4414,7 +4412,7 @@ void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const
char flag[MAP_ZONE_MAPFLAG_LENGTH], params[MAP_ZONE_MAPFLAG_LENGTH];
map->list[m].zone = zone;
for(i = 0; i < zone->mapflags_count; i++) {
- int len = strlen(zone->mapflags[i]);
+ size_t len = strlen(zone->mapflags[i]);
int k;
params[0] = '\0';
memcpy(flag, zone->mapflags[i], MAP_ZONE_MAPFLAG_LENGTH);
@@ -4442,7 +4440,7 @@ void map_zone_init(void) {
zone = &map->zone_all;
for(i = 0; i < zone->mapflags_count; i++) {
- int len = strlen(zone->mapflags[i]);
+ size_t len = strlen(zone->mapflags[i]);
params[0] = '\0';
memcpy(flag, zone->mapflags[i], MAP_ZONE_MAPFLAG_LENGTH);
for(k = 0; k < len; k++) {
@@ -4465,7 +4463,7 @@ void map_zone_init(void) {
if( battle_config.pk_mode ) {
zone = &map->zone_pk;
for(i = 0; i < zone->mapflags_count; i++) {
- int len = strlen(zone->mapflags[i]);
+ size_t len = strlen(zone->mapflags[i]);
params[0] = '\0';
memcpy(flag, zone->mapflags[i], MAP_ZONE_MAPFLAG_LENGTH);
for(k = 0; k < len; k++) {
@@ -5116,6 +5114,7 @@ void do_final(void)
ircbot->final();/* before clif. */
clif->final();
npc->final();
+ quest->final();
script->final();
itemdb->final();
instance->final();
@@ -5140,7 +5139,7 @@ void do_final(void)
map->map_db->destroy(map->map_db, map->db_final);
- mapindex_final();
+ mapindex->final();
if(map->enable_grf)
grfio_final();
@@ -5366,18 +5365,17 @@ void map_hp_symbols(void) {
#ifdef PCRE_SUPPORT
HPM->share(npc_chat,"npc_chat");
#endif
- /* partial */
HPM->share(mapit,"mapit");
+ HPM->share(mapindex,"mapindex");
/* sql link */
HPM->share(map->mysql_handle,"sql_handle");
/* specific */
HPM->share(atcommand->create,"addCommand");
HPM->share(script->addScript,"addScript");
- /* vars */
- HPM->share(map->list,"map->list");
}
void map_load_defaults(void) {
+ mapindex_defaults();
map_defaults();
/* */
atcommand_defaults();
@@ -5553,9 +5551,9 @@ int do_init(int argc, char *argv[])
map->iwall_db = strdb_alloc(DB_OPT_RELEASE_DATA,2*NAME_LENGTH+2+1); // [Zephyrus] Invisible Walls
map->zone_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, MAP_ZONE_NAME_LENGTH);
- map->iterator_ers = ers_new(sizeof(struct s_mapiterator),"map.c::map_iterator_ers",ERS_OPT_NONE);
+ map->iterator_ers = ers_new(sizeof(struct s_mapiterator),"map.c::map_iterator_ers",ERS_OPT_CLEAN);
- map->flooritem_ers = ers_new(sizeof(struct flooritem_data),"map.c::map_flooritem_ers",ERS_OPT_NONE);
+ map->flooritem_ers = ers_new(sizeof(struct flooritem_data),"map.c::map_flooritem_ers",ERS_OPT_CLEAN);
ers_chunk_size(map->flooritem_ers, 100);
if (!minimal) {
@@ -5564,7 +5562,7 @@ int do_init(int argc, char *argv[])
logs->sql_init();
}
- i = mapindex_init();
+ i = mapindex->init();
if (minimal) {
// Pretend all maps from the mapindex are on this mapserver
diff --git a/src/map/map.h b/src/map/map.h
index 6580d7e50..906202f83 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -970,11 +970,11 @@ struct map_interface {
struct chat_data* (*id2cd) (int id);
struct block_list * (*id2bl) (int id);
bool (*blid_exists) (int id);
- int16 (*mapindex2mapid) (unsigned short mapindex);
+ int16 (*mapindex2mapid) (unsigned short map_index);
int16 (*mapname2mapid) (const char* name);
int (*mapname2ipport) (unsigned short name, uint32* ip, uint16* port);
- int (*setipport) (unsigned short mapindex, uint32 ip, uint16 port);
- int (*eraseipport) (unsigned short mapindex, uint32 ip, uint16 port);
+ int (*setipport) (unsigned short map_index, uint32 ip, uint16 port);
+ int (*eraseipport) (unsigned short map_index, uint32 ip, uint16 port);
int (*eraseallipport) (void);
void (*addiddb) (struct block_list *bl);
void (*deliddb) (struct block_list *bl);
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index c94e42d5d..6a13ef2a0 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -291,7 +291,7 @@ void mapreg_final(void) {
void mapreg_init(void) {
mapreg->db = idb_alloc(DB_OPT_BASE);
mapreg->str_db = idb_alloc(DB_OPT_BASE);
- mapreg->ers = ers_new(sizeof(struct mapreg_save), "mapreg_sql.c::mapreg_ers", ERS_OPT_NONE);
+ mapreg->ers = ers_new(sizeof(struct mapreg_save), "mapreg_sql.c::mapreg_ers", ERS_OPT_CLEAN);
mapreg->load();
diff --git a/src/map/mob.c b/src/map/mob.c
index 16c33b552..d919e7478 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -95,7 +95,11 @@ int mobdb_searchname(const char *str)
monster = mob->db(i);
if(monster == mob->dummy) //Skip dummy mobs.
continue;
- if(strcmpi(monster->name,str)==0 || strcmpi(monster->jname,str)==0 || strcmpi(monster->sprite,str)==0)
+ if(strcmpi(monster->name,str)==0 || strcmpi(monster->jname,str)==0)
+ return i;
+ if(battle_config.case_sensitive_aegisnames && strcmp(monster->sprite,str)==0)
+ return i;
+ if(!battle_config.case_sensitive_aegisnames && strcasecmp(monster->sprite,str)==0)
return i;
}
@@ -106,18 +110,20 @@ int mobdb_searchname_array_sub(struct mob_db* monster, const char *str, int flag
return 1;
if(!monster->base_exp && !monster->job_exp && monster->spawn[0].qty < 1)
return 1; // Monsters with no base/job exp and no spawn point are, by this criteria, considered "slave mobs" and excluded from search results
- if( !flag ){
+ if( !flag ) {
if(stristr(monster->jname,str))
return 0;
if(stristr(monster->name,str))
return 0;
- return strcmpi(monster->jname,str);
+ } else {
+ if(strcmpi(monster->jname,str) == 0)
+ return 0;
+ if(strcmpi(monster->name,str) == 0)
+ return 0;
}
- if(strcmp(monster->jname,str) == 0)
- return 0;
- if(strcmp(monster->name,str) == 0)
- return 0;
- return strcmp(monster->sprite,str);
+ if (battle_config.case_sensitive_aegisnames)
+ return strcmp(monster->sprite,str);
+ return strcasecmp(monster->sprite,str);
}
/*==========================================
@@ -596,7 +602,7 @@ int mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) {
guild->castledatasave(md->guardian_data->castle->castle_id, 1, 0);
}
} else {
- if (md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS && md->guardian_data->castle->guardian[md->guardian_data->number].visible)
+ if (md->guardian_data && md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS && md->guardian_data->castle->guardian[md->guardian_data->number].visible)
guild->castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
unit->free(&md->bl,CLR_OUTSIGHT); //Remove guardian.
}
@@ -872,14 +878,15 @@ int mob_setdelayspawn(struct mob_data *md)
}
int mob_count_sub(struct block_list *bl, va_list ap) {
- int mobid[10], i;
- ARR_FIND(0, 10, i, (mobid[i] = va_arg(ap, int)) == 0); //fetch till 0
- if (mobid[0]) { //if there one let's check it otherwise go backward
- TBL_MOB *md = BL_CAST(BL_MOB, bl);
- ARR_FIND(0, 10, i, md->class_ == mobid[i]);
- return (i < 10) ? 1 : 0;
- }
- return 1; //backward compatibility
+ int mobid[10] = { 0 }, i;
+ ARR_FIND(0, 10, i, (mobid[i] = va_arg(ap, int)) == 0); //fetch till 0
+ if (mobid[0]) { //if there one let's check it otherwise go backward
+ TBL_MOB *md = BL_CAST(BL_MOB, bl);
+ nullpo_ret(md);
+ ARR_FIND(0, 10, i, md->class_ == mobid[i]);
+ return (i < 10) ? 1 : 0;
+ }
+ return 1; //backward compatibility
}
/*==========================================
@@ -1761,7 +1768,6 @@ int mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
*------------------------------------------*/
struct item_drop* mob_setdropitem(int nameid, int qty, struct item_data *data) {
struct item_drop *drop = ers_alloc(item_drop_ers, struct item_drop);
- memset(&drop->item_data, 0, sizeof(struct item));
drop->item_data.nameid = nameid;
drop->item_data.amount = qty;
drop->item_data.identify = data ? itemdb->isidentified2(data) : itemdb->isidentified(nameid);
@@ -4098,7 +4104,7 @@ bool mob_parse_row_chatdb(char** str, const char* source, int line, int* last_ms
//MSG ID
ms->msg_id=msg_id;
//Color
- ms->color=strtoul(str[1],NULL,0);
+ ms->color=(unsigned int)strtoul(str[1],NULL,0);
//Message
msg = str[2];
len = strlen(msg);
@@ -4635,7 +4641,7 @@ int do_init_mob(bool minimal) {
memset(mob->db_data,0,sizeof(mob->db_data)); //Clear the array
mob->db_data[0] = (struct mob_db*)aCalloc(1, sizeof (struct mob_db)); //This mob is used for random spawns
mob->makedummymobdb(0); //The first time this is invoked, it creates the dummy mob
- item_drop_ers = ers_new(sizeof(struct item_drop),"mob.c::item_drop_ers",ERS_OPT_NONE);
+ item_drop_ers = ers_new(sizeof(struct item_drop),"mob.c::item_drop_ers",ERS_OPT_CLEAN);
item_drop_list_ers = ers_new(sizeof(struct item_drop_list),"mob.c::item_drop_list_ers",ERS_OPT_NONE);
mob->load(minimal);
diff --git a/src/map/mob.h b/src/map/mob.h
index 48a9f078e..9321cb4fd 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -91,7 +91,7 @@ struct mob_skill {
struct mob_chat {
unsigned short msg_id;
- unsigned long color;
+ unsigned int color;
char msg[CHAT_SIZE_MAX];
};
@@ -270,7 +270,7 @@ struct mob_interface {
int (*spawn_guardian_sub) (int tid, int64 tick, int id, intptr_t data);
int (*skill_id2skill_idx) (int class_, uint16 skill_id);
int (*db_searchname) (const char *str);
- int (*db_searchname_array_sub) (struct mob_db *mob, const char *str, int flag);
+ int (*db_searchname_array_sub) (struct mob_db *monster, const char *str, int flag);
// MvP Tomb System
void (*mvptomb_create) (struct mob_data *md, char *killer, time_t time);
void (*mvptomb_destroy) (struct mob_data *md);
diff --git a/src/map/npc.c b/src/map/npc.c
index 30cb94efe..84a2446ad 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -460,10 +460,10 @@ void npc_event_do_oninit(void)
*------------------------------------------*/
int npc_timerevent_export(struct npc_data *nd, int i)
{
- int t = 0, k = 0;
+ int t = 0, len = 0;
char *lname = nd->u.scr.label_list[i].name;
int pos = nd->u.scr.label_list[i].pos;
- if (sscanf(lname, "OnTimer%d%n", &t, &k) == 1 && lname[k] == '\0') {
+ if (sscanf(lname, "OnTimer%d%n", &t, &len) == 1 && lname[len] == '\0') {
// Timer event
struct npc_timerevent_list *te = nd->u.scr.timer_event;
int j, k = nd->u.scr.timeramount;
@@ -1616,7 +1616,7 @@ int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_li
/// @return result code for clif->parse_NpcSellListSend
int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) {
double z;
- int i,skill_t, idx = skill->get_index(MC_OVERCHARGE);
+ int i,skill_t, skill_idx = skill->get_index(MC_OVERCHARGE);
struct npc_data *nd;
nullpo_retr(1, sd);
@@ -1680,9 +1680,9 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
pc->getzeny(sd, (int)z, LOG_TYPE_NPC, NULL);
// custom merchant shop exp bonus
- if( battle_config.shop_exp > 0 && z > 0 && ( skill_t = pc->checkskill2(sd,idx) ) > 0) {
- if( sd->status.skill[idx].flag >= SKILL_FLAG_REPLACED_LV_0 )
- skill_t = sd->status.skill[idx].flag - SKILL_FLAG_REPLACED_LV_0;
+ if( battle_config.shop_exp > 0 && z > 0 && ( skill_t = pc->checkskill2(sd,skill_idx) ) > 0) {
+ if( sd->status.skill[skill_idx].flag >= SKILL_FLAG_REPLACED_LV_0 )
+ skill_t = sd->status.skill[skill_idx].flag - SKILL_FLAG_REPLACED_LV_0;
if( skill_t > 0 ) {
z = z * (double)skill_t * (double)battle_config.shop_exp/10000.;
@@ -2140,7 +2140,7 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
}
m = map->mapname2mapid(mapname);
- i = mapindex_name2id(to_mapname);
+ i = mapindex->name2id(to_mapname);
if( i == 0 )
{
ShowError("npc_parse_warp: Unknown destination map in file '%s', line '%d' : %s\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), to_mapname, w1, w2, w3, w4);
@@ -2218,7 +2218,7 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
return strchr(start,'\n');;//try next
}
- if( !strcasecmp(w2,"cashshop") )
+ if( strcmp(w2,"cashshop") == 0 )
type = CASHSHOP;
else
type = SHOP;
@@ -2311,7 +2311,7 @@ void npc_convertlabel_db(struct npc_label_list* label_list, const char *filepath
int lpos = script->labels[i].pos;
struct npc_label_list* label;
const char *p;
- int len;
+ size_t len;
// In case of labels not terminated with ':', for user defined function support
p = lname;
@@ -2859,7 +2859,6 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
}
if( sd->npc_id != 0 ) { // Enqueue the event trigger.
- int i;
ARR_FIND( 0, MAX_EVENTQUEUE, i, sd->eventqueue[i][0] == '\0' );
if( i < MAX_EVENTQUEUE ) {
safestrncpy(sd->eventqueue[i],eventname,50); //Event enqueued.
@@ -2971,7 +2970,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
memset(&mobspawn, 0, sizeof(struct spawn_data));
- mobspawn.state.boss = !strcmpi(w2,"boss_monster");
+ mobspawn.state.boss = (strcmp(w2,"boss_monster") == 0 ? 1 : 0);
// w1=<map name>,<x>,<y>,<xs>,<ys>
// w3=<mob name>{,<mob level>}
@@ -2983,7 +2982,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
ShowError("npc_parse_mob: Invalid mob definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
return strchr(start,'\n');// skip and continue
}
- if( mapindex_name2id(mapname) == 0 ) {
+ if( mapindex->name2id(mapname) == 0 ) {
ShowError("npc_parse_mob: Unknown map '%s' in file '%s', line '%d'.\n", mapname, filepath, strline(buffer,start-buffer));
return strchr(start,'\n');// skip and continue
}
@@ -3148,12 +3147,12 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
int savex, savey;
if (state == 0)
; //Map flag disabled.
- else if (!strcmpi(w4, "SavePoint")) {
+ else if (w4 && !strcmpi(w4, "SavePoint")) {
map->list[m].save.map = 0;
map->list[m].save.x = -1;
map->list[m].save.y = -1;
} else if (sscanf(w4, "%31[^,],%d,%d", savemap, &savex, &savey) == 3) {
- map->list[m].save.map = mapindex_name2id(savemap);
+ map->list[m].save.map = mapindex->name2id(savemap);
map->list[m].save.x = savex;
map->list[m].save.y = savey;
if (!map->list[m].save.map) {
@@ -3370,10 +3369,11 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
else if (!strcmpi(w3,"adjust_unit_duration")) {
int skill_id, k;
char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH];
- int len = strlen(w4);
+ size_t len = w4 ? strlen(w4) : 0;
modifier[0] = '\0';
- memcpy(skill_name, w4, MAP_ZONE_MAPFLAG_LENGTH);
+ if( w4 )
+ memcpy(skill_name, w4, MAP_ZONE_MAPFLAG_LENGTH);
for(k = 0; k < len; k++) {
if( skill_name[k] == '\t' ) {
@@ -3424,10 +3424,12 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
} else if (!strcmpi(w3,"adjust_skill_damage")) {
int skill_id, k;
char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH];
- int len = strlen(w4);
+ size_t len = w4 ? strlen(w4) : 0;
modifier[0] = '\0';
- memcpy(skill_name, w4, MAP_ZONE_MAPFLAG_LENGTH);
+
+ if( w4 )
+ memcpy(skill_name, w4, MAP_ZONE_MAPFLAG_LENGTH);
for(k = 0; k < len; k++) {
if( skill_name[k] == '\t' ) {
@@ -3551,7 +3553,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
lines++;
// w1<TAB>w2<TAB>w3<TAB>w4
- count = sv->parse(p, len+buffer-p, 0, '\t', pos, ARRAYLENGTH(pos), (e_svopt)(SV_TERMINATE_LF|SV_TERMINATE_CRLF));
+ count = sv->parse(p, (int)(len+buffer-p), 0, '\t', pos, ARRAYLENGTH(pos), (e_svopt)(SV_TERMINATE_LF|SV_TERMINATE_CRLF));
if( count < 0 )
{
ShowError("npc_parsesrcfile: Parse error in file '%s', line '%d'. Stopping...\n", filepath, strline(buffer,p-buffer));
@@ -3593,15 +3595,15 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
break;
}
- if( strcmp(w1,"-") !=0 && strcasecmp(w1,"function") != 0 )
+ if( strcmp(w1,"-") != 0 && strcmp(w1,"function") != 0 )
{// w1 = <map name>,<x>,<y>,<facing>
char mapname[MAP_NAME_LENGTH*2];
x = y = 0;
sscanf(w1,"%23[^,],%hd,%hd[^,]",mapname,&x,&y);
- if( !mapindex_name2id(mapname) )
+ if( !mapindex->name2id(mapname) )
{// Incorrect map, we must skip the script info...
ShowError("npc_parsesrcfile: Unknown map '%s' in file '%s', line '%d'. Skipping line...\n", mapname, filepath, strline(buffer,p-buffer));
- if( strcasecmp(w2,"script") == 0 && count > 3 )
+ if( strcmp(w2,"script") == 0 && count > 3 )
{
if((p = npc->skip_script(p,buffer,filepath)) == NULL)
{
@@ -3614,7 +3616,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
m = map->mapname2mapid(mapname);
if( m < 0 ) {
// "mapname" is not assigned to this server, we must skip the script info...
- if( strcasecmp(w2,"script") == 0 && count > 3 )
+ if( strcmp(w2,"script") == 0 && count > 3 )
{
if((p = npc->skip_script(p,buffer,filepath)) == NULL)
{
@@ -3626,7 +3628,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
}
if (x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys) {
ShowError("npc_parsesrcfile: Unknown coordinates ('%d', '%d') for map '%s' in file '%s', line '%d'. Skipping line...\n", x, y, mapname, filepath, strline(buffer,p-buffer));
- if( strcasecmp(w2,"script") == 0 && count > 3 )
+ if( strcmp(w2,"script") == 0 && count > 3 )
{
if((p = npc->skip_script(p,buffer,filepath)) == NULL)
{
@@ -3638,57 +3640,54 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
}
}
- if( strcasecmp(w2,"warp") == 0 && count > 3 )
+ if( strcmp(w2,"warp") == 0 && count > 3 )
{
-#ifdef ENABLE_CASE_CHECK
- if( strcmp(w2, "warp") != 0 ) DeprecationWarning("npc_parsesrcfile", w2, "warp", filepath, strline(buffer, p-buffer)); // TODO
-#endif // ENABLE_CASE_CHECK
p = npc->parse_warp(w1,w2,w3,w4, p, buffer, filepath);
}
- else if( (!strcasecmp(w2,"shop") || !strcasecmp(w2,"cashshop")) && count > 3 )
+ else if( (strcmp(w2,"shop") == 0 || strcmp(w2,"cashshop") == 0) && count > 3 )
{
-#ifdef ENABLE_CASE_CHECK
- if( strcasecmp(w2,"shop") == 0 && strcmp(w2, "shop") != 0 ) DeprecationWarning("npc_parsesrcfile", w2, "shop", filepath, strline(buffer, p-buffer)) // TODO
- else if( strcasecmp(w2,"cashshop") == 0 && strcmp(w2, "cashshop") != 0 ) DeprecationWarning("npc_parsesrcfile", w2, "cashshop", filepath, strline(buffer, p-buffer)); // TODO
-#endif // ENABLE_CASE_CHECK
p = npc->parse_shop(w1,w2,w3,w4, p, buffer, filepath);
}
- else if( strcasecmp(w2,"script") == 0 && count > 3 )
+ else if( strcmp(w2,"script") == 0 && count > 3 )
{
+ if( strcmp(w1,"function") == 0 ) {
+ p = npc->parse_function(w1, w2, w3, w4, p, buffer, filepath);
+ } else {
#ifdef ENABLE_CASE_CHECK
- if( strcmp(w2, "script") != 0 ) DeprecationWarning("npc_parsesrcfile", w2, "script", filepath, strline(buffer, p-buffer)); // TODO
- if( strcasecmp(w1, "function") == 0 && strcmp(w1, "function") != 0 ) DeprecationWarning("npc_parsesrcfile", w1, "function", filepath, strline(buffer, p-buffer)); // TODO
+ if( strcasecmp(w1, "function") == 0 ) DeprecationWarning("npc_parsesrcfile", w1, "function", filepath, strline(buffer, p-buffer)); // TODO
#endif // ENABLE_CASE_CHECK
- if( strcasecmp(w1,"function") == 0 )
- p = npc->parse_function(w1, w2, w3, w4, p, buffer, filepath);
- else
p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,runOnInit);
+ }
}
else if( (i=0, sscanf(w2,"duplicate%n",&i), (i > 0 && w2[i] == '(')) && count > 3 )
{
-#ifdef ENABLE_CASE_CHECK
- char temp[10]; safestrncpy(temp, w2, 10);
- if( strcmp(temp, "duplicate") != 0 ) DeprecationWarning("npc_parsesrcfile", temp, "duplicate", filepath, strline(buffer, p-buffer)); // TODO
-#endif // ENABLE_CASE_CHECK
p = npc->parse_duplicate(w1,w2,w3,w4, p, buffer, filepath);
}
- else if( (strcmpi(w2,"monster") == 0 || strcmpi(w2,"boss_monster") == 0) && count > 3 )
+ else if( (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0) && count > 3 )
{
-#ifdef ENABLE_CASE_CHECK
- if( strcasecmp(w2,"monster") == 0 && strcmp(w2, "monster") != 0 ) DeprecationWarning("npc_parsesrcfile", w2, "monster", filepath, strline(buffer, p-buffer)) // TODO:
- else if( strcasecmp(w2,"boss_monster") == 0 && strcmp(w2, "boss_monster") != 0 ) DeprecationWarning("npc_parsesrcfile", w2, "boss_monster", filepath, strline(buffer, p-buffer)); // TODO
-#endif // ENABLE_CASE_CHECK
p = npc->parse_mob(w1, w2, w3, w4, p, buffer, filepath);
}
- else if( strcmpi(w2,"mapflag") == 0 && count >= 3 )
+ else if( strcmp(w2,"mapflag") == 0 && count >= 3 )
{
-#ifdef ENABLE_CASE_CHECK
- if( strcmp(w2, "mapflag") != 0 ) DeprecationWarning("npc_parsesrcfile", w2, "mapflag", filepath, strline(buffer, p-buffer)); // TODO
-#endif // ENABLE_CASE_CHECK
p = npc->parse_mapflag(w1, w2, trim(w3), trim(w4), p, buffer, filepath);
}
else
{
+#ifdef ENABLE_CASE_CHECK
+ if( strcasecmp(w2, "warp") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "warp", filepath, strline(buffer, p-buffer)); } // TODO
+ else if( strcasecmp(w2,"shop") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "shop", filepath, strline(buffer, p-buffer)); } // TODO
+ else if( strcasecmp(w2,"cashshop") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "cashshop", filepath, strline(buffer, p-buffer)); } // TODO
+ else if( strcasecmp(w2, "script") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "script", filepath, strline(buffer, p-buffer)); } // TODO
+ else if( strncasecmp(w2, "duplicate", 9) == 0 ) {
+ char temp[10];
+ safestrncpy(temp, w2, 10);
+ DeprecationWarning("npc_parsesrcfile", temp, "duplicate", filepath, strline(buffer, p-buffer)); // TODO
+ }
+ else if( strcasecmp(w2,"monster") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "monster", filepath, strline(buffer, p-buffer)); } // TODO:
+ else if( strcasecmp(w2,"boss_monster") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "boss_monster", filepath, strline(buffer, p-buffer)); } // TODO
+ else if( strcasecmp(w2, "mapflag") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "mapflag", filepath, strline(buffer, p-buffer)); } // TODO
+ else
+#endif // ENABLE_CASE_CHECK
ShowError("npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,p-buffer), w1, w2, w3, w4);
p = strchr(p,'\n');// skip and continue
}
@@ -3752,14 +3751,15 @@ void npc_read_event_script(void)
break;
}
- if( (p=strchr(p,':')) && p && strcmpi(name,p)==0 )
+ if( (p=strchr(p,':')) && strcmp(name,p) == 0 )
{
-#ifdef ENABLE_CASE_CHECK
- if( strcmp(name, p) != 0 ) DeprecationWarning2("npc_read_event_script", p, name, config[i].event_name); // TODO
-#endif // ENABLE_CASE_CHECK
script_event[i].event[count] = ed;
script_event[i].event_name[count] = key.str;
script_event[i].event_count++;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p && strcasecmp(name, p) == 0 ) {
+ DeprecationWarning2("npc_read_event_script", p, name, config[i].event_name); // TODO
+#endif // ENABLE_CASE_CHECK
}
}
dbi_destroy(iter);
@@ -3905,7 +3905,7 @@ bool npc_unloadfile( const char* filepath ) {
bool found = false;
for( nd = dbi_first(iter); dbi_exists(iter); nd = dbi_next(iter) ) {
- if( nd->path && strcasecmp(nd->path,filepath) == 0 ) {
+ if( nd->path && strcasecmp(nd->path,filepath) == 0 ) { // FIXME: This can break in case-sensitive file systems
found = true;
npc->unload_duplicates(nd);/* unload any npcs which could duplicate this but be in a different file */
npc->unload(nd, true);
@@ -3997,8 +3997,8 @@ int do_init_npc(bool minimal) {
for( i = MAX_NPC_CLASS2_START; i < MAX_NPC_CLASS2_END; i++ )
npc_viewdb2[i - MAX_NPC_CLASS2_START].class_ = i;
- npc->ev_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH);
- npc->ev_label_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH);
+ npc->ev_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH);
+ npc->ev_label_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH);
npc->name_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH);
npc->path_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, 0);
diff --git a/src/map/party.c b/src/map/party.c
index 8e3ac3dcf..7af6acff5 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -333,7 +333,7 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
}
// confirm whether the account has the ability to invite before checking the player
- if( !pc->has_permission(sd, PC_PERM_PARTY) || (tsd && !pc->has_permission(tsd, PC_PERM_PARTY)) ) {
+ if( !pc_has_permission(sd, PC_PERM_PARTY) || (tsd && !pc_has_permission(tsd, PC_PERM_PARTY)) ) {
clif->message(sd->fd, msg_txt(81)); // "Your GM level doesn't authorize you to preform this action on the specified player."
return 0;
}
@@ -553,7 +553,7 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
sd->status.party_id = 0;
clif->charnameupdate(sd); //Update name display [Skotlex]
//TODO: hp bars should be cleared too
- if( p->instances )
+ if( p && p->instances )
instance->check_kick(sd);
}
if (sd && sd->sc.data[SC_DANCING]) {
diff --git a/src/map/party.h b/src/map/party.h
index 91f4c1b7d..0041b1462 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -44,9 +44,9 @@ struct party_booking_detail {
};
struct party_booking_ad_info {
- unsigned long index;
+ unsigned int index;
char charname[NAME_LENGTH];
- long expiretime;
+ int expiretime;
struct party_booking_detail p_detail;
};
#else /* PARTY_RECRUIT */
@@ -56,8 +56,8 @@ struct party_booking_detail {
};
struct party_booking_ad_info {
- unsigned long index;
- long expiretime;
+ unsigned int index;
+ int expiretime;
char charname[NAME_LENGTH];
struct party_booking_detail p_detail;
};
@@ -71,7 +71,7 @@ struct party_booking_ad_info {
struct party_interface {
DBMap* db; // int party_id -> struct party_data* (releases data)
DBMap* booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
- unsigned long booking_nextid;
+ unsigned int booking_nextid;
/* funcs */
void (*init) (bool minimal);
void (*final) (void);
diff --git a/src/map/path.c b/src/map/path.c
index a47677cf5..21d14c815 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -184,8 +184,10 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16
/// Ensures there is enough space in array to store new element.
static void heap_push_node(struct node_heap *heap, struct path_node *node)
{
+#ifndef __clang_analyzer__ // TODO: Figure out why clang's static analyzer doesn't like this
BHEAP_ENSURE(*heap, 1, 256);
BHEAP_PUSH(*heap, node, NODE_MINTOPCMP, swap_ptr);
+#endif // __clang_analyzer__
}
/// Updates path_node in the binary node_heap.
diff --git a/src/map/pc.c b/src/map/pc.c
index feca11758..fc1d56b6d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -77,15 +77,6 @@ struct map_session_data* pc_get_dummy_sd(void)
}
/**
- * Gets player's group level.
- * @see pc_group_get_level()
- */
-int pc_get_group_level(struct map_session_data *sd)
-{
- return pcg->get_level(sd->group);
-}
-
-/**
* Sets player's group.
* Caller should handle error (preferably display message and disconnect).
* @param group_id Group ID
@@ -102,14 +93,6 @@ int pc_set_group(struct map_session_data *sd, int group_id)
}
/**
- * Checks if player has permission to perform action.
- */
-bool pc_has_permission(struct map_session_data *sd, unsigned int permission)
-{
- return ((sd->extra_temp_permissions&permission) != 0 || pcg->has_permission(sd->group, permission));
-}
-
-/**
* Checks if commands used by player should be logged.
*/
bool pc_should_log_commands(struct map_session_data *sd)
@@ -560,22 +543,6 @@ void pc_inventory_rental_add(struct map_session_data *sd, int seconds)
sd->rental_timer = timer->add(timer->gettick() + min(tick,3600000), pc->inventory_rental_end, sd->bl.id, 0);
}
-/**
- * Determines if player can give / drop / trade / vend items
- */
-bool pc_can_give_items(struct map_session_data *sd)
-{
- return pc->has_permission(sd, PC_PERM_TRADE);
-}
-
-/**
- * Determines if player can give / drop / trade / vend bounded items
- */
-bool pc_can_give_bound_items(struct map_session_data *sd)
-{
- return pc->has_permission(sd, PC_PERM_TRADE_BOUND);
-}
-
/*==========================================
* prepares character for saving.
*------------------------------------------*/
@@ -929,7 +896,7 @@ int pc_isequip(struct map_session_data *sd,int n)
item = sd->inventory_data[n];
- if(pc->has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT))
+ if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT))
return 1;
if(item == NULL)
@@ -1136,12 +1103,17 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
for( i = 0; i < 3; i++ )
sd->hate_mob[i] = -1;
- //warp player
+ sd->quest_log = NULL;
+ sd->num_quests = 0;
+ sd->avail_quests = 0;
+ sd->save_quest = false;
+
+ //warp player
if ((i=pc->setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, CLR_OUTSIGHT)) != 0) {
ShowError ("Last_point_map %s - id %d not found (error code %d)\n", mapindex_id2name(sd->status.last_point.map), sd->status.last_point.map, i);
// try warping to a default map instead (church graveyard)
- if (pc->setpos(sd, mapindex_name2id(MAP_PRONTERA), 273, 354, CLR_OUTSIGHT) != 0) {
+ if (pc->setpos(sd, mapindex->name2id(MAP_PRONTERA), 273, 354, CLR_OUTSIGHT) != 0) {
// if we fail again
clif->authfail_fd(sd->fd, 0);
return false;
@@ -1446,7 +1418,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
}
- if( pc->has_permission(sd, PC_PERM_ALL_SKILL) ) {
+ if( pc_has_permission(sd, PC_PERM_ALL_SKILL) ) {
for( i = 0; i < MAX_SKILL; i++ ) {
switch(skill->db[i].nameid) {
/**
@@ -1642,7 +1614,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
int skill_point, novice_skills;
int c = sd->class_;
- if (!battle_config.skillup_limit || pc->has_permission(sd, PC_PERM_ALL_SKILL))
+ if (!battle_config.skillup_limit || pc_has_permission(sd, PC_PERM_ALL_SKILL))
return c;
skill_point = pc->calc_skillpoint(sd);
@@ -1785,9 +1757,8 @@ int pc_disguise(struct map_session_data *sd, int class_) {
}
if (sd->chatID) {
struct chat_data* cd;
- nullpo_retr(1, sd);
- cd = (struct chat_data*)map->id2bl(sd->chatID);
- if( cd != NULL || (struct block_list*)sd == cd->owner )
+
+ if( (cd = (struct chat_data*)map->id2bl(sd->chatID)) )
clif->dispchat(cd,0);
}
}
@@ -2002,8 +1973,8 @@ int pc_delautobonus(struct map_session_data* sd, struct s_autobonus *autobonus,c
if( autobonus[i].bonus_script )
{
int j;
- ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
- if( j < EQI_MAX-1 )
+ ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos );
+ if( j < EQI_MAX )
script->run_autobonus(autobonus[i].bonus_script,sd->bl.id,sd->equip_index[j]);
}
continue;
@@ -2033,8 +2004,8 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus)
if( autobonus->other_script )
{
int j;
- ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
- if( j < EQI_MAX-1 )
+ ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos );
+ if( j < EQI_MAX )
script->run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]);
}
@@ -4206,12 +4177,17 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( !item->script ) //if it has no script, you can't really consume it!
return 0;
- if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc->get_group_level(sd) < item->item_usage.override) ) {
+ if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) {
clif->msgtable(sd->fd,0x297);
//clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474));
return 0; // You cannot use this item while sitting.
}
+ if (sd->state.storage_flag && item->type != IT_CASH) {
+ clif->colormes(sd->fd, COLOR_RED, msg_txt(1475));
+ return 0; // You cannot use this item while storage is open.
+ }
+
switch( nameid ) { // TODO: Is there no better way to handle this, other than hardcoding item IDs?
case ITEMID_ANODYNE:
if( map_flag_gvg2(sd->bl.m) )
@@ -4305,10 +4281,15 @@ int pc_isUseitem(struct map_session_data *sd,int n)
else if( itemdb_is_poison(nameid) && (sd->class_&MAPID_THIRDMASK) != MAPID_GUILLOTINE_CROSS )
return 0;
- if( (item->package || item->group) && pc_is90overweight(sd) ) {
- //##TODO## find official response to this
- clif->colormes(sd->fd,COLOR_RED,msg_txt(1477));// Item cannot be open when overweight by 90%
- return 0;
+ if( item->package || item->group ) {
+ if( pc_is90overweight(sd) ) {
+ clif->msgtable(sd->fd,ITEM_CANT_OBTAIN_WEIGHT);
+ return 0;
+ }
+ if( !pc->inventoryblank(sd) ) {
+ clif->colormes(sd->fd,COLOR_RED,msg_txt(1477));
+ return 0;
+ }
}
//Gender check
@@ -4428,7 +4409,6 @@ int pc_useitem(struct map_session_data *sd,int n) {
return 0;
if( sd->inventory_data[n]->delay > 0 ) {
- int i;
ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == nameid );
if( i == MAX_ITEMDELAYS ) /* item not found. try first empty now */
ARR_FIND(0, MAX_ITEMDELAYS, i, !sd->item_delay[i].nameid );
@@ -4531,7 +4511,7 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
return 1;
}
- if( !itemdb_cancartstore(item_data, pc->get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd)))
+ if( !itemdb_cancartstore(item_data, pc_get_group_level(sd)) || (item_data->bound > IBT_ACCOUNT && !pc_can_give_bound_items(sd)))
{ // Check item trade restrictions [Skotlex]
clif->message (sd->fd, msg_txt(264));
return 1;/* TODO: there is no official response to this? */
@@ -4814,14 +4794,16 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
return 1;
}
-/*==========================================
- * Stole zeny from bl (mob)
- * return
- * 0 = fail
- * 1 = success
- *------------------------------------------*/
-int pc_steal_coin(struct map_session_data *sd,struct block_list *target) {
- int rate,skill_lv;
+/**
+ * Steals zeny from a monster through the RG_STEALCOIN skill.
+ *
+ * @param sd Source character
+ * @param target Target monster
+ *
+ * @return Amount of stolen zeny (0 in case of failure)
+ **/
+int pc_steal_coin(struct map_session_data *sd, struct block_list *target) {
+ int rate, skill_lv;
struct mob_data *md;
if(!sd || !target || target->type != BL_MOB)
return 0;
@@ -4833,15 +4815,14 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target) {
if( mob_is_treasure(md) )
return 0;
- // FIXME: This formula is either custom or outdated.
- skill_lv = pc->checkskill(sd,RG_STEALCOIN)*10;
- rate = skill_lv + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2;
+ skill_lv = pc->checkskill(sd, RG_STEALCOIN);
+ rate = skill_lv*10 + (sd->status.base_level - md->level)*2 + sd->battle_status.dex/2 + sd->battle_status.luk/2;
if(rnd()%1000 < rate) {
- int amount = md->level*10 + rnd()%100;
+ int amount = md->level * skill_lv / 10 + md->level*8 + rnd()%(md->level*2 + 1); // mob_lv * skill_lv / 10 + random [mob_lv*8; mob_lv*10]
pc->getzeny(sd, amount, LOG_TYPE_STEAL, NULL);
md->state.steal_coin_flag = 1;
- return 1;
+ return amount;
}
return 0;
}
@@ -4853,13 +4834,13 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target) {
* 1 - Invalid map index.
* 2 - Map not in this map-server, and failed to locate alternate map-server.
*------------------------------------------*/
-int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype) {
+int pc_setpos(struct map_session_data* sd, unsigned short map_index, int x, int y, clr_type clrtype) {
int16 m;
nullpo_ret(sd);
- if( !mapindex || !mapindex_id2name(mapindex) || ( m = map->mapindex2mapid(mapindex) ) == -1 ) {
- ShowDebug("pc_setpos: Passed mapindex(%d) is invalid!\n", mapindex);
+ if( !map_index || !mapindex_id2name(map_index) || ( m = map->mapindex2mapid(map_index) ) == -1 ) {
+ ShowDebug("pc_setpos: Passed mapindex(%d) is invalid!\n", map_index);
return 1;
}
@@ -4883,7 +4864,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
if( i != sd->instances ) {
m = instance->list[sd->instance[i]].map[j];
- mapindex = map_id2index(m);
+ map_index = map_id2index(m);
stop = true;
}
}
@@ -4897,7 +4878,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
if( i != p->instances ) {
m = instance->list[p->instance[i]].map[j];
- mapindex = map_id2index(m);
+ map_index = map_id2index(m);
stop = true;
}
}
@@ -4911,21 +4892,22 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
if( i != sd->guild->instances ) {
m = instance->list[sd->guild->instance[i]].map[j];
- mapindex = map_id2index(m);
- stop = true;
+ map_index = map_id2index(m);
+ //stop = true; Uncomment if adding new checks
}
}
+
/* we hit a instance, if empty we populate the spawn data */
if( map->list[m].instance_id >= 0 && instance->list[map->list[m].instance_id].respawn.map == 0 &&
instance->list[map->list[m].instance_id].respawn.x == 0 &&
instance->list[map->list[m].instance_id].respawn.y == 0) {
- instance->list[map->list[m].instance_id].respawn.map = mapindex;
+ instance->list[map->list[m].instance_id].respawn.map = map_index;
instance->list[map->list[m].instance_id].respawn.x = x;
instance->list[map->list[m].instance_id].respawn.y = y;
}
}
- sd->state.changemap = (sd->mapindex != mapindex);
+ sd->state.changemap = (sd->mapindex != map_index);
sd->state.warping = 1;
sd->state.workinprogress = 0;
if( sd->state.changemap ) { // Misc map-changing settings
@@ -4988,7 +4970,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
uint32 ip;
uint16 port;
//if can't find any map-servers, just abort setting position.
- if(!sd->mapindex || map->mapname2ipport(mapindex,&ip,&port))
+ if(!sd->mapindex || map->mapname2ipport(map_index,&ip,&port))
return 2;
if (sd->npc_id)
@@ -4996,7 +4978,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
npc->script_event(sd, NPCE_LOGOUT);
//remove from map, THEN change x/y coordinates
unit->remove_map_pc(sd,clrtype);
- sd->mapindex = mapindex;
+ sd->mapindex = map_index;
sd->bl.x=x;
sd->bl.y=y;
pc->clean_skilltree(sd);
@@ -5010,7 +4992,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
if( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) {
- ShowError("pc_setpos: attempt to place player %s (%d:%d) on invalid coordinates (%s-%d,%d)\n", sd->status.name, sd->status.account_id, sd->status.char_id, mapindex_id2name(mapindex),x,y);
+ ShowError("pc_setpos: attempt to place player %s (%d:%d) on invalid coordinates (%s-%d,%d)\n", sd->status.name, sd->status.account_id, sd->status.char_id, mapindex_id2name(map_index),x,y);
x = y = 0; // make it random
}
@@ -5033,7 +5015,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
//Tag player for rewarping after map-loading is done. [Skotlex]
sd->state.rewarp = 1;
- sd->mapindex = mapindex;
+ sd->mapindex = map_index;
sd->bl.m = m;
sd->bl.x = sd->ud.to_x = x;
sd->bl.y = sd->ud.to_y = y;
@@ -5111,7 +5093,7 @@ int pc_memo(struct map_session_data* sd, int pos) {
nullpo_ret(sd);
// check mapflags
- if( sd->bl.m >= 0 && (map->list[sd->bl.m].flag.nomemo || map->list[sd->bl.m].flag.nowarpto) && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE) ) {
+ if( sd->bl.m >= 0 && (map->list[sd->bl.m].flag.nomemo || map->list[sd->bl.m].flag.nowarpto) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) {
clif->skill_mapinfomessage(sd, 1); // "Saved point cannot be memorized."
return 0;
}
@@ -6308,7 +6290,7 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) {
clif->updatestatus(sd,SP_SKILLPOINT);
if( skill_id == GN_REMODELING_CART ) /* cart weight info was updated by status_calc_pc */
clif->updatestatus(sd,SP_CARTINFO);
- if (!pc->has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown
+ if (!pc_has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown
clif->skillinfoblock(sd);
} else if( battle_config.skillup_limit ){
if( sd->sktree.second )
@@ -6341,7 +6323,7 @@ int pc_allskillup(struct map_session_data *sd)
}
}
- if (pc->has_permission(sd, PC_PERM_ALL_SKILL)) { //Get ALL skills except npc/guild ones. [Skotlex]
+ if (pc_has_permission(sd, PC_PERM_ALL_SKILL)) { //Get ALL skills except npc/guild ones. [Skotlex]
//and except SG_DEVIL [Komurka] and MO_TRIPLEATTACK and RG_SNATCHER [ultramage]
for(i=0;i<MAX_SKILL;i++){
switch( skill->db[i].nameid ) {
@@ -6779,15 +6761,15 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h
* Invoked when a player has negative current hp
*------------------------------------------*/
int pc_dead(struct map_session_data *sd,struct block_list *src) {
- int i=0,j=0,k=0;
+ int i=0,j=0;
int64 tick = timer->gettick();
- for(k = 0; k < 5; k++)
- if (sd->devotion[k]){
- struct map_session_data *devsd = map->id2sd(sd->devotion[k]);
+ for(j = 0; j < 5; j++)
+ if (sd->devotion[j]){
+ struct map_session_data *devsd = map->id2sd(sd->devotion[j]);
if (devsd)
status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER);
- sd->devotion[k] = 0;
+ sd->devotion[j] = 0;
}
if(sd->status.pet_id > 0 && sd->pd) {
@@ -7047,14 +7029,13 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
if(id == 0)
continue;
if(id == -1){
- int eq_num=0,eq_n[MAX_INVENTORY];
+ int eq_num=0,eq_n[MAX_INVENTORY],k;
memset(eq_n,0,sizeof(eq_n));
for(i=0;i<MAX_INVENTORY;i++){
if( (type == 1 && !sd->status.inventory[i].equip)
|| (type == 2 && sd->status.inventory[i].equip)
|| type == 3)
{
- int k;
ARR_FIND( 0, MAX_INVENTORY, k, eq_n[k] <= 0 );
if( k < MAX_INVENTORY )
eq_n[k] = i;
@@ -8057,11 +8038,11 @@ int pc_setmadogear(TBL_PC* sd, int flag)
*------------------------------------------*/
int pc_candrop(struct map_session_data *sd, struct item *item)
{
- if( item && (item->expire_time || (item->bound && !pc->can_give_bound_items(sd))) )
+ if( item && (item->expire_time || (item->bound && !pc_can_give_bound_items(sd))) )
return 0;
- if( !pc->can_give_items(sd) ) //check if this GM level can drop items
+ if( !pc_can_give_items(sd) ) //check if this GM level can drop items
return 0;
- return (itemdb_isdropable(item, pc->get_group_level(sd)));
+ return (itemdb_isdropable(item, pc_get_group_level(sd)));
}
/*==========================================
@@ -9372,11 +9353,10 @@ void pc_regen (struct map_session_data *sd, unsigned int diff_tick) {
/*==========================================
* Memo player sd savepoint. (map,x,y)
*------------------------------------------*/
-int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
-{
+int pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int y) {
nullpo_ret(sd);
- sd->status.save_point.map = mapindex;
+ sd->status.save_point.map = map_index;
sd->status.save_point.x = x;
sd->status.save_point.y = y;
@@ -10197,7 +10177,7 @@ int pc_readdb(void) {
int stat;
if(line[0]=='/' && line[1]=='/')
continue;
- if ((stat=strtoul(line,NULL,10))<0)
+ if ((stat=(int)strtol(line,NULL,10))<0)
stat=0;
if (i > MAX_LEVEL)
break;
@@ -10464,12 +10444,8 @@ void pc_defaults(void) {
pc->get_dummy_sd = pc_get_dummy_sd;
pc->class2idx = pc_class2idx;
- pc->get_group_level = pc_get_group_level;
- pc->can_give_items = pc_can_give_items;
- pc->can_give_bound_items = pc_can_give_bound_items;
pc->can_use_command = pc_can_use_command;
- pc->has_permission = pc_has_permission;
pc->set_group = pc_set_group;
pc->should_log_commands = pc_should_log_commands;
diff --git a/src/map/pc.h b/src/map/pc.h
index 2c802a896..5264fa557 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -438,12 +438,11 @@ struct map_session_data {
bool changed; // if true, should sync with charserver on next mailbox request
} mail;
- //Quest log system [Kevin] [Inkfish]
- int num_quests;
- int avail_quests;
- int quest_index[MAX_QUEST_DB];
- struct quest quest_log[MAX_QUEST_DB];
- bool save_quest;
+ // Quest log system
+ int num_quests; ///< Number of entries in quest_log
+ int avail_quests; ///< Number of Q_ACTIVE and Q_INACTIVE entries in quest log (index of the first Q_COMPLETE entry)
+ struct quest *quest_log; ///< Quest log entries (note: Q_COMPLETE quests follow the first <avail_quests>th enties
+ bool save_quest; ///< Whether the quest_log entries were modified and are waitin to be saved
// temporary debug [flaviojs]
const char* debug_file;
@@ -685,6 +684,12 @@ enum equip_pos {
#define pc_readaccountreg2str(sd,reg) (pc->readregistry_str((sd),(reg),1))
#define pc_setaccountreg2str(sd,reg,val) (pc->setregistry_str((sd),(reg),(val),1))
+/* pc_groups easy access */
+#define pc_get_group_level(sd) ( (sd)->group->level )
+#define pc_has_permission(sd,permission) ( ((sd)->extra_temp_permissions&(permission)) != 0 || ((sd)->group->e_permissions&(permission)) != 0 )
+#define pc_can_give_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE) )
+#define pc_can_give_bound_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE_BOUND) )
+
struct skill_tree_entry {
short id;
unsigned short idx;
@@ -755,13 +760,11 @@ struct pc_interface {
struct map_session_data* (*get_dummy_sd) (void);
int (*class2idx) (int class_);
- int (*get_group_level) (struct map_session_data *sd);
//int (*getrefinebonus) (int lv,int type); FIXME: This function does not exist, nor it is ever called
bool (*can_give_items) (struct map_session_data *sd);
bool (*can_give_bound_items) (struct map_session_data *sd);
bool (*can_use_command) (struct map_session_data *sd, const char *command);
- bool (*has_permission) (struct map_session_data *sd, unsigned int permission);
int (*set_group) (struct map_session_data *sd, int group_id);
bool (*should_log_commands) (struct map_session_data *sd);
@@ -786,8 +789,8 @@ struct pc_interface {
int (*calc_skilltree_normalize_job) (struct map_session_data *sd);
int (*clean_skilltree) (struct map_session_data *sd);
- int (*setpos) (struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype);
- int (*setsavepoint) (struct map_session_data *sd, short mapindex,int x,int y);
+ int (*setpos) (struct map_session_data* sd, unsigned short map_index, int x, int y, clr_type clrtype);
+ int (*setsavepoint) (struct map_session_data *sd, short map_index, int x, int y);
int (*randomwarp) (struct map_session_data *sd,clr_type type);
int (*memo) (struct map_session_data* sd, int pos);
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index f95878e97..59dd951c7 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -131,7 +131,7 @@ static void read_config(void) {
iter = db_iterator(pcg->db);
for (group_settings = dbi_first(iter); dbi_exists(iter); group_settings = dbi_next(iter)) {
config_setting_t *commands = group_settings->commands, *permissions = group_settings->permissions;
- int count = 0, i;
+ int count = 0;
// Make sure there is "commands" group
if (commands == NULL)
@@ -209,15 +209,15 @@ static void read_config(void) {
// Copy settings (commands/permissions) that are not defined yet
if (inherited_group->commands != NULL) {
- int i = 0, commands_count = config_setting_length(inherited_group->commands);
- for (i = 0; i < commands_count; ++i)
- config_setting_copy(commands, config_setting_get_elem(inherited_group->commands, i));
+ int k = 0, commands_count = config_setting_length(inherited_group->commands);
+ for (k = 0; k < commands_count; ++k)
+ config_setting_copy(commands, config_setting_get_elem(inherited_group->commands, k));
}
if (inherited_group->permissions != NULL) {
- int i = 0, permissions_count = config_setting_length(inherited_group->permissions);
- for (i = 0; i < permissions_count; ++i)
- config_setting_copy(permissions, config_setting_get_elem(inherited_group->permissions, i));
+ int k = 0, permissions_count = config_setting_length(inherited_group->permissions);
+ for (k = 0; k < permissions_count; ++k)
+ config_setting_copy(permissions, config_setting_get_elem(inherited_group->permissions, k));
}
++done; // copied commands and permissions from one of inherited groups
@@ -241,7 +241,7 @@ static void read_config(void) {
iter = db_iterator(pcg->db);
for (group_settings = dbi_first(iter); dbi_exists(iter); group_settings = dbi_next(iter)) {
config_setting_t *permissions = group_settings->permissions;
- int i, count = config_setting_length(permissions);
+ int count = config_setting_length(permissions);
for (i = 0; i < count; ++i) {
config_setting_t *perm = config_setting_get_elem(permissions, i);
@@ -261,20 +261,20 @@ static void read_config(void) {
// Fetch all groups and relevant config setting and send them
// to atcommand->load_group() for processing.
if (group_count > 0) {
- int i = 0;
- GroupSettings **groups = NULL;
+ GroupSettings **pc_groups = NULL;
config_setting_t **commands = NULL;
- CREATE(groups, GroupSettings*, group_count);
+ CREATE(pc_groups, GroupSettings*, group_count);
CREATE(commands, config_setting_t*, group_count);
+ i = 0;
iter = db_iterator(pcg->db);
for (group_settings = dbi_first(iter); dbi_exists(iter); group_settings = dbi_next(iter)) {
- groups[i] = group_settings;
+ pc_groups[i] = group_settings;
commands[i] = group_settings->commands;
i++;
}
- atcommand->load_groups(groups, commands, group_count);
+ atcommand->load_groups(pc_groups, commands, group_count);
dbi_destroy(iter);
- aFree(groups);
+ aFree(pc_groups);
aFree(commands);
}
}
diff --git a/src/map/pet.c b/src/map/pet.c
index a2695d3b0..c04d9267a 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -364,15 +364,20 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
pd->last_thinktime = timer->gettick();
pd->state.skillbonus = 0;
+
if( battle_config.pet_status_support )
script->run(pet->db[i].pet_script,0,sd->bl.id,0);
- if( pd->petDB && pd->petDB->equip_script )
- status_calc_pc(sd,SCO_NONE);
+
+ if( pd->petDB ) {
+ if( pd->petDB->equip_script )
+ status_calc_pc(sd,SCO_NONE);
- if( battle_config.pet_hungry_delay_rate != 100 )
- interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100;
- else
- interval = pd->petDB->hungry_delay;
+ if( battle_config.pet_hungry_delay_rate != 100 )
+ interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100;
+ else
+ interval = pd->petDB->hungry_delay;
+ }
+
if( interval <= 0 )
interval = 1;
pd->pet_hungry_timer = timer->add(timer->gettick() + interval, pet->hungry, sd->bl.id, 0);
@@ -867,7 +872,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
}
}
- if(!target && pd->loot && pd->msd && pc->has_permission(pd->msd, PC_PERM_TRADE) && pd->loot->count < pd->loot->max && DIFF_TICK(tick,pd->ud.canact_tick)>0) {
+ if(!target && pd->loot && pd->msd && pc_has_permission(pd->msd, PC_PERM_TRADE) && pd->loot->count < pd->loot->max && DIFF_TICK(tick,pd->ud.canact_tick)>0) {
//Use half the pet's range of sight.
map->foreachinrange(pet->ai_sub_hard_lootsearch,&pd->bl,
pd->db->range2/2, BL_ITEM,pd,&target);
diff --git a/src/map/quest.c b/src/map/quest.c
index 0719b8dbb..bde276f9d 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -35,20 +35,25 @@
struct quest_interface quest_s;
-int quest_search_db(int quest_id)
-{
- int i;
-
- ARR_FIND(0, MAX_QUEST_DB,i,quest_id == quest->db[i].id);
- if( i == MAX_QUEST_DB )
- return -1;
-
- return i;
+/**
+ * Searches a quest by ID.
+ *
+ * @param quest_id ID to lookup
+ * @return Quest entry (equals to &quest->dummy if the ID is invalid)
+ */
+struct quest_db *quest_db(int quest_id) {
+ if (quest_id < 0 || quest_id > MAX_QUEST_DB || quest->db_data[quest_id] == NULL)
+ return &quest->dummy;
+ return quest->db_data[quest_id];
}
-//Send quest info on login
-int quest_pc_login(TBL_PC * sd)
-{
+/**
+ * Sends quest info to the player on login.
+ *
+ * @param sd Player's data
+ * @return 0 in case of success, nonzero otherwise (i.e. the player has no quests)
+ */
+int quest_pc_login(TBL_PC *sd) {
int i;
if(sd->avail_quests == 0)
@@ -57,100 +62,109 @@ int quest_pc_login(TBL_PC * sd)
clif->quest_send_list(sd);
clif->quest_send_mission(sd);
for( i = 0; i < sd->avail_quests; i++ ) {
- clif->quest_update_objective(sd, &sd->quest_log[i], sd->quest_index[i]);
+ // TODO[Haru]: is this necessary? Does quest_send_mission not take care of this?
+ clif->quest_update_objective(sd, &sd->quest_log[i]);
}
return 0;
}
-int quest_add(TBL_PC * sd, int quest_id)
-{
-
- int i, j;
-
- if( sd->num_quests >= MAX_QUEST_DB )
- {
- ShowError("quest_add: Character %d has got all the quests.(max quests: %d)\n", sd->status.char_id, MAX_QUEST_DB);
- return 1;
+/**
+ * Adds a quest to the player's list.
+ *
+ * New quest will be added as Q_ACTIVE.
+ *
+ * @param sd Player's data
+ * @param quest_id ID of the quest to add.
+ * @return 0 in case of success, nonzero otherwise
+ */
+int quest_add(TBL_PC *sd, int quest_id) {
+ int n;
+ struct quest_db *qi = quest->db(quest_id);
+
+ if( qi == &quest->dummy ) {
+ ShowError("quest_add: quest %d not found in DB.\n", quest_id);
+ return -1;
}
- if( quest->check(sd, quest_id, HAVEQUEST) >= 0 )
- {
+ if( quest->check(sd, quest_id, HAVEQUEST) >= 0 ) {
ShowError("quest_add: Character %d already has quest %d.\n", sd->status.char_id, quest_id);
return -1;
}
- if( (j = quest->search_db(quest_id)) < 0 )
- {
- ShowError("quest_add: quest %d not found in DB.\n", quest_id);
- return -1;
+ n = sd->avail_quests; // Insertion point
+
+ sd->num_quests++;
+ sd->avail_quests++;
+ RECREATE(sd->quest_log, struct quest, sd->num_quests);
+
+ if( sd->avail_quests != sd->num_quests ) {
+ // The character has some completed quests, make room before them so that they will stay at the end of the array
+ memmove(&sd->quest_log[n+1], &sd->quest_log[n], sizeof(struct quest)*(sd->num_quests-sd->avail_quests));
}
- i = sd->avail_quests;
- memmove(&sd->quest_log[i+1], &sd->quest_log[i], sizeof(struct quest)*(sd->num_quests-sd->avail_quests));
- memmove(sd->quest_index+i+1, sd->quest_index+i, sizeof(int)*(sd->num_quests-sd->avail_quests));
+ memset(&sd->quest_log[n], 0, sizeof(struct quest));
- memset(&sd->quest_log[i], 0, sizeof(struct quest));
- sd->quest_log[i].quest_id = quest->db[j].id;
- if( quest->db[j].time )
- sd->quest_log[i].time = (unsigned int)(time(NULL) + quest->db[j].time);
- sd->quest_log[i].state = Q_ACTIVE;
+ sd->quest_log[n].quest_id = qi->id;
+ if( qi->time )
+ sd->quest_log[n].time = (unsigned int)(time(NULL) + qi->time);
+ sd->quest_log[n].state = Q_ACTIVE;
- sd->quest_index[i] = j;
- sd->num_quests++;
- sd->avail_quests++;
sd->save_quest = true;
- clif->quest_add(sd, &sd->quest_log[i], sd->quest_index[i]);
- clif->quest_update_objective(sd, &sd->quest_log[i], sd->quest_index[i]);
+ clif->quest_add(sd, &sd->quest_log[n]);
+ clif->quest_update_objective(sd, &sd->quest_log[n]);
+
if( map->save_settings&64 )
chrif->save(sd,0);
return 0;
}
-int quest_change(TBL_PC * sd, int qid1, int qid2)
-{
-
- int i, j;
+/**
+ * Replaces a quest in a player's list with another one.
+ *
+ * @param sd Player's data
+ * @param qid1 Current quest to replace
+ * @param qid2 New quest to add
+ * @return 0 in case of success, nonzero otherwise
+ */
+int quest_change(TBL_PC *sd, int qid1, int qid2) {
+ int i;
+ struct quest_db *qi = quest->db(qid2);
- if( quest->check(sd, qid2, HAVEQUEST) >= 0 )
- {
- ShowError("quest_change: Character %d already has quest %d.\n", sd->status.char_id, qid2);
+ if( qi == &quest->dummy ) {
+ ShowError("quest_change: quest %d not found in DB.\n", qid2);
return -1;
}
- if( quest->check(sd, qid1, HAVEQUEST) < 0 )
- {
- ShowError("quest_change: Character %d doesn't have quest %d.\n", sd->status.char_id, qid1);
+ if( quest->check(sd, qid2, HAVEQUEST) >= 0 ) {
+ ShowError("quest_change: Character %d already has quest %d.\n", sd->status.char_id, qid2);
return -1;
}
- if( (j = quest->search_db(qid2)) < 0 )
- {
- ShowError("quest_change: quest %d not found in DB.\n",qid2);
+ if( quest->check(sd, qid1, HAVEQUEST) < 0 ) {
+ ShowError("quest_change: Character %d doesn't have quest %d.\n", sd->status.char_id, qid1);
return -1;
}
ARR_FIND(0, sd->avail_quests, i, sd->quest_log[i].quest_id == qid1);
- if(i == sd->avail_quests)
- {
- ShowError("quest_change: Character %d has completed quests %d.\n", sd->status.char_id, qid1);
+ if( i == sd->avail_quests ) {
+ ShowError("quest_change: Character %d has completed quest %d.\n", sd->status.char_id, qid1);
return -1;
}
memset(&sd->quest_log[i], 0, sizeof(struct quest));
- sd->quest_log[i].quest_id = quest->db[j].id;
- if( quest->db[j].time )
- sd->quest_log[i].time = (unsigned int)(time(NULL) + quest->db[j].time);
+ sd->quest_log[i].quest_id = qi->id;
+ if( qi->time )
+ sd->quest_log[i].time = (unsigned int)(time(NULL) + qi->time);
sd->quest_log[i].state = Q_ACTIVE;
- sd->quest_index[i] = j;
sd->save_quest = true;
clif->quest_delete(sd, qid1);
- clif->quest_add(sd, &sd->quest_log[i], sd->quest_index[i]);
- clif->quest_update_objective(sd, &sd->quest_log[i], sd->quest_index[i]);
+ clif->quest_add(sd, &sd->quest_log[i]);
+ clif->quest_update_objective(sd, &sd->quest_log[i]);
if( map->save_settings&64 )
chrif->save(sd,0);
@@ -158,27 +172,37 @@ int quest_change(TBL_PC * sd, int qid1, int qid2)
return 0;
}
-int quest_delete(TBL_PC * sd, int quest_id)
-{
+/**
+ * Removes a quest from a player's list
+ *
+ * @param sd Player's data
+ * @param quest_id ID of the quest to remove
+ * @return 0 in case of success, nonzero otherwise
+ */
+int quest_delete(TBL_PC *sd, int quest_id) {
int i;
//Search for quest
ARR_FIND(0, sd->num_quests, i, sd->quest_log[i].quest_id == quest_id);
- if(i == sd->num_quests)
- {
+
+ if(i == sd->num_quests) {
ShowError("quest_delete: Character %d doesn't have quest %d.\n", sd->status.char_id, quest_id);
return -1;
}
if( sd->quest_log[i].state != Q_COMPLETE )
sd->avail_quests--;
- if( sd->num_quests-- < MAX_QUEST_DB && sd->quest_log[i+1].quest_id )
- {
+
+ if( i < --sd->num_quests ) {
+ // Compact the array
memmove(&sd->quest_log[i], &sd->quest_log[i+1], sizeof(struct quest)*(sd->num_quests-i));
- memmove(sd->quest_index+i, sd->quest_index+i+1, sizeof(int)*(sd->num_quests-i));
}
- memset(&sd->quest_log[sd->num_quests], 0, sizeof(struct quest));
- sd->quest_index[sd->num_quests] = 0;
+ if( sd->num_quests == 0 ) {
+ aFree(sd->quest_log);
+ sd->quest_log = NULL;
+ } else {
+ RECREATE(sd->quest_log, struct quest, sd->num_quests);
+ }
sd->save_quest = true;
clif->quest_delete(sd, quest_id);
@@ -189,8 +213,16 @@ int quest_delete(TBL_PC * sd, int quest_id)
return 0;
}
+/**
+ * Map iterator subroutine to update quest objectives for a party after killing a monster.
+ *
+ * @see map_foreachinrange
+ * @param ap Argument list, expecting:
+ * int Party ID
+ * int Mob ID
+ */
int quest_update_objective_sub(struct block_list *bl, va_list ap) {
- struct map_session_data * sd;
+ struct map_session_data *sd;
int mob_id, party_id;
nullpo_ret(bl);
@@ -210,28 +242,48 @@ int quest_update_objective_sub(struct block_list *bl, va_list ap) {
}
-void quest_update_objective(TBL_PC * sd, int mob_id) {
+/**
+ * Updates the quest objectives for a character after killing a monster.
+ *
+ * @param sd Character's data
+ * @param mob_id Monster ID
+ */
+void quest_update_objective(TBL_PC *sd, int mob_id) {
int i,j;
for( i = 0; i < sd->avail_quests; i++ ) {
- if( sd->quest_log[i].state != Q_ACTIVE )
+ struct quest_db *qi = NULL;
+
+ if( sd->quest_log[i].state != Q_ACTIVE ) // Skip inactive quests
continue;
- for( j = 0; j < MAX_QUEST_OBJECTIVES; j++ )
- if( quest->db[sd->quest_index[i]].mob[j] == mob_id && sd->quest_log[i].count[j] < quest->db[sd->quest_index[i]].count[j] ) {
+ qi = quest->db(sd->quest_log[i].quest_id);
+
+ for( j = 0; j < qi->num_objectives; j++ ) {
+ if( qi->mob[j] == mob_id && sd->quest_log[i].count[j] < qi->count[j] ) {
sd->quest_log[i].count[j]++;
sd->save_quest = true;
- clif->quest_update_objective(sd,&sd->quest_log[i],sd->quest_index[i]);
+ clif->quest_update_objective(sd, &sd->quest_log[i]);
}
+ }
}
}
-int quest_update_status(TBL_PC * sd, int quest_id, quest_state qs) {
+/**
+ * Updates a quest's state.
+ *
+ * Only status of active and inactive quests can be updated. Completed quests can't (for now). [Inkfish]
+ *
+ * @param sd Character's data
+ * @param quest_id Quest ID to update
+ * @param qs New quest state
+ * @return 0 in case of success, nonzero otherwise
+ */
+int quest_update_status(TBL_PC *sd, int quest_id, enum quest_state qs) {
int i;
- //Only status of active and inactive quests can be updated. Completed quests can't (for now). [Inkfish]
ARR_FIND(0, sd->avail_quests, i, sd->quest_log[i].quest_id == quest_id);
- if(i == sd->avail_quests) {
+ if( i == sd->avail_quests ) {
ShowError("quest_update_status: Character %d doesn't have quest %d.\n", sd->status.char_id, quest_id);
return -1;
}
@@ -240,11 +292,13 @@ int quest_update_status(TBL_PC * sd, int quest_id, quest_state qs) {
sd->save_quest = true;
if( qs < Q_COMPLETE ) {
- clif->quest_update_status(sd, quest_id, (bool)qs);
+ clif->quest_update_status(sd, quest_id, qs == Q_ACTIVE ? true : false);
return 0;
}
- if( i != (--sd->avail_quests) ) {
+ // The quest is complete, so it needs to be moved to the completed quests block at the end of the array.
+
+ if( i < (--sd->avail_quests) ) {
struct quest tmp_quest;
memcpy(&tmp_quest, &sd->quest_log[i],sizeof(struct quest));
memcpy(&sd->quest_log[i], &sd->quest_log[sd->avail_quests],sizeof(struct quest));
@@ -259,7 +313,22 @@ int quest_update_status(TBL_PC * sd, int quest_id, quest_state qs) {
return 0;
}
-int quest_check(TBL_PC * sd, int quest_id, quest_check_type type) {
+/**
+ * Queries quest information for a character.
+ *
+ * @param sd Character's data
+ * @param quest_id Quest ID
+ * @param type Check type
+ * @return -1 if the quest was not found, otherwise it depends on the type:
+ * HAVEQUEST: The quest's state
+ * PLAYTIME: 2 if the quest's timeout has expired
+ * 1 if the quest was completed
+ * 0 otherwise
+ * HUNTING: 2 if the quest has not been marked as completed yet, and its objectives have been fulfilled
+ * 1 if the quest's timeout has expired
+ * 0 otherwise
+ */
+int quest_check(TBL_PC *sd, int quest_id, enum quest_check_type type) {
int i;
ARR_FIND(0, sd->num_quests, i, sd->quest_log[i].quest_id == quest_id);
@@ -271,18 +340,17 @@ int quest_check(TBL_PC * sd, int quest_id, quest_check_type type) {
return sd->quest_log[i].state;
case PLAYTIME:
return (sd->quest_log[i].time < (unsigned int)time(NULL) ? 2 : sd->quest_log[i].state == Q_COMPLETE ? 1 : 0);
- case HUNTING: {
- if( sd->quest_log[i].state == 0 || sd->quest_log[i].state == 1 ) {
- int j;
- ARR_FIND(0, MAX_QUEST_OBJECTIVES, j, sd->quest_log[i].count[j] < quest->db[sd->quest_index[i]].count[j]);
- if( j == MAX_QUEST_OBJECTIVES )
- return 2;
- if( sd->quest_log[i].time < (unsigned int)time(NULL) )
- return 1;
- return 0;
- } else
- return 0;
+ case HUNTING:
+ if( sd->quest_log[i].state == Q_INACTIVE || sd->quest_log[i].state == Q_ACTIVE ) {
+ int j;
+ struct quest_db *qi = quest->db(sd->quest_log[i].quest_id);
+ ARR_FIND(0, MAX_QUEST_OBJECTIVES, j, sd->quest_log[i].count[j] < qi->count[j]);
+ if( j == MAX_QUEST_OBJECTIVES )
+ return 2;
+ if( sd->quest_log[i].time < (unsigned int)time(NULL) )
+ return 1;
}
+ return 0;
default:
ShowError("quest_check_quest: Unknown parameter %d",type);
break;
@@ -291,66 +359,133 @@ int quest_check(TBL_PC * sd, int quest_id, quest_check_type type) {
return -1;
}
+/**
+ * Loads quests from the quest db.
+ *
+ * @return Number of loaded quests, or -1 if the file couldn't be read.
+ */
int quest_read_db(void) {
+ // TODO[Haru] This duplicates some sv_readdb functionalities, and it would be
+ // nice if it could be replaced by it. The reason why it wasn't is probably
+ // because we need to accept commas (which is also used as delimiter) in the
+ // last field (quest name), and sv_readdb isn't capable of doing so.
FILE *fp;
char line[1024];
- int i,j,k = 0;
- char *str[20],*p,*np;
+ int i, count = 0;
+ char *str[20], *p, *np;
+ struct quest_db entry;
sprintf(line, "%s/quest_db.txt", map->db_path);
- if( (fp=fopen(line,"r"))==NULL ){
+ if ((fp=fopen(line,"r"))==NULL) {
ShowError("can't read %s\n", line);
return -1;
}
-
- while(fgets(line, sizeof(line), fp)) {
- if (k == MAX_QUEST_DB) {
- ShowError("quest_read_db: Too many entries specified in %s/quest_db.txt!\n", map->db_path);
- break;
- }
-
- if(line[0]=='/' && line[1]=='/')
+
+ while (fgets(line, sizeof(line), fp)) {
+ if (line[0]=='/' && line[1]=='/')
continue;
memset(str,0,sizeof(str));
- for( j = 0, p = line; j < 8; j++ ) {
- if( ( np = strchr(p,',') ) != NULL ) {
- str[j] = p;
+ for (i = 0, p = line; i < 8; i++) {
+ if (( np = strchr(p,',') ) != NULL) {
+ str[i] = p;
*np = 0;
p = np + 1;
- }
- else if (str[0] == NULL)
- continue;
- else {
+ } else if (str[0] == NULL) {
+ break;
+ } else {
ShowError("quest_read_db: insufficient columns in line %s\n", line);
continue;
}
}
- if(str[0]==NULL)
+ if (str[0] == NULL)
+ continue;
+
+ memset(&entry, 0, sizeof(entry));
+
+ entry.id = atoi(str[0]);
+
+ if (entry.id < 0 || entry.id >= MAX_QUEST_DB) {
+ ShowError("quest_read_db: Invalid quest ID '%d' in line '%s' (min: 0, max: %d.)\n", entry.id, line, MAX_QUEST_DB);
continue;
+ }
- memset(&quest->db[k], 0, sizeof(quest->db[0]));
+ entry.time = atoi(str[1]);
- quest->db[k].id = atoi(str[0]);
- quest->db[k].time = atoi(str[1]);
-
- for( i = 0; i < MAX_QUEST_OBJECTIVES; i++ ) {
- quest->db[k].mob[i] = atoi(str[2*i+2]);
- quest->db[k].count[i] = atoi(str[2*i+3]);
+ for (i = 0; i < MAX_QUEST_OBJECTIVES; i++) {
+ entry.mob[i] = atoi(str[2*i+2]);
+ entry.count[i] = atoi(str[2*i+3]);
- if( !quest->db[k].mob[i] || !quest->db[k].count[i] )
+ if (!entry.mob[i] || !entry.count[i])
break;
}
-
- quest->db[k].num_objectives = i;
- k++;
+ entry.num_objectives = i;
+
+ if (quest->db_data[entry.id] == NULL)
+ quest->db_data[entry.id] = aMalloc(sizeof(struct quest_db));
+
+ memcpy(quest->db_data[entry.id], &entry, sizeof(struct quest_db));
+ count++;
}
fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", k, "quest_db.txt");
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, "quest_db.txt");
return 0;
}
+/**
+ * Map iterator to ensures a player has no invalid quest log entries.
+ *
+ * Any entries that are no longer in the db are removed.
+ *
+ * @see map->foreachpc
+ * @param ap Ignored
+ */
+int quest_reload_check_sub(struct map_session_data *sd, va_list ap) {
+ int i, j;
+
+ nullpo_ret(sd);
+
+ j = 0;
+ for (i = 0; i < sd->num_quests; i++) {
+ struct quest_db *qi = quest->db(sd->quest_log[i].quest_id);
+ if (qi == &quest->dummy) { // Remove no longer existing entries
+ if (sd->quest_log[i].state != Q_COMPLETE) // And inform the client if necessary
+ clif->quest_delete(sd, sd->quest_log[i].quest_id);
+ continue;
+ }
+ if (i != j) {
+ // Move entries if there's a gap to fill
+ memcpy(&sd->quest_log[j], &sd->quest_log[i], sizeof(struct quest));
+ }
+ j++;
+ }
+ sd->num_quests = j;
+ ARR_FIND(0, sd->num_quests, i, sd->quest_log[i].state == Q_COMPLETE);
+ sd->avail_quests = i;
+
+ return 1;
+}
+
+/**
+ * Clears the quest database for shutdown or reload.
+ */
+void quest_clear_db(void) {
+ int i;
+
+ for (i = 0; i < MAX_QUEST_DB; i++) {
+ if (quest->db_data[i]) {
+ aFree(quest->db_data[i]);
+ quest->db_data[i] = NULL;
+ }
+ }
+}
+
+/**
+ * Initializes the quest interface.
+ *
+ * @param minimal Run in minimal mode (skips most of the loading)
+ */
void do_init_quest(bool minimal) {
if (minimal)
return;
@@ -358,20 +493,39 @@ void do_init_quest(bool minimal) {
quest->read_db();
}
+/**
+ * Finalizes the quest interface before shutdown.
+ */
+void do_final_quest(void) {
+ quest->clear();
+}
+
+/**
+ * Reloads the quest database.
+ */
void do_reload_quest(void) {
- memset(&quest->db, 0, sizeof(quest->db));
+ quest->clear();
+
quest->read_db();
+
+ // Update quest data for players, to ensure no entries about removed quests are left over.
+ map->foreachpc(&quest_reload_check_sub);
}
+/**
+ * Initializes default values for the quest interface.
+ */
void quest_defaults(void) {
quest = &quest_s;
-
+
memset(&quest->db, 0, sizeof(quest->db));
+ memset(&quest->dummy, 0, sizeof(quest->dummy));
/* */
quest->init = do_init_quest;
+ quest->final = do_final_quest;
quest->reload = do_reload_quest;
/* */
- quest->search_db = quest_search_db;
+ quest->db = quest_db;
quest->pc_login = quest_pc_login;
quest->add = quest_add;
quest->change = quest_change;
@@ -380,5 +534,6 @@ void quest_defaults(void) {
quest->update_objective = quest_update_objective;
quest->update_status = quest_update_status;
quest->check = quest_check;
+ quest->clear = quest_clear_db;
quest->read_db = quest_read_db;
}
diff --git a/src/map/quest.h b/src/map/quest.h
index 0725a8c46..28815a6c3 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -5,7 +5,9 @@
#ifndef _QUEST_H_
#define _QUEST_H_
-struct s_quest_db {
+#define MAX_QUEST_DB (60355+1) // Highest quest ID + 1
+
+struct quest_db {
int id;
unsigned int time;
int mob[MAX_QUEST_OBJECTIVES];
@@ -14,23 +16,31 @@ struct s_quest_db {
//char name[NAME_LENGTH];
};
-typedef enum quest_check_type { HAVEQUEST, PLAYTIME, HUNTING } quest_check_type;
+// Questlog check types
+enum quest_check_type {
+ HAVEQUEST, ///< Query the state of the given quest
+ PLAYTIME, ///< Check if the given quest has been completed or has yet to expire
+ HUNTING, ///< Check if the given hunting quest's requirements have been met
+};
struct quest_interface {
- struct s_quest_db db[MAX_QUEST_DB];
+ struct quest_db *db_data[MAX_QUEST_DB]; ///< Quest database
+ struct quest_db dummy; ///< Dummy entry for invalid quest lookups
/* */
void (*init) (bool minimal);
+ void (*final) (void);
void (*reload) (void);
/* */
- int (*search_db) (int quest_id);
+ struct quest_db *(*db) (int quest_id);
int (*pc_login) (TBL_PC *sd);
int (*add) (TBL_PC *sd, int quest_id);
int (*change) (TBL_PC *sd, int qid1, int qid2);
int (*delete) (TBL_PC *sd, int quest_id);
int (*update_objective_sub) (struct block_list *bl, va_list ap);
void (*update_objective) (TBL_PC *sd, int mob_id);
- int (*update_status) (TBL_PC *sd, int quest_id, quest_state qs);
- int (*check) (TBL_PC *sd, int quest_id, quest_check_type type);
+ int (*update_status) (TBL_PC *sd, int quest_id, enum quest_state qs);
+ int (*check) (TBL_PC *sd, int quest_id, enum quest_check_type type);
+ void (*clear) (void);
int (*read_db) (void);
};
diff --git a/src/map/script.c b/src/map/script.c
index d0b69d594..074348ef0 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -275,14 +275,14 @@ void script_reportfunc(struct script_state* st)
/*==========================================
* Output error message
*------------------------------------------*/
-void disp_error_message2(const char *mes,const char *pos,int report)
-{
+static void disp_error_message2(const char *mes,const char *pos,int report) analyzer_noreturn;
+static void disp_error_message2(const char *mes,const char *pos,int report) {
script->error_msg = aStrdup(mes);
script->error_pos = pos;
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) (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);
@@ -301,13 +301,47 @@ void check_event(struct script_state *st, const char *evt)
/*==========================================
* Hashes the input string
*------------------------------------------*/
-unsigned int calc_hash(const char* p)
-{
+unsigned int calc_hash(const char* p) {
unsigned int h;
#if defined(SCRIPT_HASH_DJB2)
h = 5381;
while( *p ) // hash*33 + c
+ h = ( h << 5 ) + h + ((unsigned char)(*p++));
+#elif defined(SCRIPT_HASH_SDBM)
+ h = 0;
+ while( *p ) // hash*65599 + c
+ h = ( h << 6 ) + ( h << 16 ) - h + ((unsigned char)(*p++));
+#elif defined(SCRIPT_HASH_ELF) // UNIX ELF hash
+ h = 0;
+ while( *p ) {
+ unsigned int g;
+ h = ( h << 4 ) + ((unsigned char)(*p++));
+ g = h & 0xF0000000;
+ if( g ) {
+ h ^= g >> 24;
+ h &= ~g;
+ }
+ }
+#else // athena hash
+ h = 0;
+ while( *p )
+ h = ( h << 1 ) + ( h >> 3 ) + ( h >> 5 ) + ( h >> 8 ) + (unsigned char)(*p++);
+#endif
+
+ return h % SCRIPT_HASH_SIZE;
+}
+
+/*==========================================
+ * Hashes the input string in a case insensitive way
+ *------------------------------------------*/
+unsigned int calc_hash_ci(const char* p) {
+ unsigned int h = 0;
+#ifdef ENABLE_CASE_CHECK
+
+#if defined(SCRIPT_HASH_DJB2)
+ h = 5381;
+ while( *p ) // hash*33 + c
h = ( h << 5 ) + h + ((unsigned char)TOLOWER(*p++));
#elif defined(SCRIPT_HASH_SDBM)
h = 0;
@@ -315,12 +349,11 @@ unsigned int calc_hash(const char* p)
h = ( h << 6 ) + ( h << 16 ) - h + ((unsigned char)TOLOWER(*p++));
#elif defined(SCRIPT_HASH_ELF) // UNIX ELF hash
h = 0;
- while( *p ){
+ while( *p ) {
unsigned int g;
h = ( h << 4 ) + ((unsigned char)TOLOWER(*p++));
g = h & 0xF0000000;
- if( g )
- {
+ if( g ) {
h ^= g >> 24;
h &= ~g;
}
@@ -331,6 +364,7 @@ unsigned int calc_hash(const char* p)
h = ( h << 1 ) + ( h >> 3 ) + ( h >> 5 ) + ( h >> 8 ) + (unsigned char)TOLOWER(*p++);
#endif
+#endif // ENABLE_CASE_CHECK
return h % SCRIPT_HASH_SIZE;
}
@@ -352,15 +386,7 @@ int script_search_str(const char* p)
int i;
for( i = script->str_hash[script->calc_hash(p)]; i != 0; i = script->str_data[i].next ) {
- if( strcasecmp(script->get_str(i),p) == 0 ) {
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, ".@", 2) != 0 // Local scope vars are checked separately to decrease false positives
- && strcasecmp(p, "disguise") != 0 && strcasecmp(p, "Poison_Spore") != 0
- && strcasecmp(p, "PecoPeco_Egg") != 0 && strcasecmp(p, "Soccer_Ball") != 0
- && strcasecmp(p, "Horn") != 0 && strcasecmp(p, "Treasure_Box_") != 0
- && strcasecmp(p, "Lord_of_Death") != 0
- && strcmp(script->get_str(i),p) != 0 ) DeprecationWarning2("script_search_str", p, script->get_str(i), script->parser_current_file); // TODO
-#endif // ENABLE_CASE_CHECK
+ if( strcmp(script->get_str(i),p) == 0 ) {
return i;
}
}
@@ -368,107 +394,107 @@ int script_search_str(const char* p)
return -1;
}
-void script_local_casecheck_clear(void) {
+void script_casecheck_clear_sub(struct casecheck_data *ccd) {
#ifdef ENABLE_CASE_CHECK
- if (script->local_casecheck_str_data) {
- aFree(script->local_casecheck_str_data);
- script->local_casecheck_str_data = NULL;
- }
- script->local_casecheck_str_data_size = 0;
- script->local_casecheck_str_num = 1;
- if (script->local_casecheck_str_buf) {
- aFree(script->local_casecheck_str_buf);
- script->local_casecheck_str_buf = NULL;
- }
- script->local_casecheck_str_pos = 0;
- script->local_casecheck_str_size = 0;
- memset(script->local_casecheck_str_hash, 0, sizeof(script->local_casecheck_str_hash));
+ if (ccd->str_data) {
+ aFree(ccd->str_data);
+ ccd->str_data = NULL;
+ }
+ ccd->str_data_size = 0;
+ ccd->str_num = 1;
+ if (ccd->str_buf) {
+ aFree(ccd->str_buf);
+ ccd->str_buf = NULL;
+ }
+ ccd->str_pos = 0;
+ ccd->str_size = 0;
+ memset(ccd->str_hash, 0, sizeof(ccd->str_hash));
#endif // ENABLE_CASE_CHECK
}
-bool script_local_casecheck_add_str(const char *p, int h) {
+void script_global_casecheck_clear(void) {
+ script_casecheck_clear_sub(&script->global_casecheck);
+}
+
+void script_local_casecheck_clear(void) {
+ script_casecheck_clear_sub(&script->local_casecheck);
+}
+
+const char *script_casecheck_add_str_sub(struct casecheck_data *ccd, const char *p) {
#ifdef ENABLE_CASE_CHECK
int len, i;
- if( script->local_casecheck_str_hash[h] == 0 ) { //empty bucket, add new node here
- script->local_casecheck_str_hash[h] = script->local_casecheck_str_num;
+ int h = script->calc_hash_ci(p);
+ if( ccd->str_hash[h] == 0 ) { //empty bucket, add new node here
+ ccd->str_hash[h] = ccd->str_num;
} else {
const char *s = NULL;
- for( i = script->local_casecheck_str_hash[h]; ; i = script->local_casecheck_str_data[i].next ) {
- Assert( i >= 0 && i < script->local_casecheck_str_size );
- s = script->local_casecheck_str_buf+script->local_casecheck_str_data[i].str;
+ for( i = ccd->str_hash[h]; ; i = ccd->str_data[i].next ) {
+ Assert( i >= 0 && i < ccd->str_size );
+ s = ccd->str_buf+ccd->str_data[i].str;
if( strcasecmp(s,p) == 0 ) {
- if ( strcmp(s,p) != 0 ) {
- DeprecationWarning2("script_add_str", p, s, script->parser_current_file);
- return true;
- }
- return false; // string already in list
+ return s; // string already in list
}
- if( script->local_casecheck_str_data[i].next == 0 )
+ if( ccd->str_data[i].next == 0 )
break; // reached the end
}
// append node to end of list
- script->local_casecheck_str_data[i].next = script->local_casecheck_str_num;
+ ccd->str_data[i].next = ccd->str_num;
}
// grow list if neccessary
- if( script->local_casecheck_str_num >= script->local_casecheck_str_data_size ) {
- script->local_casecheck_str_data_size += 1280;
- RECREATE(script->local_casecheck_str_data,struct str_data_struct,script->local_casecheck_str_data_size);
- memset(script->local_casecheck_str_data + (script->local_casecheck_str_data_size - 1280), '\0', 1280);
+ if( ccd->str_num >= ccd->str_data_size ) {
+ ccd->str_data_size += 1280;
+ RECREATE(ccd->str_data,struct str_data_struct,ccd->str_data_size);
+ memset(ccd->str_data + (ccd->str_data_size - 1280), '\0', 1280);
}
len=(int)strlen(p);
// grow string buffer if neccessary
- while( script->local_casecheck_str_pos+len+1 >= script->local_casecheck_str_size ) {
- script->local_casecheck_str_size += 10240;
- RECREATE(script->local_casecheck_str_buf,char,script->local_casecheck_str_size);
- memset(script->local_casecheck_str_buf + (script->local_casecheck_str_size - 10240), '\0', 10240);
- }
-
- safestrncpy(script->local_casecheck_str_buf+script->local_casecheck_str_pos, p, len+1);
- script->local_casecheck_str_data[script->local_casecheck_str_num].type = C_NOP;
- script->local_casecheck_str_data[script->local_casecheck_str_num].str = script->local_casecheck_str_pos;
- script->local_casecheck_str_data[script->local_casecheck_str_num].val = 0;
- script->local_casecheck_str_data[script->local_casecheck_str_num].next = 0;
- script->local_casecheck_str_data[script->local_casecheck_str_num].func = NULL;
- script->local_casecheck_str_data[script->local_casecheck_str_num].backpatch = -1;
- script->local_casecheck_str_data[script->local_casecheck_str_num].label = -1;
- script->local_casecheck_str_pos += len+1;
-
- script->local_casecheck_str_num++;
+ while( ccd->str_pos+len+1 >= ccd->str_size ) {
+ ccd->str_size += 10240;
+ RECREATE(ccd->str_buf,char,ccd->str_size);
+ memset(ccd->str_buf + (ccd->str_size - 10240), '\0', 10240);
+ }
+
+ safestrncpy(ccd->str_buf+ccd->str_pos, p, len+1);
+ ccd->str_data[ccd->str_num].type = C_NOP;
+ ccd->str_data[ccd->str_num].str = ccd->str_pos;
+ ccd->str_data[ccd->str_num].val = 0;
+ ccd->str_data[ccd->str_num].next = 0;
+ ccd->str_data[ccd->str_num].func = NULL;
+ ccd->str_data[ccd->str_num].backpatch = -1;
+ ccd->str_data[ccd->str_num].label = -1;
+ ccd->str_pos += len+1;
+
+ ccd->str_num++;
#endif // ENABLE_CASE_CHECK
- return false;
+ return NULL;
+}
+
+const char *script_global_casecheck_add_str(const char *p) {
+ return script_casecheck_add_str_sub(&script->global_casecheck, p);
+}
+
+const char *script_local_casecheck_add_str(const char *p) {
+ return script_casecheck_add_str_sub(&script->local_casecheck, p);
}
/// Stores a copy of the string and returns its id.
/// If an identical string is already present, returns its id instead.
int script_add_str(const char* p)
{
- int i, h;
- int len;
-
- h = script->calc_hash(p);
-
+ int i, len, h = script->calc_hash(p);
#ifdef ENABLE_CASE_CHECK
- if( (strncmp(p, ".@", 2) == 0) ) // Local scope vars are checked separately to decrease false positives
- script->local_casecheck_add_str(p, h);
+ const char *existingentry = NULL;
#endif // ENABLE_CASE_CHECK
if( script->str_hash[h] == 0 ) {// empty bucket, add new node here
script->str_hash[h] = script->str_num;
} else {// scan for end of list, or occurence of identical string
for( i = script->str_hash[h]; ; i = script->str_data[i].next ) {
- if( strcasecmp(script->get_str(i),p) == 0 ) {
-#ifdef ENABLE_CASE_CHECK
- if( (strncmp(p, ".@", 2) != 0) // Local scope vars are checked separately to decrease false positives
- && strcasecmp(p, "disguise") != 0 && strcasecmp(p, "Poison_Spore") != 0
- && strcasecmp(p, "PecoPeco_Egg") != 0 && strcasecmp(p, "Soccer_Ball") != 0
- && strcasecmp(p, "Horn") != 0 && strcasecmp(p, "Treasure_Box_") != 0
- && strcasecmp(p, "Lord_of_Death") != 0
- && strcmp(script->get_str(i),p) != 0 ) DeprecationWarning2("script_add_str", p, script->get_str(i), script->parser_current_file); // TODO
-#endif // ENABLE_CASE_CHECK
+ if( strcmp(script->get_str(i),p) == 0 ) {
return i; // string already in list
}
if( script->str_data[i].next == 0 )
@@ -478,6 +504,25 @@ int script_add_str(const char* p)
// append node to end of list
script->str_data[i].next = script->str_num;
}
+
+#ifdef ENABLE_CASE_CHECK
+ if( (strncmp(p, ".@", 2) == 0) ) // Local scope vars are checked separately to decrease false positives
+ existingentry = script->local_casecheck.add_str(p);
+ else {
+ existingentry = script->global_casecheck.add_str(p);
+ if( existingentry ) {
+ if( strcasecmp(p, "disguise") == 0 || strcasecmp(p, "Poison_Spore") == 0
+ || strcasecmp(p, "PecoPeco_Egg") == 0 || strcasecmp(p, "Soccer_Ball") == 0
+ || strcasecmp(p, "Horn") == 0 || strcasecmp(p, "Treasure_Box_") == 0
+ || strcasecmp(p, "Lord_of_Death") == 0
+ ) // Known duplicates, don't bother warning the user
+ existingentry = NULL;
+ }
+ }
+ if( existingentry ) {
+ DeprecationWarning2("script_add_str", p, existingentry, script->parser_current_file); // TODO
+ }
+#endif // ENABLE_CASE_CHECK
// grow list if neccessary
if( script->str_num >= script->str_data_size ) {
@@ -683,7 +728,7 @@ const char* skip_word(const char* p) {
/// @see skip_word
/// @see script->add_str
int add_word(const char* p) {
- int len;
+ size_t len;
int i;
// Check for a word
@@ -1159,7 +1204,7 @@ const char* script_parse_subexpr(const char* p,int limit) {
}
}
- if( (op=C_ADD_PRE,p[0]=='+'&&p[1]=='+') || (op=C_SUB_PRE,p[0]=='-'&&p[1]=='-') ) { // Pre ++ -- operators
+ if( (p[0]=='+' && p[1]=='+') /* C_ADD_PRE */ || (p[0]=='-'&&p[1]=='-') /* C_SUB_PRE */ ) { // Pre ++ -- operators
p=script->parse_variable(p);
} else if( (op=C_NEG,*p=='-') || (op=C_LNOT,*p=='!') || (op=C_NOT,*p=='~') ) { // Unary - ! ~ operators
p=script->parse_subexpr(p+1,11);
@@ -1343,13 +1388,10 @@ const char* parse_syntax(const char* p)
switch(*p) {
case 'B':
case 'b':
- if(p2 - p == 5 && !strncasecmp(p,"break",5)) {
+ if( p2 - p == 5 && strncmp(p,"break",5) == 0 ) {
// break Processing
char label[256];
int pos = script->syntax.curly_count - 1;
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "break", 5) != 0 ) disp_deprecation_message("parse_syntax", "break", p); // TODO
-#endif // ENABLE_CASE_CHECK
while(pos >= 0) {
if(script->syntax.curly[pos].type == TYPE_DO) {
sprintf(label,"goto __DO%x_FIN;",script->syntax.curly[pos].index);
@@ -1379,16 +1421,17 @@ const char* parse_syntax(const char* p)
// Closing decision if, for , while
p = script->parse_syntax_close(p + 1);
return p;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 5 && strncasecmp(p, "break", 5) == 0 ) {
+ disp_deprecation_message("parse_syntax", "break", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
break;
case 'c':
case 'C':
- if(p2 - p == 4 && !strncasecmp(p,"case",4)) {
+ if( p2 - p == 4 && strncmp(p, "case", 4) == 0 ) {
//Processing case
int pos = script->syntax.curly_count-1;
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "case", 4) != 0 ) disp_deprecation_message("parse_syntax", "case", p); // TODO
-#endif // ENABLE_CASE_CHECK
if(pos < 0 || script->syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'case' ",p);
return p+1;
@@ -1416,7 +1459,7 @@ const char* parse_syntax(const char* p)
// check whether case label is integer or not
if(is_number(p)) {
//Numeric value
- v = strtol(p,&np,0);
+ v = (int)strtol(p,&np,0);
if((*p == '-' || *p == '+') && ISDIGIT(p[1])) // pre-skip because '-' can not skip_word
p++;
p = script->skip_word(p);
@@ -1425,7 +1468,7 @@ const char* parse_syntax(const char* p)
} else {
//Check for constants
p2 = script->skip_word(p);
- v = p2-p; // length of word at p2
+ v = (int)(size_t) (p2-p); // length of word at p2
memcpy(label,p,v);
label[v]='\0';
if( !script->get_constant(label, &v) )
@@ -1461,13 +1504,10 @@ const char* parse_syntax(const char* p)
script->syntax.curly[pos].count++;
}
return p + 1;
- } else if(p2 - p == 8 && !strncasecmp(p,"continue",8)) {
+ } else if( p2 - p == 8 && strncmp(p, "continue", 8) == 0 ) {
// Processing continue
char label[256];
int pos = script->syntax.curly_count - 1;
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "continue", 8) != 0 ) disp_deprecation_message("parse_syntax", "continue", p); // TODO
-#endif // ENABLE_CASE_CHECK
while(pos >= 0) {
if(script->syntax.curly[pos].type == TYPE_DO) {
sprintf(label,"goto __DO%x_NXT;",script->syntax.curly[pos].index);
@@ -1495,16 +1535,19 @@ const char* parse_syntax(const char* p)
//Closing decision if, for , while
p = script->parse_syntax_close(p + 1);
return p;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 4 && strncasecmp(p, "case", 4) == 0 ) {
+ disp_deprecation_message("parse_syntax", "case", p); // TODO
+ } else if( p2 - p == 8 && strncasecmp(p, "continue", 8) == 0 ) {
+ disp_deprecation_message("parse_syntax", "continue", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
break;
case 'd':
case 'D':
- if(p2 - p == 7 && !strncasecmp(p,"default",7)) {
+ if( p2 - p == 7 && strncmp(p, "default", 7) == 0 ) {
// Switch - default processing
int pos = script->syntax.curly_count-1;
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "default", 7) != 0 ) disp_deprecation_message("parse_syntax", "default", p); // TODO
-#endif // ENABLE_CASE_CHECK
if(pos < 0 || script->syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'default'",p);
} else if(script->syntax.curly[pos].flag) {
@@ -1536,12 +1579,9 @@ const char* parse_syntax(const char* p)
script->syntax.curly[pos].count++;
}
return p + 1;
- } else if(p2 - p == 2 && !strncasecmp(p,"do",2)) {
+ } else if( p2 - p == 2 && strncmp(p, "do", 2) == 0 ) {
int l;
char label[256];
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "do", 2) != 0 ) disp_deprecation_message("parse_syntax", "do", p); // TODO
-#endif // ENABLE_CASE_CHECK
p=script->skip_space(p2);
script->syntax.curly[script->syntax.curly_count].type = TYPE_DO;
@@ -1554,17 +1594,20 @@ const char* parse_syntax(const char* p)
script->set_label(l,script->pos,p);
script->syntax.curly_count++;
return p;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 7 && strncasecmp(p, "default", 7) == 0 ) {
+ disp_deprecation_message("parse_syntax", "default", p); // TODO
+ } else if( p2 - p == 2 && strncasecmp(p, "do", 2) == 0 ) {
+ disp_deprecation_message("parse_syntax", "do", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
break;
case 'f':
case 'F':
- if(p2 - p == 3 && !strncasecmp(p,"for",3)) {
+ if( p2 - p == 3 && strncmp(p, "for", 3) == 0 ) {
int l;
char label[256];
int pos = script->syntax.curly_count;
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "for", 3) != 0 ) disp_deprecation_message("parse_syntax", "for", p); // TODO
-#endif // ENABLE_CASE_CHECK
script->syntax.curly[script->syntax.curly_count].type = TYPE_FOR;
script->syntax.curly[script->syntax.curly_count].count = 1;
script->syntax.curly[script->syntax.curly_count].index = script->syntax.index++;
@@ -1635,14 +1678,10 @@ const char* parse_syntax(const char* p)
l=script->add_str(label);
script->set_label(l,script->pos,p);
return p;
- }
- else if( p2 - p == 8 && strncasecmp(p,"function",8) == 0 )
- {// internal script function
+ } else if( p2 - p == 8 && strncmp(p, "function", 8) == 0 ) {
+ // internal script function
const char *func_name;
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "function", 8) != 0 ) disp_deprecation_message("parse_syntax", "function", p); // TODO
-#endif // ENABLE_CASE_CHECK
func_name = script->skip_space(p2);
p = script->skip_word(func_name);
if( p == func_name )
@@ -1700,16 +1739,19 @@ const char* parse_syntax(const char* p)
{
disp_error_message("expect ';' or '{' at function syntax",p);
}
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 3 && strncasecmp(p, "for", 3) == 0 ) {
+ disp_deprecation_message("parse_syntax", "for", p); // TODO
+ } else if( p2 - p == 8 && strncasecmp(p, "function", 8) == 0 ) {
+ disp_deprecation_message("parse_syntax", "function", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
break;
case 'i':
case 'I':
- if(p2 - p == 2 && !strncasecmp(p,"if",2)) {
+ if( p2 - p == 2 && strncmp(p, "if", 2) == 0 ) {
// If process
char label[256];
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "if", 2) != 0 ) disp_deprecation_message("parse_syntax", "if", p); // TODO
-#endif // ENABLE_CASE_CHECK
p=script->skip_space(p2);
if(*p != '(') { //Prevent if this {} non-c script->syntax. from Rayce (jA)
disp_error_message("need '('",p);
@@ -1727,16 +1769,17 @@ const char* parse_syntax(const char* p)
script->addl(script->add_str(label));
script->addc(C_FUNC);
return p;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 2 && strncasecmp(p, "if", 2) == 0 ) {
+ disp_deprecation_message("parse_syntax", "if", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
break;
case 's':
case 'S':
- if(p2 - p == 6 && !strncasecmp(p,"switch",6)) {
+ if( p2 - p == 6 && strncmp(p, "switch", 6) == 0 ) {
// Processing of switch ()
char label[256];
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "switch", 6) != 0 ) disp_deprecation_message("parse_syntax", "switch", p); // TODO
-#endif // ENABLE_CASE_CHECK
p=script->skip_space(p2);
if(*p != '(') {
disp_error_message("need '('",p);
@@ -1757,16 +1800,17 @@ const char* parse_syntax(const char* p)
}
script->addc(C_FUNC);
return p + 1;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 6 && strncasecmp(p, "switch", 6) == 0 ) {
+ disp_deprecation_message("parse_syntax", "switch", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
break;
case 'w':
case 'W':
- if(p2 - p == 5 && !strncasecmp(p,"while",5)) {
+ if( p2 - p == 5 && strncmp(p, "while", 5) == 0 ) {
int l;
char label[256];
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "while", 5) != 0 ) disp_deprecation_message("parse_syntax", "while", p); // TODO
-#endif // ENABLE_CASE_CHECK
p=script->skip_space(p2);
if(*p != '(') {
disp_error_message("need '('",p);
@@ -1790,6 +1834,10 @@ const char* parse_syntax(const char* p)
script->addl(script->add_str(label));
script->addc(C_FUNC);
return p;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 5 && strncasecmp(p, "while", 5) == 0 ) {
+ disp_deprecation_message("parse_syntax", "while", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
break;
}
@@ -1840,14 +1888,11 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
script->syntax.curly[pos].count++;
p = script->skip_space(p);
p2 = script->skip_word(p);
- if(!script->syntax.curly[pos].flag && p2 - p == 4 && !strncasecmp(p,"else",4)) {
-#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "else", 4) != 0 ) disp_deprecation_message("parse_syntax", "else", p); // TODO
-#endif // ENABLE_CASE_CHECK
+ if( !script->syntax.curly[pos].flag && p2 - p == 4 && strncmp(p, "else", 4) == 0 ) {
// else or else - if
p = script->skip_space(p2);
p2 = script->skip_word(p);
- if(p2 - p == 2 && !strncasecmp(p,"if",2)) {
+ if( p2 - p == 2 && strncmp(p, "if", 2) == 0 ) {
// else - if
p=script->skip_space(p2);
if(*p != '(') {
@@ -1862,6 +1907,10 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
script->addc(C_FUNC);
*flag = 0;
return p;
+#ifdef ENABLE_CASE_CHECK
+ } else if( p2 - p == 2 && strncasecmp(p, "if", 2) == 0 ) {
+ disp_deprecation_message("parse_syntax", "if", p); // TODO
+#endif // ENABLE_CASE_CHECK
} else {
// else
if(!script->syntax.curly[pos].flag) {
@@ -1870,6 +1919,10 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
return p;
}
}
+#ifdef ENABLE_CASE_CHECK
+ } else if( !script->syntax.curly[pos].flag && p2 - p == 4 && strncasecmp(p, "else", 4) == 0 ) {
+ disp_deprecation_message("parse_syntax", "else", p); // TODO
+#endif // ENABLE_CASE_CHECK
}
// Close if
script->syntax.curly_count--;
@@ -1883,8 +1936,6 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
}
return p;
} else if(script->syntax.curly[pos].type == TYPE_DO) {
- int l;
- char label[256];
const char *p2;
if(script->syntax.curly[pos].flag) {
@@ -1897,12 +1948,13 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
// Skip to the end point if the condition is false
p = script->skip_space(p);
p2 = script->skip_word(p);
- if(p2 - p != 5 || strncasecmp(p,"while",5))
- disp_error_message("parse_syntax: need 'while'",p);
-
+ if( p2 - p != 5 || strncmp(p, "while", 5) != 0 ) {
#ifdef ENABLE_CASE_CHECK
- if( strncmp(p, "while", 5) != 0 ) disp_deprecation_message("parse_syntax", "while", p); // TODO
+ if( p2 - p == 5 && strncasecmp(p, "while", 5) == 0 ) disp_deprecation_message("parse_syntax", "while", p); // TODO
#endif // ENABLE_CASE_CHECK
+ disp_error_message("parse_syntax: need 'while'",p);
+ }
+
p = script->skip_space(p2);
if(*p != '(') {
disp_error_message("need '('",p);
@@ -1969,10 +2021,7 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
script->set_label(l,script->pos,p);
script->syntax.curly_count--;
return p;
- } else if(script->syntax.curly[script->syntax.curly_count-1].type == TYPE_USERFUNC) {
- int pos = script->syntax.curly_count-1;
- char label[256];
- int l;
+ } else if(script->syntax.curly[pos].type == TYPE_USERFUNC) {
// Back
sprintf(label,"return;");
script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
@@ -2221,7 +2270,6 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
if( setjmp( script->error_jump ) != 0 ) {
//Restore program state when script has problems. [from jA]
- int i;
const int size = ARRAYLENGTH(script->syntax.curly);
if( script->error_report )
script->error(src,file,line,script->error_msg,script->error_pos);
@@ -2235,7 +2283,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
for(i=0; i<size; i++)
linkdb_final(&script->syntax.curly[i].case_label);
#ifdef ENABLE_CASE_CHECK
- script->local_casecheck_clear();
+ script->local_casecheck.clear();
#endif // ENABLE_CASE_CHECK
return NULL;
}
@@ -2252,7 +2300,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
script->size = 0;
script->buf = NULL;
#ifdef ENABLE_CASE_CHECK
- script->local_casecheck_clear();
+ script->local_casecheck.clear();
#endif // ENABLE_CASE_CHECK
return NULL;
}
@@ -2270,7 +2318,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
script->size = 0;
script->buf = NULL;
#ifdef ENABLE_CASE_CHECK
- script->local_casecheck_clear();
+ script->local_casecheck.clear();
#endif // ENABLE_CASE_CHECK
return NULL;
}
@@ -2295,7 +2343,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
disp_error_message("unexpected end of script",p);
// Special handling only label
tmpp=script->skip_space(script->skip_word(p));
- if(*tmpp==':' && !(!strncasecmp(p,"default:",8) && p + 7 == tmpp)){
+ if(*tmpp==':' && !(strncmp(p,"default:",8) == 0 && p + 7 == tmpp)) {
i=script->add_word(p);
script->set_label(i,script->pos,p);
if( script->parse_options&SCRIPT_USE_LABEL_DB )
@@ -2387,7 +2435,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
code->script_size = script->size;
code->script_vars = NULL;
#ifdef ENABLE_CASE_CHECK
- script->local_casecheck_clear();
+ script->local_casecheck.clear();
#endif // ENABLE_CASE_CHECK
return code;
}
@@ -3637,7 +3685,7 @@ void run_script_main(struct script_state *st) {
break;
}
if( !st->freeloop && cmdcount>0 && (--cmdcount)<=0 ){
- ShowError("run_script: infinity loop !\n");
+ ShowError("run_script: too many opeartions being processed non-stop !\n");
script->reportsrc(st);
st->state=END;
}
@@ -3943,10 +3991,10 @@ void do_final_script(void) {
if( script->word_buf != NULL )
aFree(script->word_buf);
- if( script->local_casecheck_str_buf )
- aFree(script->local_casecheck_str_buf);
- if( script->local_casecheck_str_data )
- aFree(script->local_casecheck_str_data);
+#ifdef ENABLE_CASE_CHECK
+ script->global_casecheck.clear();
+ script->local_casecheck.clear();
+#endif // ENABLE_CASE_CHECK
ers_destroy(script->st_ers);
ers_destroy(script->stack_ers);
@@ -3964,7 +4012,7 @@ void do_init_script(bool minimal) {
script->userfunc_db = strdb_alloc(DB_OPT_DUP_KEY,0);
script->autobonus_db = strdb_alloc(DB_OPT_DUP_KEY,0);
- script->st_ers = ers_new(sizeof(struct script_state), "script.c::st_ers", ERS_OPT_NONE);
+ script->st_ers = ers_new(sizeof(struct script_state), "script.c::st_ers", ERS_OPT_CLEAN);
script->stack_ers = ers_new(sizeof(struct script_stack), "script.c::script_stack", ERS_OPT_NONE);
ers_chunk_size(script->st_ers, 10);
@@ -3984,6 +4032,10 @@ int script_reload(void) {
DBIterator *iter;
struct script_state *st;
+#ifdef ENABLE_CASE_CHECK
+ script->global_casecheck.clear();
+#endif // ENABLE_CASE_CHECK
+
iter = db_iterator(script->st_db);
for( st = dbi_first(iter); dbi_exists(iter); st = dbi_next(iter) ) {
@@ -4696,7 +4748,7 @@ BUILDIN(warp)
else if(strcmp(str,"SavePoint")==0 || strcmp(str,"Save")==0)
ret = pc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
else
- ret = pc->setpos(sd,mapindex_name2id(str),x,y,CLR_OUTSIGHT);
+ ret = pc->setpos(sd,mapindex->name2id(str),x,y,CLR_OUTSIGHT);
if( ret ) {
ShowError("buildin_warp: moving player '%s' to \"%s\",%d,%d failed.\n", sd->status.name, str, x, y);
@@ -4773,7 +4825,7 @@ BUILDIN(areawarp)
if( strcmp(str,"Random") == 0 )
index = 0;
- else if( !(index=mapindex_name2id(str)) )
+ else if( !(index=mapindex->name2id(str)) )
return true;
map->foreachinarea(script->buildin_areawarp_sub, m,x0,y0,x1,y1, BL_PC, index,x2,y2,x3,y3);
@@ -4837,7 +4889,7 @@ BUILDIN(warpchar) {
if(strcmp(str, "SavePoint") == 0)
pc->setpos(sd, sd->status.save_point.map,sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
else
- pc->setpos(sd, mapindex_name2id(str), x, y, CLR_TELEPORT);
+ pc->setpos(sd, mapindex->name2id(str), x, y, CLR_TELEPORT);
return true;
}
@@ -4852,7 +4904,7 @@ BUILDIN(warpparty)
TBL_PC *pl_sd;
struct party_data* p;
int type;
- int mapindex;
+ int map_index;
int i;
const char* str = script_getstr(st,2);
@@ -4880,19 +4932,19 @@ BUILDIN(warpparty)
if (i == MAX_PARTY || !p->data[i].sd) //Leader not found / not online
return true;
pl_sd = p->data[i].sd;
- mapindex = pl_sd->mapindex;
+ map_index = pl_sd->mapindex;
x = pl_sd->bl.x;
y = pl_sd->bl.y;
break;
case 4:
- mapindex = mapindex_name2id(str);
+ map_index = mapindex->name2id(str);
break;
case 2:
//"SavePoint" uses save point of the currently attached player
if (( sd = script->rid2sd(st) ) == NULL )
return true;
default:
- mapindex = 0;
+ map_index = 0;
break;
}
@@ -4923,7 +4975,7 @@ BUILDIN(warpparty)
case 3: // Leader
case 4: // m,x,y
if(!map->list[pl_sd->bl.m].flag.noreturn && !map->list[pl_sd->bl.m].flag.nowarp)
- pc->setpos(pl_sd,mapindex,x,y,CLR_TELEPORT);
+ pc->setpos(pl_sd,map_index,x,y,CLR_TELEPORT);
break;
}
}
@@ -4983,7 +5035,7 @@ BUILDIN(warpguild)
break;
case 3: // m,x,y
if(!map->list[pl_sd->bl.m].flag.noreturn && !map->list[pl_sd->bl.m].flag.nowarp)
- pc->setpos(pl_sd,mapindex_name2id(str),x,y,CLR_TELEPORT);
+ pc->setpos(pl_sd,mapindex->name2id(str),x,y,CLR_TELEPORT);
break;
}
}
@@ -6107,10 +6159,8 @@ BUILDIN(getitem)
*------------------------------------------*/
BUILDIN(getitem2)
{
- int nameid,amount,get_count,i,flag = 0, offset = 0;
+ int nameid,amount,i,flag = 0, offset = 0;
int iden,ref,attr,c1,c2,c3,c4, bound = 0;
- struct item_data *item_data;
- struct item item_tmp;
TBL_PC *sd;
struct script_data *data;
@@ -6163,8 +6213,10 @@ BUILDIN(getitem2)
}
if(nameid > 0) {
+ struct item item_tmp;
+ struct item_data *item_data = itemdb->exists(nameid);
+ int get_count;
memset(&item_tmp,0,sizeof(item_tmp));
- item_data=itemdb->exists(nameid);
if (item_data == NULL)
return -1;
if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR){
@@ -7938,7 +7990,7 @@ BUILDIN(getgmlevel)
if( sd == NULL )
return true;// no player attached, report source
- script_pushint(st, pc->get_group_level(sd));
+ script_pushint(st, pc_get_group_level(sd));
return true;
}
@@ -8278,7 +8330,7 @@ BUILDIN(savepoint) {
str = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
- mapid = mapindex_name2id(str);
+ mapid = mapindex->name2id(str);
if( mapid )
pc->setsavepoint(sd, mapid, x, y);
@@ -9274,12 +9326,12 @@ BUILDIN(announce) {
}
if (fontColor)
- clif->broadcast2(bl, mes, (int)strlen(mes)+1, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, target);
+ clif->broadcast2(bl, mes, (int)strlen(mes)+1, (unsigned int)strtoul(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, target);
else
clif->broadcast(bl, mes, (int)strlen(mes)+1, flag&BC_COLOR_MASK, target);
} else {
if (fontColor)
- intif->broadcast2(mes, (int)strlen(mes)+1, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY);
+ intif->broadcast2(mes, (int)strlen(mes)+1, (unsigned int)strtoul(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY);
else
intif->broadcast(mes, (int)strlen(mes)+1, flag&BC_COLOR_MASK);
}
@@ -9298,7 +9350,7 @@ int buildin_announce_sub(struct block_list *bl, va_list ap)
short fontAlign = (short)va_arg(ap, int);
short fontY = (short)va_arg(ap, int);
if (fontColor)
- clif->broadcast2(bl, mes, len, strtol(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, SELF);
+ clif->broadcast2(bl, mes, len, (unsigned int)strtoul(fontColor, (char **)NULL, 0), fontType, fontSize, fontAlign, fontY, SELF);
else
clif->broadcast(bl, mes, len, type, SELF);
return 0;
@@ -9432,11 +9484,11 @@ BUILDIN(getusersname)
sd = script->rid2sd(st);
if (!sd) return true;
- group_level = pc->get_group_level(sd);
+ group_level = pc_get_group_level(sd);
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
- if (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc->get_group_level(pl_sd) > group_level)
+ if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level)
continue; // skip hidden sessions
/* Temporary fix for bugreport:1023.
@@ -10376,7 +10428,7 @@ BUILDIN(warpwaitingpc) {
else if( strcmp(map_name,"SavePoint") == 0 )
pc->setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
else
- pc->setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT);
+ pc->setpos(sd, mapindex->name2id(map_name), x, y, CLR_OUTSIGHT);
}
mapreg->setreg(script->add_str("$@warpwaitingpcnum"), i);
return true;
@@ -10438,7 +10490,7 @@ BUILDIN(isloggedin) {
*------------------------------------------*/
BUILDIN(setmapflagnosave) {
int16 m,x,y;
- unsigned short mapindex;
+ unsigned short map_index;
const char *str,*str2;
str=script_getstr(st,2);
@@ -10446,11 +10498,11 @@ BUILDIN(setmapflagnosave) {
x=script_getnum(st,4);
y=script_getnum(st,5);
m = map->mapname2mapid(str);
- mapindex = mapindex_name2id(str2);
+ map_index = mapindex->name2id(str2);
- if(m >= 0 && mapindex) {
+ if(m >= 0 && map_index) {
map->list[m].flag.nosave=1;
- map->list[m].save.map=mapindex;
+ map->list[m].save.map=map_index;
map->list[m].save.x=x;
map->list[m].save.y=y;
}
@@ -10611,13 +10663,14 @@ BUILDIN(setmapflag) {
case MF_NORETURN: map->list[m].flag.noreturn = 1; break;
case MF_NOWARPTO: map->list[m].flag.nowarpto = 1; break;
case MF_NIGHTMAREDROP: map->list[m].flag.pvp_nightmaredrop = 1; break;
- case MF_ZONE: {
- char zone[6] = "zone\0";
- char empty[1] = "\0";
- char params[MAP_ZONE_MAPFLAG_LENGTH];
- memcpy(params, val2, MAP_ZONE_MAPFLAG_LENGTH);
- npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty);
- }
+ case MF_ZONE:
+ if( val2 ) {
+ char zone[6] = "zone\0";
+ char empty[1] = "\0";
+ char params[MAP_ZONE_MAPFLAG_LENGTH];
+ memcpy(params, val2, MAP_ZONE_MAPFLAG_LENGTH);
+ npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty);
+ }
break;
case MF_NOCOMMAND: map->list[m].nocommand = (val <= 0) ? 100 : val; break;
case MF_NODROP: map->list[m].flag.nodrop = 1; break;
@@ -11002,7 +11055,7 @@ BUILDIN(flagemblem) {
BUILDIN(getcastlename)
{
- const char* mapname = mapindex_getmapname(script_getstr(st,2),NULL);
+ const char* mapname = mapindex->getmapname(script_getstr(st,2),NULL);
struct guild_castle* gc = guild->mapname2gc(mapname);
const char* name = (gc) ? gc->castle_name : "";
script_pushstrcopy(st,name);
@@ -11011,7 +11064,7 @@ BUILDIN(getcastlename)
BUILDIN(getcastledata)
{
- const char *mapname = mapindex_getmapname(script_getstr(st,2),NULL);
+ const char *mapname = mapindex->getmapname(script_getstr(st,2),NULL);
int index = script_getnum(st,3);
struct guild_castle *gc = guild->mapname2gc(mapname);
@@ -11054,7 +11107,7 @@ BUILDIN(getcastledata)
BUILDIN(setcastledata)
{
- const char *mapname = mapindex_getmapname(script_getstr(st,2),NULL);
+ const char *mapname = mapindex->getmapname(script_getstr(st,2),NULL);
int index = script_getnum(st,3);
int value = script_getnum(st,4);
struct guild_castle *gc = guild->mapname2gc(mapname);
@@ -11285,7 +11338,7 @@ BUILDIN(mapwarp) {
if((m=map->mapname2mapid(mapname))< 0)
return true;
- if(!(index=mapindex_name2id(str)))
+ if(!(index=mapindex->name2id(str)))
return true;
switch(check_val){
@@ -11460,7 +11513,7 @@ BUILDIN(getfatherid)
BUILDIN(warppartner)
{
int x,y;
- unsigned short mapindex;
+ unsigned short map_index;
const char *str;
TBL_PC *sd=script->rid2sd(st);
TBL_PC *p_sd=NULL;
@@ -11475,9 +11528,9 @@ BUILDIN(warppartner)
x=script_getnum(st,3);
y=script_getnum(st,4);
- mapindex = mapindex_name2id(str);
- if (mapindex) {
- pc->setpos(p_sd,mapindex,x,y,CLR_OUTSIGHT);
+ map_index = mapindex->name2id(str);
+ if (map_index) {
+ pc->setpos(p_sd,map_index,x,y,CLR_OUTSIGHT);
script_pushint(st,1);
} else
script_pushint(st,0);
@@ -11597,7 +11650,7 @@ BUILDIN(delwall) {
/// 2 - current hp
///
BUILDIN(guardianinfo) {
- const char* mapname = mapindex_getmapname(script_getstr(st,2),NULL);
+ const char* mapname = mapindex->getmapname(script_getstr(st,2),NULL);
int id = script_getnum(st,3);
int type = script_getnum(st,4);
@@ -13443,7 +13496,7 @@ BUILDIN(insertchar)
if(index < 0)
index = 0;
else if(index > len)
- index = len;
+ index = (int)len;
output = (char*)aMalloc(len + 2);
@@ -13626,9 +13679,9 @@ BUILDIN(implode)
{
struct script_data* data = script_getdata(st, 2);
const char *glue = NULL, *name, *temp;
- int32 glue_len = 0, array_size, id;
- size_t len = 0;
- int i, k = 0;
+ int32 array_size, id;
+ size_t len = 0, glue_len = 0, k = 0;
+ int i;
TBL_PC* sd = NULL;
@@ -13723,13 +13776,14 @@ BUILDIN(implode)
//-------------------------------------------------------
BUILDIN(sprintf)
{
- unsigned int len, argc = 0, arg = 0, buf2_len = 0;
+ unsigned int argc = 0, arg = 0;
const char* format;
char* p;
char* q;
char* buf = NULL;
char* buf2 = NULL;
struct script_data* data;
+ size_t len, buf2_len = 0;
StringBuf final_buf;
// Fetch init data
@@ -13854,7 +13908,7 @@ BUILDIN(sprintf)
// Implements C sscanf.
//-------------------------------------------------------
BUILDIN(sscanf){
- unsigned int argc, arg = 0, len;
+ unsigned int argc, arg = 0;
struct script_data* data;
struct map_session_data* sd = NULL;
const char* str;
@@ -13865,6 +13919,7 @@ BUILDIN(sscanf){
char* buf_p;
char* ref_str = NULL;
int ref_int;
+ size_t len;
// Get data
str = script_getstr(st, 2);
@@ -15481,7 +15536,7 @@ BUILDIN(getvariableofnpc)
BUILDIN(warpportal) {
int spx;
int spy;
- unsigned short mapindex;
+ unsigned short map_index;
int tpx;
int tpy;
struct skill_unit_group* group;
@@ -15496,11 +15551,11 @@ BUILDIN(warpportal) {
spx = script_getnum(st,2);
spy = script_getnum(st,3);
- mapindex = mapindex_name2id(script_getstr(st, 4));
+ map_index = mapindex->name2id(script_getstr(st, 4));
tpx = script_getnum(st,5);
tpy = script_getnum(st,6);
- if( mapindex == 0 )
+ if( map_index == 0 )
return true;// map not found
group = skill->unitsetting(bl, AL_WARP, 4, spx, spy, 0);
@@ -15508,7 +15563,7 @@ BUILDIN(warpportal) {
return true;// failed
group->val1 = (group->val1<<16)|(short)0;
group->val2 = (tpx<<16) | tpy;
- group->val3 = mapindex;
+ group->val3 = map_index;
return true;
}
@@ -15780,13 +15835,13 @@ BUILDIN(readbook)
BUILDIN(questinfo)
{
struct npc_data *nd = map->id2nd(st->oid);
- int quest, icon, job, color = 0;
+ int quest_id, icon, job, color = 0;
struct questinfo qi;
if( nd == NULL || nd->bl.m == -1 )
return true;
- quest = script_getnum(st, 2);
+ quest_id = script_getnum(st, 2);
icon = script_getnum(st, 3);
#if PACKETVER >= 20120410
@@ -15799,7 +15854,7 @@ BUILDIN(questinfo)
icon = icon + 1;
#endif
- qi.quest_id = quest;
+ qi.quest_id = quest_id;
qi.icon = (unsigned char)icon;
qi.nd = nd;
@@ -15831,20 +15886,20 @@ BUILDIN(questinfo)
return true;
}
-BUILDIN(setquest)
-{
+BUILDIN(setquest) {
struct map_session_data *sd = script->rid2sd(st);
unsigned short i;
-
- if (!sd)
- return false;
+ int quest_id;
+ nullpo_retr(false,sd);
+
+ quest_id = script_getnum(st, 2);
- quest->add(sd, script_getnum(st, 2));
+ quest->add(sd, quest_id);
// If questinfo is set, remove quest bubble once quest is set.
for(i = 0; i < map->list[sd->bl.m].qi_count; i++) {
struct questinfo *qi = &map->list[sd->bl.m].qi_data[i];
- if( qi->quest_id == script_getnum(st, 2) ) {
+ if( qi->quest_id == quest_id ) {
#if PACKETVER >= 20120410
clif->quest_show_event(sd, &qi->nd->bl, 9999, 0);
#else
@@ -15856,8 +15911,7 @@ BUILDIN(setquest)
return true;
}
-BUILDIN(erasequest)
-{
+BUILDIN(erasequest) {
struct map_session_data *sd = script->rid2sd(st);
nullpo_retr(false,sd);
@@ -15865,8 +15919,7 @@ BUILDIN(erasequest)
return true;
}
-BUILDIN(completequest)
-{
+BUILDIN(completequest) {
struct map_session_data *sd = script->rid2sd(st);
nullpo_retr(false,sd);
@@ -15874,8 +15927,7 @@ BUILDIN(completequest)
return true;
}
-BUILDIN(changequest)
-{
+BUILDIN(changequest) {
struct map_session_data *sd = script->rid2sd(st);
nullpo_retr(false,sd);
@@ -15883,15 +15935,14 @@ BUILDIN(changequest)
return true;
}
-BUILDIN(checkquest)
-{
+BUILDIN(checkquest) {
struct map_session_data *sd = script->rid2sd(st);
- quest_check_type type = HAVEQUEST;
+ enum quest_check_type type = HAVEQUEST;
nullpo_retr(false,sd);
if( script_hasdata(st, 3) )
- type = (quest_check_type)script_getnum(st, 3);
+ type = (enum quest_check_type)script_getnum(st, 3);
script_pushint(st, quest->check(sd, script_getnum(st, 2), type));
@@ -15937,7 +15988,7 @@ BUILDIN(waitingroom2bg) {
struct npc_data *nd;
struct chat_data *cd;
const char *map_name, *ev = "", *dev = "";
- int x, y, i, mapindex = 0, bg_id, n;
+ int x, y, i, map_index = 0, bg_id, n;
struct map_session_data *sd;
if( script_hasdata(st,7) )
@@ -15953,8 +16004,8 @@ BUILDIN(waitingroom2bg) {
map_name = script_getstr(st,2);
if( strcmp(map_name,"-") != 0 )
{
- mapindex = mapindex_name2id(map_name);
- if( mapindex == 0 )
+ map_index = mapindex->name2id(map_name);
+ if( map_index == 0 )
{ // Invalid Map
script_pushint(st,0);
return true;
@@ -15966,7 +16017,7 @@ BUILDIN(waitingroom2bg) {
ev = script_getstr(st,5); // Logout Event
dev = script_getstr(st,6); // Die Event
- if( (bg_id = bg->create(mapindex, x, y, ev, dev)) == 0 )
+ if( (bg_id = bg->create(map_index, x, y, ev, dev)) == 0 )
{ // Creation failed
script_pushint(st,0);
return true;
@@ -15991,11 +16042,11 @@ BUILDIN(waitingroom2bg_single) {
struct npc_data *nd;
struct chat_data *cd;
struct map_session_data *sd;
- int x, y, mapindex, bg_id;
+ int x, y, map_index, bg_id;
bg_id = script_getnum(st,2);
map_name = script_getstr(st,3);
- if( (mapindex = mapindex_name2id(map_name)) == 0 )
+ if( (map_index = mapindex->name2id(map_name)) == 0 )
return true; // Invalid Map
x = script_getnum(st,4);
@@ -16010,7 +16061,7 @@ BUILDIN(waitingroom2bg_single) {
if( bg->team_join(bg_id, sd) )
{
- pc->setpos(sd, mapindex, x, y, CLR_TELEPORT);
+ pc->setpos(sd, map_index, x, y, CLR_TELEPORT);
script_pushint(st,1);
}
else
@@ -16035,16 +16086,16 @@ BUILDIN(bg_team_setxy)
BUILDIN(bg_warp)
{
- int x, y, mapindex, bg_id;
+ int x, y, map_index, bg_id;
const char* map_name;
bg_id = script_getnum(st,2);
map_name = script_getstr(st,3);
- if( (mapindex = mapindex_name2id(map_name)) == 0 )
+ if( (map_index = mapindex->name2id(map_name)) == 0 )
return true; // Invalid Map
x = script_getnum(st,4);
y = script_getnum(st,5);
- bg->team_warp(bg_id, mapindex, x, y);
+ bg->team_warp(bg_id, map_index, x, y);
return true;
}
@@ -16447,11 +16498,11 @@ BUILDIN(has_instance) {
}
int buildin_instance_warpall_sub(struct block_list *bl,va_list ap) {
struct map_session_data *sd = ((TBL_PC*)bl);
- int mapindex = va_arg(ap,int);
+ int map_index = va_arg(ap,int);
int x = va_arg(ap,int);
int y = va_arg(ap,int);
- pc->setpos(sd,mapindex,x,y,CLR_TELEPORT);
+ pc->setpos(sd,map_index,x,y,CLR_TELEPORT);
return 0;
}
@@ -16460,7 +16511,7 @@ BUILDIN(instance_warpall) {
int instance_id = -1;
const char *mapn;
int x, y;
- int mapindex;
+ int map_index;
mapn = script_getstr(st,2);
x = script_getnum(st,3);
@@ -16476,9 +16527,9 @@ BUILDIN(instance_warpall) {
if( (m = map->mapname2mapid(mapn)) < 0 || (map->list[m].flag.src4instance && (m = instance->mapid2imapid(m, instance_id)) < 0) )
return true;
- mapindex = map_id2index(m);
+ map_index = map_id2index(m);
- map->foreachininstance(script->buildin_instance_warpall_sub, instance_id, BL_PC,mapindex,x,y);
+ map->foreachininstance(script->buildin_instance_warpall_sub, instance_id, BL_PC,map_index,x,y);
return true;
}
@@ -16649,7 +16700,7 @@ BUILDIN(progressbar)
sd->progressbar.timeout = timer->gettick() + second*1000;
sd->state.workinprogress = 3;
- clif->progressbar(sd, strtol(color, (char **)NULL, 0), second);
+ clif->progressbar(sd, (unsigned int)strtoul(color, (char **)NULL, 0), second);
return true;
}
@@ -17804,12 +17855,12 @@ BUILDIN(packageitem) {
/* returns created team id or -1 when fails */
BUILDIN(bg_create_team) {
const char *map_name, *ev = "", *dev = "";//ev and dev will be dropped.
- int x, y, mapindex = 0, bg_id;
+ int x, y, map_index = 0, bg_id;
map_name = script_getstr(st,2);
if( strcmp(map_name,"-") != 0 ) {
- mapindex = mapindex_name2id(map_name);
- if( mapindex == 0 ) { // Invalid Map
+ map_index = mapindex->name2id(map_name);
+ if( map_index == 0 ) { // Invalid Map
script_pushint(st,0);
return true;
}
@@ -17818,7 +17869,7 @@ BUILDIN(bg_create_team) {
x = script_getnum(st,3);
y = script_getnum(st,4);
- if( (bg_id = bg->create(mapindex, x, y, ev, dev)) == 0 ) { // Creation failed
+ if( (bg_id = bg->create(map_index, x, y, ev, dev)) == 0 ) { // Creation failed
script_pushint(st,-1);
} else
script_pushint(st,bg_id);
@@ -17970,45 +18021,97 @@ BUILDIN(instance_set_respawn) {
BUILDIN(deletepset);
#endif
-bool script_hp_add(char *name, char *args, bool (*func)(struct script_state *st)) {
- int n = script->add_str(name), i = 0;
-
- if( script->str_data[n].type == C_FUNC ) {
- script->str_data[n].func = func;
- i = script->str_data[n].val;
- if( args ) {
- int slen = strlen(args);
- if( script->buildin[i] ) {
- aFree(script->buildin[i]);
- }
- CREATE(script->buildin[i], char, slen + 1);
- safestrncpy(script->buildin[i], args, slen + 1);
- } else {
- if( script->buildin[i] )
- aFree(script->buildin[i]);
- script->buildin[i] = NULL;
+/**
+ * Adds a built-in script function.
+ *
+ * @param buildin Script function data
+ * @param force Whether to override an existing function with the same name
+ * (i.e. a plugin overriding a built-in function)
+ * @return Whether the function was successfully added.
+ */
+bool script_add_builtin(const struct script_function *buildin, bool override) {
+ int n = 0, offset = 0;
+ size_t slen;
+ if( !buildin ) {
+ return false;
+ }
+ if( buildin->arg ) {
+ // arg must follow the pattern: (v|s|i|r|l)*\?*\*?
+ // 'v' - value (either string or int or reference)
+ // 's' - string
+ // 'i' - int
+ // 'r' - reference (of a variable)
+ // 'l' - label
+ // '?' - one optional parameter
+ // '*' - unknown number of optional parameters
+ char *p = buildin->arg;
+ while( *p == 'v' || *p == 's' || *p == 'i' || *p == 'r' || *p == 'l' ) ++p;
+ while( *p == '?' ) ++p;
+ if( *p == '*' ) ++p;
+ if( *p != 0 ) {
+ ShowWarning("add_builtin: ignoring function \"%s\" with invalid arg \"%s\".\n", buildin->name, buildin->arg);
+ return false;
}
+ }
+ if( !buildin->name || *script->skip_word(buildin->name) != 0 ) {
+ ShowWarning("add_builtin: ignoring function with invalid name \"%s\" (must be a word).\n", buildin->name);
+ return false;
+ }
+ if ( !buildin->func ) {
+ ShowWarning("add_builtin: ignoring function \"%s\" with invalid source function.\n", buildin->name);
+ return false;
+ }
+ slen = buildin->arg ? strlen(buildin->arg) : 0;
+ n = script->add_str(buildin->name);
+ if( !override && script->str_data[n].func && script->str_data[n].func != buildin->func ) {
+ return false; /* something replaced it, skip. */
+ }
+
+ if( override && script->str_data[n].type == C_FUNC ) {
+ // Overriding
+ offset = script->str_data[n].val;
+ if( script->buildin[offset] )
+ aFree(script->buildin[offset]);
+ script->buildin[offset] = NULL;
} else {
- i = script->buildin_count;
+ // Adding new function
+ if( strcmp(buildin->name, "setr") == 0 ) script->buildin_set_ref = n;
+ else if( strcmp(buildin->name, "callsub") == 0 ) script->buildin_callsub_ref = n;
+ else if( strcmp(buildin->name, "callfunc") == 0 ) script->buildin_callfunc_ref = n;
+ else if( strcmp(buildin->name, "getelementofarray") == 0 ) script->buildin_getelementofarray_ref = n;
+
+ offset = script->buildin_count;
+
script->str_data[n].type = C_FUNC;
- script->str_data[n].val = i;
- script->str_data[n].func = func;
-
+ script->str_data[n].val = offset;
+
+ // Note: This is a no-op if script->buildin is already large enough
+ // (it'll only have effect when a plugin adds a new command)
RECREATE(script->buildin, char *, ++script->buildin_count);
-
- /* we only store the arguments, its the only thing used out of this */
- if( args != NULL ) {
- int slen = strlen(args);
- CREATE(script->buildin[i], char, slen + 1);
- safestrncpy(script->buildin[i], args, slen + 1);
- } else
- script->buildin[i] = NULL;
}
-
+
+ script->str_data[n].func = buildin->func;
+
+ /* we only store the arguments, its the only thing used out of this */
+ if( slen ) {
+ CREATE(script->buildin[offset], char, slen + 1);
+ safestrncpy(script->buildin[offset], buildin->arg, slen + 1);
+ } else {
+ script->buildin[offset] = NULL;
+ }
+
return true;
}
+bool script_hp_add(char *name, char *args, bool (*func)(struct script_state *st)) {
+ struct script_function buildin;
+ buildin.name = name;
+ buildin.arg = args;
+ buildin.func = func;
+ return script->add_builtin(&buildin, 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) {
@@ -18507,52 +18610,11 @@ void script_parse_builtin(void) {
BUILDIN_DEF(bg_join_team,"i?"),
BUILDIN_DEF(bg_match_over,"s?"),
};
- int i,n, len = ARRAYLENGTH(BUILDIN), start = script->buildin_count;
- char* p;
- RECREATE(script->buildin, char *, start + len);
+ int i, len = ARRAYLENGTH(BUILDIN);
+ RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up
+ memset(script->buildin + script->buildin_count, '\0', sizeof(char *) * len);
for( i = 0; i < len; i++ ) {
- // arg must follow the pattern: (v|s|i|r|l)*\?*\*?
- // 'v' - value (either string or int or reference)
- // 's' - string
- // 'i' - int
- // 'r' - reference (of a variable)
- // 'l' - label
- // '?' - one optional parameter
- // '*' - unknown number of optional parameters
- p = BUILDIN[i].arg;
- while( *p == 'v' || *p == 's' || *p == 'i' || *p == 'r' || *p == 'l' ) ++p;
- while( *p == '?' ) ++p;
- if( *p == '*' ) ++p;
- if( *p != 0 ){
- ShowWarning("parse_builtin: ignoring function \"%s\" with invalid arg \"%s\".\n", BUILDIN[i].name, BUILDIN[i].arg);
- } else if( *script->skip_word(BUILDIN[i].name) != 0 ){
- ShowWarning("parse_builtin: ignoring function with invalid name \"%s\" (must be a word).\n", BUILDIN[i].name);
- } else {
- int slen = strlen(BUILDIN[i].arg), offset = start + i;
- n = script->add_str(BUILDIN[i].name);
-
- if (!strcmp(BUILDIN[i].name, "setr")) script->buildin_set_ref = n;
- else if (!strcmp(BUILDIN[i].name, "callsub")) script->buildin_callsub_ref = n;
- else if (!strcmp(BUILDIN[i].name, "callfunc")) script->buildin_callfunc_ref = n;
- else if (!strcmp(BUILDIN[i].name, "getelementofarray") ) script->buildin_getelementofarray_ref = n;
-
- if( script->str_data[n].func && script->str_data[n].func != BUILDIN[i].func )
- continue;/* something replaced it, skip. */
-
- script->str_data[n].type = C_FUNC;
- script->str_data[n].val = offset;
- script->str_data[n].func = BUILDIN[i].func;
-
- /* we only store the arguments, its the only thing used out of this */
- if( slen ) {
- CREATE(script->buildin[offset], char, slen + 1);
- safestrncpy(script->buildin[offset], BUILDIN[i].arg, slen + 1);
- } else
- script->buildin[offset] = NULL;
-
- script->buildin_count++;
-
- }
+ script->add_builtin(&BUILDIN[i], false);
}
}
#undef BUILDIN_DEF
@@ -18645,6 +18707,7 @@ void script_defaults(void) {
/* parse */
script->parse = parse_script;
+ script->add_builtin = script_add_builtin;
script->parse_builtin = script_parse_builtin;
script->skip_space = script_skip_space;
script->error = script_error;
@@ -18703,7 +18766,6 @@ void script_defaults(void) {
script->reportsrc = script_reportsrc;
script->reportdata = script_reportdata;
script->reportfunc = script_reportfunc;
- script->disp_error_message2 = disp_error_message2;
script->disp_warning_message = disp_warning_message;
script->check_event = check_event;
script->calc_hash = calc_hash;
@@ -18784,14 +18846,24 @@ void script_defaults(void) {
script->config.ontouch2_name = "OnTouch";//ontouch2_name (run whenever a char walks into the OnTouch area)
// for ENABLE_CASE_CHECK
- script->local_casecheck_add_str = script_local_casecheck_add_str;
- script->local_casecheck_clear = script_local_casecheck_clear;
- script->local_casecheck_str_data = NULL;
- script->local_casecheck_str_data_size = 0;
- script->local_casecheck_str_num = 1;
- script->local_casecheck_str_buf = NULL;
- script->local_casecheck_str_size = 0;
- script->local_casecheck_str_pos = 0;
- memset(script->local_casecheck_str_hash, 0, sizeof(script->local_casecheck_str_hash));
+ script->calc_hash_ci = calc_hash_ci;
+ script->local_casecheck.add_str = script_local_casecheck_add_str;
+ script->local_casecheck.clear = script_local_casecheck_clear;
+ script->local_casecheck.str_data = NULL;
+ script->local_casecheck.str_data_size = 0;
+ script->local_casecheck.str_num = 1;
+ script->local_casecheck.str_buf = NULL;
+ script->local_casecheck.str_size = 0;
+ script->local_casecheck.str_pos = 0;
+ memset(script->local_casecheck.str_hash, 0, sizeof(script->local_casecheck.str_hash));
+ script->global_casecheck.add_str = script_global_casecheck_add_str;
+ script->global_casecheck.clear = script_global_casecheck_clear;
+ script->global_casecheck.str_data = NULL;
+ script->global_casecheck.str_data_size = 0;
+ script->global_casecheck.str_num = 1;
+ script->global_casecheck.str_buf = NULL;
+ script->global_casecheck.str_size = 0;
+ script->global_casecheck.str_pos = 0;
+ memset(script->global_casecheck.str_hash, 0, sizeof(script->global_casecheck.str_hash));
// end ENABLE_CASE_CHECK
}
diff --git a/src/map/script.h b/src/map/script.h
index 75a57d82b..8076ea02e 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -22,9 +22,9 @@ struct eri;
**/
// TODO: Remove temporary code
#define ENABLE_CASE_CHECK
-#define DeprecationWarning(func, bad, good, file, line) ShowWarning("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'. This will be a critical error in a near future.\n", (func), (bad), (good), (file), (line));
-#define DeprecationWarning2(func, bad, good, where) ShowWarning("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s'). This will become fatal in a near future.\n", (func), (bad), (good), (where));
-#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead). This will be a critical error in a near future.", (p));
+#define DeprecationWarning(func, bad, good, file, line) ShowError("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'.\n", (func), (bad), (good), (file), (line));
+#define DeprecationWarning2(func, bad, good, where) ShowError("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s').\n", (func), (bad), (good), (where));
+#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead).", (p));
#define NUM_WHISPER_VAR 10
@@ -443,6 +443,19 @@ struct script_syntax_data {
int index; // Number of the syntax used in the script
};
+struct casecheck_data {
+ struct str_data_struct *str_data;
+ int str_data_size; // size of the data
+ int str_num; // next id to be assigned
+ // str_buf holds the strings themselves
+ char *str_buf;
+ int str_size; // size of the buffer
+ int str_pos; // next position to be assigned
+ int str_hash[SCRIPT_HASH_SIZE];
+ const char *(*add_str) (const char* p);
+ void (*clear) (void);
+};
+
/**
* Interface
**/
@@ -467,12 +480,12 @@ struct script_interface {
int str_num; // next id to be assigned
// str_buf holds the strings themselves
char *str_buf;
- int str_size; // size of the buffer
+ size_t str_size; // size of the buffer
int str_pos; // next position to be assigned
int str_hash[SCRIPT_HASH_SIZE];
/* */
char *word_buf;
- int word_size;
+ size_t word_size;
/* */
unsigned short current_item_id;
/* */
@@ -522,6 +535,7 @@ struct script_interface {
int (*reload) (void);
/* parse */
struct script_code* (*parse) (const char* src,const char* file,int line,int options);
+ bool (*add_builtin) (const struct script_function *buildin, bool override);
void (*parse_builtin) (void);
const char* (*parse_subexpr) (const char* p,int limit);
const char* (*skip_space) (const char* p);
@@ -580,7 +594,6 @@ struct script_interface {
void (*reportsrc) (struct script_state *st);
void (*reportdata) (struct script_data *data);
void (*reportfunc) (struct script_state *st);
- void (*disp_error_message2) (const char *mes, const char *pos, int report);
void (*disp_warning_message) (const char *mes, const char *pos);
void (*check_event) (struct script_state *st, const char *evt);
unsigned int (*calc_hash) (const char *p);
@@ -642,16 +655,9 @@ struct script_interface {
int (*run_func) (struct script_state *st);
const char *(*getfuncname) (struct script_state *st);
// for ENABLE_CASE_CHECK
- struct str_data_struct *local_casecheck_str_data;
- int local_casecheck_str_data_size; // size of the data
- int local_casecheck_str_num; // next id to be assigned
- // str_buf holds the strings themselves
- char *local_casecheck_str_buf;
- int local_casecheck_str_size; // size of the buffer
- int local_casecheck_str_pos; // next position to be assigned
- int local_casecheck_str_hash[SCRIPT_HASH_SIZE];
- bool (*local_casecheck_add_str) (const char* p, int h);
- void (*local_casecheck_clear) (void);
+ unsigned int (*calc_hash_ci) (const char *p);
+ struct casecheck_data local_casecheck;
+ struct casecheck_data global_casecheck;
// end ENABLE_CASE_CHECK
};
diff --git a/src/map/skill.c b/src/map/skill.c
index 45d06c97a..71e343db0 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -328,6 +328,8 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk
struct map_session_data *tsd = BL_CAST(BL_PC, target);
struct status_change* sc;
+ nullpo_ret(src);
+
switch( skill_id ) {
case BA_APPLEIDUN:
#ifdef RENEWAL
@@ -444,7 +446,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
if (idx == 0)
return 1; // invalid skill id
- if (pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL))
+ if (pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL))
return 0; // can do any damn thing they want
if( skill_id == AL_TELEPORT && sd->skillitem == skill_id && sd->skillitemlv > 2 )
@@ -1434,7 +1436,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
if( sd && !status->isdead(bl) && sd->autospell[0].id ) {
struct block_list *tbl;
struct unit_data *ud;
- int i, skill_lv, type, notok;
+ int i, auto_skill_lv, type, notok;
for (i = 0; i < ARRAYLENGTH(sd->autospell) && sd->autospell[i].id; i++) {
@@ -1452,8 +1454,8 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
if ( notok )
continue;
- skill_lv = sd->autospell[i].lv?sd->autospell[i].lv:1;
- if (skill_lv < 0) skill_lv = 1+rnd()%(-skill_lv);
+ auto_skill_lv = sd->autospell[i].lv?sd->autospell[i].lv:1;
+ if (auto_skill_lv < 0) auto_skill_lv = 1+rnd()%(-auto_skill_lv);
rate = (!sd->state.arrow_atk) ? sd->autospell[i].rate : sd->autospell[i].rate / 2;
@@ -1466,18 +1468,18 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
int maxcount = 0;
if( !(BL_PC&battle_config.skill_reiteration) &&
skill->get_unit_flag(temp)&UF_NOREITERATION &&
- skill->check_unit_range(src,tbl->x,tbl->y,temp,skill_lv)
+ skill->check_unit_range(src,tbl->x,tbl->y,temp,auto_skill_lv)
) {
continue;
}
if( BL_PC&battle_config.skill_nofootset &&
skill->get_unit_flag(temp)&UF_NOFOOTSET &&
- skill->check_unit_range2(src,tbl->x,tbl->y,temp,skill_lv)
+ skill->check_unit_range2(src,tbl->x,tbl->y,temp,auto_skill_lv)
) {
continue;
}
if( BL_PC&battle_config.land_skill_limit &&
- (maxcount = skill->get_maxcount(temp, skill_lv)) > 0
+ (maxcount = skill->get_maxcount(temp, auto_skill_lv)) > 0
) {
int v;
for(v=0;v<MAX_SKILLUNITGROUP && sd->ud.skillunit[v] && maxcount;v++) {
@@ -1490,7 +1492,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
}
}
if( battle_config.autospell_check_range &&
- !battle->check_range(src, tbl, skill->get_range2(src, temp,skill_lv) + (temp == RG_CLOSECONFINE?0:1)) )
+ !battle->check_range(src, tbl, skill->get_range2(src, temp,auto_skill_lv) + (temp == RG_CLOSECONFINE?0:1)) )
continue;
if (temp == AS_SONICBLOW)
@@ -1499,24 +1501,24 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
type = CAST_GROUND;
sd->state.autocast = 1;
- skill->consume_requirement(sd,temp,skill_lv,1);
+ skill->consume_requirement(sd,temp,auto_skill_lv,1);
skill->toggle_magicpower(src, temp);
switch (type) {
case CAST_GROUND:
- skill->castend_pos2(src, tbl->x, tbl->y, temp, skill_lv, tick, 0);
+ skill->castend_pos2(src, tbl->x, tbl->y, temp, auto_skill_lv, tick, 0);
break;
case CAST_NODAMAGE:
- skill->castend_nodamage_id(src, tbl, temp, skill_lv, tick, 0);
+ skill->castend_nodamage_id(src, tbl, temp, auto_skill_lv, tick, 0);
break;
case CAST_DAMAGE:
- skill->castend_damage_id(src, tbl, temp, skill_lv, tick, 0);
+ skill->castend_damage_id(src, tbl, temp, auto_skill_lv, tick, 0);
break;
}
sd->state.autocast = 0;
//Set canact delay. [Skotlex]
ud = unit->bl2ud(src);
if (ud) {
- rate = skill->delay_fix(src, temp, skill_lv);
+ rate = skill->delay_fix(src, temp, auto_skill_lv);
if (DIFF_TICK(ud->canact_tick, tick + rate) < 0){
ud->canact_tick = tick+rate;
if ( battle_config.display_status_timers && sd )
@@ -1779,7 +1781,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
if(dstsd && !status->isdead(bl) && dstsd->autospell2[0].id && !(skill_id && skill->get_nk(skill_id)&NK_NO_DAMAGE)) {
struct block_list *tbl;
struct unit_data *ud;
- int i, skill_id, skill_lv, rate, type, notok;
+ int i, auto_skill_id, auto_skill_lv, type, notok;
for (i = 0; i < ARRAYLENGTH(dstsd->autospell2) && dstsd->autospell2[i].id; i++) {
@@ -1788,16 +1790,16 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
dstsd->autospell2[i].flag&attack_type&BF_SKILLMASK))
continue; // one or more trigger conditions were not fulfilled
- skill_id = (dstsd->autospell2[i].id > 0) ? dstsd->autospell2[i].id : -dstsd->autospell2[i].id;
- skill_lv = dstsd->autospell2[i].lv?dstsd->autospell2[i].lv:1;
- if (skill_lv < 0) skill_lv = 1+rnd()%(-skill_lv);
+ auto_skill_id = (dstsd->autospell2[i].id > 0) ? dstsd->autospell2[i].id : -dstsd->autospell2[i].id;
+ auto_skill_lv = dstsd->autospell2[i].lv?dstsd->autospell2[i].lv:1;
+ if (auto_skill_lv < 0) auto_skill_lv = 1+rnd()%(-auto_skill_lv);
rate = dstsd->autospell2[i].rate;
if (attack_type&BF_LONG)
rate>>=1;
dstsd->state.autocast = 1;
- notok = skill->not_ok(skill_id, dstsd);
+ notok = skill->not_ok(auto_skill_id, dstsd);
dstsd->state.autocast = 0;
if ( notok )
@@ -1808,26 +1810,26 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
tbl = (dstsd->autospell2[i].id < 0) ? bl : src;
- if( (type = skill->get_casttype(skill_id)) == CAST_GROUND ) {
+ if( (type = skill->get_casttype(auto_skill_id)) == CAST_GROUND ) {
int maxcount = 0;
if( !(BL_PC&battle_config.skill_reiteration) &&
- skill->get_unit_flag(skill_id)&UF_NOREITERATION &&
- skill->check_unit_range(bl,tbl->x,tbl->y,skill_id,skill_lv)
+ skill->get_unit_flag(auto_skill_id)&UF_NOREITERATION &&
+ skill->check_unit_range(bl,tbl->x,tbl->y,auto_skill_id,auto_skill_lv)
) {
continue;
}
if( BL_PC&battle_config.skill_nofootset &&
- skill->get_unit_flag(skill_id)&UF_NOFOOTSET &&
- skill->check_unit_range2(bl,tbl->x,tbl->y,skill_id,skill_lv)
+ skill->get_unit_flag(auto_skill_id)&UF_NOFOOTSET &&
+ skill->check_unit_range2(bl,tbl->x,tbl->y,auto_skill_id,auto_skill_lv)
) {
continue;
}
if( BL_PC&battle_config.land_skill_limit &&
- (maxcount = skill->get_maxcount(skill_id, skill_lv)) > 0
+ (maxcount = skill->get_maxcount(auto_skill_id, auto_skill_lv)) > 0
) {
int v;
for(v=0;v<MAX_SKILLUNITGROUP && dstsd->ud.skillunit[v] && maxcount;v++) {
- if(dstsd->ud.skillunit[v]->skill_id == skill_id)
+ if(dstsd->ud.skillunit[v]->skill_id == auto_skill_id)
maxcount--;
}
if( maxcount == 0 ) {
@@ -1836,27 +1838,27 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b
}
}
- if( !battle->check_range(src, tbl, skill->get_range2(src, skill_id,skill_lv) + (skill_id == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range )
+ if( !battle->check_range(src, tbl, skill->get_range2(src, auto_skill_id,auto_skill_lv) + (auto_skill_id == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range )
continue;
dstsd->state.autocast = 1;
- skill->consume_requirement(dstsd,skill_id,skill_lv,1);
+ skill->consume_requirement(dstsd,auto_skill_id,auto_skill_lv,1);
switch (type) {
case CAST_GROUND:
- skill->castend_pos2(bl, tbl->x, tbl->y, skill_id, skill_lv, tick, 0);
+ skill->castend_pos2(bl, tbl->x, tbl->y, auto_skill_id, auto_skill_lv, tick, 0);
break;
case CAST_NODAMAGE:
- skill->castend_nodamage_id(bl, tbl, skill_id, skill_lv, tick, 0);
+ skill->castend_nodamage_id(bl, tbl, auto_skill_id, auto_skill_lv, tick, 0);
break;
case CAST_DAMAGE:
- skill->castend_damage_id(bl, tbl, skill_id, skill_lv, tick, 0);
+ skill->castend_damage_id(bl, tbl, auto_skill_id, auto_skill_lv, tick, 0);
break;
}
dstsd->state.autocast = 0;
//Set canact delay. [Skotlex]
ud = unit->bl2ud(bl);
if (ud) {
- rate = skill->delay_fix(bl, skill_id, skill_lv);
+ rate = skill->delay_fix(bl, auto_skill_id, auto_skill_lv);
if (DIFF_TICK(ud->canact_tick, tick + rate) < 0){
ud->canact_tick = tick+rate;
if ( battle_config.display_status_timers && dstsd )
@@ -2276,7 +2278,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
}
if(sd) {
- int flag = 0; //Used to signal if this skill can be combo'ed later on.
+ int combo = 0; //Used to signal if this skill can be combo'ed later on.
struct status_change_entry *sce;
if ((sce = sd->sc.data[SC_COMBOATTACK])) {//End combo state after skill is invoked. [Skotlex]
switch (skill_id) {
@@ -2302,23 +2304,23 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
switch(skill_id) {
case MO_TRIPLEATTACK:
if (pc->checkskill(sd, MO_CHAINCOMBO) > 0 || pc->checkskill(sd, SR_DRAGONCOMBO) > 0)
- flag=1;
+ combo=1;
break;
case MO_CHAINCOMBO:
if(pc->checkskill(sd, MO_COMBOFINISH) > 0 && sd->spiritball > 0)
- flag=1;
+ combo=1;
break;
case MO_COMBOFINISH:
if (sd->status.party_id>0) //bonus from SG_FRIEND [Komurka]
party->skill_check(sd, sd->status.party_id, MO_COMBOFINISH, skill_lv);
if (pc->checkskill(sd, CH_TIGERFIST) > 0 && sd->spiritball > 0)
- flag=1;
+ combo=1;
case CH_TIGERFIST:
- if (!flag && pc->checkskill(sd, CH_CHAINCRUSH) > 0 && sd->spiritball > 1)
- flag=1;
+ if (!combo && pc->checkskill(sd, CH_CHAINCRUSH) > 0 && sd->spiritball > 1)
+ combo=1;
case CH_CHAINCRUSH:
- if (!flag && pc->checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball > 0 && sd->sc.data[SC_EXPLOSIONSPIRITS])
- flag=1;
+ if (!combo && pc->checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball > 0 && sd->sc.data[SC_EXPLOSIONSPIRITS])
+ combo=1;
break;
case AC_DOUBLE:
if( (tstatus->race == RC_BRUTE || tstatus->race == RC_INSECT) && pc->checkskill(sd, HT_POWER))
@@ -2346,21 +2348,21 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
break;
case TK_DODGE:
if( pc->checkskill(sd, TK_JUMPKICK) > 0 )
- flag = 1;
+ combo = 1;
break;
case SR_DRAGONCOMBO:
if( pc->checkskill(sd, SR_FALLENEMPIRE) > 0 )
- flag = 1;
+ combo = 1;
break;
case SR_FALLENEMPIRE:
if( pc->checkskill(sd, SR_TIGERCANNON) > 0 || pc->checkskill(sd, SR_GATEOFHELL) > 0 )
- flag = 1;
+ combo = 1;
break;
} //Switch End
- if (flag) { //Possible to chain
- if ( (flag = DIFF_TICK32(sd->ud.canact_tick, tick)) < 50 ) flag = 50;/* less is a waste. */
- sc_start2(src,SC_COMBOATTACK,100,skill_id,bl->id,flag);
- clif->combo_delay(src, flag);
+ if (combo) { //Possible to chain
+ if ( (combo = DIFF_TICK32(sd->ud.canact_tick, tick)) < 50 ) combo = 50;/* less is a waste. */
+ sc_start2(src,SC_COMBOATTACK,100,skill_id,bl->id,combo);
+ clif->combo_delay(src, combo);
}
}
@@ -3198,7 +3200,7 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
break;
case GN_SPORE_EXPLOSION:
map->foreachinrange(skill->area_sub, target, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR,
- src, skl->skill_id, skl->skill_lv, 0, skl->flag|1|BCT_ENEMY, skill->castend_damage_id);
+ src, skl->skill_id, skl->skill_lv, (int64)0, skl->flag|1|BCT_ENEMY, skill->castend_damage_id);
break;
case SR_FLASHCOMBO_ATK_STEP1:
case SR_FLASHCOMBO_ATK_STEP2:
@@ -4171,7 +4173,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
skill->toggle_magicpower(src, skill_id);
// Priority is to release SpellBook
if( sc && sc->data[SC_READING_SB] ) { // SpellBook
- uint16 skill_id, skill_lv, point, s = 0;
+ uint16 spell_skill_id, spell_skill_lv, point, s = 0;
int spell[SC_SPELLBOOK7-SC_SPELLBOOK1 + 1];
for(i = SC_SPELLBOOK7; i >= SC_SPELLBOOK1; i--) // List all available spell to be released
@@ -4182,8 +4184,8 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
i = spell[s==1?0:rand()%s];// Random select of spell to be released.
if( s && sc->data[i] ){// Now extract the data from the preserved spell
- skill_id = sc->data[i]->val1;
- skill_lv = sc->data[i]->val2;
+ spell_skill_id = sc->data[i]->val1;
+ spell_skill_lv = sc->data[i]->val2;
point = sc->data[i]->val3;
status_change_end(src, (sc_type)i, INVALID_TIMER);
}else //something went wrong :(
@@ -4194,36 +4196,35 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
else // Last spell to be released
status_change_end(src, SC_READING_SB, INVALID_TIMER);
- if( !skill->check_condition_castbegin(sd, skill_id, skill_lv) )
+ if( !skill->check_condition_castbegin(sd, spell_skill_id, spell_skill_lv) )
break;
- switch( skill->get_casttype(skill_id) ) {
+ switch( skill->get_casttype(spell_skill_id) ) {
case CAST_GROUND:
- skill->castend_pos2(src, bl->x, bl->y, skill_id, skill_lv, tick, 0);
+ skill->castend_pos2(src, bl->x, bl->y, spell_skill_id, spell_skill_lv, tick, 0);
break;
case CAST_NODAMAGE:
- skill->castend_nodamage_id(src, bl, skill_id, skill_lv, tick, 0);
+ skill->castend_nodamage_id(src, bl, spell_skill_id, spell_skill_lv, tick, 0);
break;
case CAST_DAMAGE:
- skill->castend_damage_id(src, bl, skill_id, skill_lv, tick, 0);
+ skill->castend_damage_id(src, bl, spell_skill_id, spell_skill_lv, tick, 0);
break;
}
- sd->ud.canact_tick = tick + skill->delay_fix(src, skill_id, skill_lv);
- clif->status_change(src, SI_POSTDELAY, 1, skill->delay_fix(src, skill_id, skill_lv), 0, 0, 0);
+ sd->ud.canact_tick = tick + skill->delay_fix(src, spell_skill_id, spell_skill_lv);
+ clif->status_change(src, SI_POSTDELAY, 1, skill->delay_fix(src, spell_skill_id, spell_skill_lv), 0, 0, 0);
- cooldown = skill_get_cooldown(skill_id, skill_lv);
+ cooldown = skill_get_cooldown(spell_skill_id, spell_skill_lv);
for (i = 0; i < ARRAYLENGTH(sd->skillcooldown) && sd->skillcooldown[i].id; i++) {
- if (sd->skillcooldown[i].id == skill_id){
+ if (sd->skillcooldown[i].id == spell_skill_id){
cooldown += sd->skillcooldown[i].val;
break;
}
}
if(cooldown)
- skill->blockpc_start(sd, skill_id, cooldown);
+ skill->blockpc_start(sd, spell_skill_id, cooldown);
}else if( sc ){ // Summon Balls
- int i = SC_SUMMON5;
- for(; i >= SC_SUMMON1; i--){
+ for(i = SC_SUMMON5; i >= SC_SUMMON1; i--){
if( sc->data[i] ){
int skillid = WL_SUMMON_ATK_FIRE + (sc->data[i]->val1 - WLS_FIRE);
skill->addtimerskill(src, tick + status_get_adelay(src) * (SC_SUMMON5 - i), bl->id, 0, 0, skillid, skill_lv, BF_MAGIC, flag);
@@ -4460,14 +4461,14 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case EL_TIDAL_WEAPON:
if( src->type == BL_ELEM ) {
struct elemental_data *ele = BL_CAST(BL_ELEM,src);
- struct status_change *sc = status->get_sc(&ele->bl);
+ struct status_change *esc = status->get_sc(&ele->bl);
struct status_change *tsc = status->get_sc(bl);
sc_type type = status->skill2sc(skill_id), type2;
type2 = type-1;
clif->skill_nodamage(src,battle->get_master(src),skill_id,skill_lv,1);
clif->skill_damage(src, src, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
- if( (sc && sc->data[type2]) || (tsc && tsc->data[type]) ) {
+ if( (esc && esc->data[type2]) || (tsc && tsc->data[type]) ) {
elemental->clean_single_effect(ele, skill_id);
}
if( rnd()%100 < 50 )
@@ -4893,7 +4894,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
struct status_change *tsc;
struct status_change_entry *tsce;
- int i = 0;
+ int element = 0;
enum sc_type type;
if(skill_id > 0 && !skill_lv) return 0; // celest
@@ -5008,9 +5009,9 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
tsce = (tsc && type != -1)?tsc->data[type]:NULL;
if (src!=bl && type > -1 &&
- (i = skill->get_ele(skill_id, skill_lv)) > ELE_NEUTRAL &&
+ (element = skill->get_ele(skill_id, skill_lv)) > ELE_NEUTRAL &&
skill->get_inf(skill_id) != INF_SUPPORT_SKILL &&
- battle->attr_fix(NULL, NULL, 100, i, tstatus->def_ele, tstatus->ele_lv) <= 0)
+ battle->attr_fix(NULL, NULL, 100, element, tstatus->def_ele, tstatus->ele_lv) <= 0)
return 1; //Skills that cause an status should be blocked if the target element blocks its element.
map->freeblock_lock();
@@ -5175,13 +5176,13 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SA_ABRACADABRA:
{
- int abra_skill_id = 0, abra_skill_lv;
+ int abra_skill_id = 0, abra_skill_lv, abra_idx;
do {
- i = rnd() % MAX_SKILL_ABRA_DB;
- abra_skill_id = skill->abra_db[i].skill_id;
+ abra_idx = rnd() % MAX_SKILL_ABRA_DB;
+ abra_skill_id = skill->abra_db[abra_idx].skill_id;
} while (abra_skill_id == 0 ||
- skill->abra_db[i].req_lv > skill_lv || //Required lv for it to appear
- rnd()%10000 >= skill->abra_db[i].per
+ skill->abra_db[abra_idx].req_lv > skill_lv || //Required lv for it to appear
+ rnd()%10000 >= skill->abra_db[abra_idx].per
);
abra_skill_lv = min(skill_lv, skill->get_max(abra_skill_id));
clif->skill_nodamage (src, bl, skill_id, skill_lv, 1);
@@ -5279,6 +5280,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
mob->class_change(dstmd,class_);
if( tsc && dstmd->status.mode&MD_BOSS )
{
+ int i;
const enum sc_type scs[] = { SC_QUAGMIRE, SC_PROVOKE, SC_ROKISWEIL, SC_GRAVITATION, SC_NJ_SUITON, SC_NOEQUIPWEAPON, SC_NOEQUIPSHIELD, SC_NOEQUIPARMOR, SC_NOEQUIPHELM, SC_BLADESTOP };
for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++)
if (tsc->data[i]) status_change_end(bl, (sc_type)i, INVALID_TIMER);
@@ -5308,6 +5310,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SA_TAMINGMONSTER:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
if (sd && dstmd) {
+ int i;
ARR_FIND( 0, MAX_PET_DB, i, dstmd->class_ == pet->db[i].class_ );
if( i < MAX_PET_DB )
pet->catch_process1(sd, dstmd->class_);
@@ -5582,9 +5585,11 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case HLIF_AVOID:
case HAMI_DEFENCE:
- i = skill->get_time(skill_id,skill_lv);
- clif->skill_nodamage(bl,bl,skill_id,skill_lv,sc_start(bl,type,100,skill_lv,i)); // Master
- clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,type,100,skill_lv,i)); // Homunc
+ {
+ int duration = skill->get_time(skill_id,skill_lv);
+ clif->skill_nodamage(bl,bl,skill_id,skill_lv,sc_start(bl,type,100,skill_lv,duration)); // Master
+ clif->skill_nodamage(src,src,skill_id,skill_lv,sc_start(src,type,100,skill_lv,duration)); // Homunc
+ }
break;
case NJ_BUNSINJYUTSU:
clif->skill_nodamage(src,bl,skill_id,skill_lv,
@@ -5681,14 +5686,16 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SM_PROVOKE:
case SM_SELFPROVOKE:
case MER_PROVOKE:
+ {
+ int failure;
if( (tstatus->mode&MD_BOSS) || battle->check_undead(tstatus->race,tstatus->def_ele) ) {
map->freeblock_unlock();
return 1;
}
//TODO: How much does base level affects? Dummy value of 1% per level difference used. [Skotlex]
clif->skill_nodamage(src,bl,skill_id == SM_SELFPROVOKE ? SM_PROVOKE : skill_id,skill_lv,
- (i = sc_start(bl,type, skill_id == SM_SELFPROVOKE ? 100:( 50 + 3*skill_lv + status->get_lv(src) - status->get_lv(bl)), skill_lv, skill->get_time(skill_id,skill_lv))));
- if( !i ) {
+ (failure = sc_start(bl,type, skill_id == SM_SELFPROVOKE ? 100:( 50 + 3*skill_lv + status->get_lv(src) - status->get_lv(bl)), skill_lv, skill->get_time(skill_id,skill_lv))));
+ if( !failure ) {
if( sd )
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
@@ -5710,12 +5717,13 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
dstmd->state.provoke_flag = src->id;
mob->target(dstmd, src, skill->get_range2(src,skill_id,skill_lv));
}
+ }
break;
case ML_DEVOTION:
case CR_DEVOTION:
{
- int count, lv;
+ int count, lv, i;
if( !dstsd || (!sd && !mer) )
{ // Only players can be devoted
if( sd )
@@ -5776,7 +5784,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case CH_SOULCOLLECT:
if(sd) {
- int limit = 5;
+ int limit = 5, i;
if( sd->sc.data[SC_RAISINGDRAGON] )
limit += sd->sc.data[SC_RAISINGDRAGON]->val1;
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -5800,18 +5808,20 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case MO_ABSORBSPIRITS:
- i = 0;
+ {
+ int sp = 0;
if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && ((dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK)!=MAPID_REBELLION))
{ // split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]
- i = dstsd->spiritball * 7;
+ sp = dstsd->spiritball * 7;
pc->delspiritball(dstsd,dstsd->spiritball,0);
} else if (dstmd && !(tstatus->mode&MD_BOSS) && rnd() % 100 < 20)
{ // check if target is a monster and not a Boss, for the 20% chance to absorb 2 SP per monster's level [Reddozen]
- i = 2 * dstmd->level;
+ sp = 2 * dstmd->level;
mob->target(dstmd,src,0);
}
- if (i) status->heal(src, 0, i, 3);
- clif->skill_nodamage(src,bl,skill_id,skill_lv,i?1:0);
+ if (sp) status->heal(src, 0, sp, 3);
+ clif->skill_nodamage(src,bl,skill_id,skill_lv,sp?1:0);
+ }
break;
case AC_MAKINGARROW:
@@ -5858,12 +5868,15 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SR_RAMPAGEBLASTER:
case SR_HOWLINGOFLION:
case KO_HAPPOKUNAI:
+ {
+ int count = 0;
skill->area_temp[1] = 0;
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- i = map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src),
+ count = map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src),
src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id);
- if( !i && ( skill_id == NC_AXETORNADO || skill_id == SR_SKYNETBLOW || skill_id == KO_HAPPOKUNAI ) )
+ if( !count && ( skill_id == NC_AXETORNADO || skill_id == SR_SKYNETBLOW || skill_id == KO_HAPPOKUNAI ) )
clif->skill_damage(src,src,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
+ }
break;
case NC_EMERGENCYCOOL:
@@ -5911,18 +5924,20 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case HVAN_EXPLOSION: //[orn]
case NPC_SELFDESTRUCTION:
+ {
//Self Destruction hits everyone in range (allies+enemies)
//Except for Summoned Marine spheres on non-versus maps, where it's just enemy.
- i = ((!md || md->special_state.ai == 2) && !map_flag_vs(src->m))?
+ int targetmask = ((!md || md->special_state.ai == 2) && !map_flag_vs(src->m))?
BCT_ENEMY:BCT_ALL;
clif->skill_nodamage(src, src, skill_id, -1, 1);
map->delblock(src); //Required to prevent chain-self-destructions hitting back.
map->foreachinrange(skill->area_sub, bl,
skill->get_splash(skill_id, skill_lv), splash_target(src),
- src, skill_id, skill_lv, tick, flag|i,
+ src, skill_id, skill_lv, tick, flag|targetmask,
skill->castend_damage_id);
map->addblock(src);
status->damage(src, src, sstatus->max_hp,0,0,1);
+ }
break;
case AL_ANGELUS:
@@ -6009,11 +6024,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case SM_AUTOBERSERK:
case MER_AUTOBERSERK:
+ {
+ int failure;
if( tsce )
- i = status_change_end(bl, type, INVALID_TIMER);
+ failure = status_change_end(bl, type, INVALID_TIMER);
else
- i = sc_start(bl,type,100,skill_lv,60000);
- clif->skill_nodamage(src,bl,skill_id,skill_lv,i);
+ failure = sc_start(bl,type,100,skill_lv,60000);
+ clif->skill_nodamage(src,bl,skill_id,skill_lv,failure);
+ }
break;
case TF_HIDING:
case ST_CHASEWALK:
@@ -6046,20 +6064,22 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SC_REPRODUCE:
case SC_INVISIBILITY:
if (tsce) {
- i = status_change_end(bl, type, INVALID_TIMER);
- if( i )
- clif->skill_nodamage(src,bl,skill_id,( skill_id == LG_FORCEOFVANGUARD ) ? skill_lv : -1,i);
+ int failure = status_change_end(bl, type, INVALID_TIMER);
+ if( failure )
+ clif->skill_nodamage(src,bl,skill_id,( skill_id == LG_FORCEOFVANGUARD ) ? skill_lv : -1,failure);
else if( sd )
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
return 0;
}
case RA_CAMOUFLAGE:
- i = sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
- if( i )
- clif->skill_nodamage(src,bl,skill_id,( skill_id == LG_FORCEOFVANGUARD ) ? skill_lv : -1,i);
+ {
+ int failure = sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
+ if( failure )
+ clif->skill_nodamage(src,bl,skill_id,( skill_id == LG_FORCEOFVANGUARD ) ? skill_lv : -1,failure);
else if( sd )
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+ }
break;
case BD_ADAPTATION:
@@ -6114,15 +6134,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case RG_STEALCOIN:
if(sd) {
- if(pc->steal_coin(sd,bl))
- {
+ int amount = pc->steal_coin(sd, bl);
+ if( amount > 0 ) {
dstmd->state.provoke_flag = src->id;
- mob->target(dstmd, src, skill->get_range2(src,skill_id,skill_lv));
- clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
+ mob->target(dstmd, src, skill->get_range2(src, skill_id, skill_lv));
+ clif->skill_nodamage(src, bl, skill_id, amount, 1);
- }
- else
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+ } else
+ clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
}
break;
@@ -6290,7 +6309,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case MC_VENDING:
if(sd)
{ //Prevent vending of GMs with unnecessary Level to trade/drop. [Skotlex]
- if ( !pc->can_give_items(sd) )
+ if ( !pc_can_give_items(sd) )
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
else {
sd->state.prevend = sd->state.workinprogress = 3;
@@ -6377,18 +6396,18 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case GC_WEAPONCRUSH:
case SC_STRIPACCESSARY: {
unsigned short location = 0;
- int d = 0;
+ int d = 0, rate;
//Rate in percent
if ( skill_id == ST_FULLSTRIP ) {
- i = 5 + 2*skill_lv + (sstatus->dex - tstatus->dex)/5;
+ rate = 5 + 2*skill_lv + (sstatus->dex - tstatus->dex)/5;
} else if( skill_id == SC_STRIPACCESSARY ) {
- i = 12 + 2 * skill_lv + (sstatus->dex - tstatus->dex)/5;
+ rate = 12 + 2 * skill_lv + (sstatus->dex - tstatus->dex)/5;
} else {
- i = 5 + 5*skill_lv + (sstatus->dex - tstatus->dex)/5;
+ rate = 5 + 5*skill_lv + (sstatus->dex - tstatus->dex)/5;
}
- if (i < 5) i = 5; //Minimum rate 5%
+ if (rate < 5) rate = 5; //Minimum rate 5%
//Duration in ms
if( skill_id == GC_WEAPONCRUSH){
@@ -6432,11 +6451,11 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
//Attempts to strip at rate i and duration d
- if( (i = skill->strip_equip(bl, location, i, skill_lv, d)) || (skill_id != ST_FULLSTRIP && skill_id != GC_WEAPONCRUSH ) )
- clif->skill_nodamage(src,bl,skill_id,skill_lv,i);
+ if( (rate = skill->strip_equip(bl, location, rate, skill_lv, d)) || (skill_id != ST_FULLSTRIP && skill_id != GC_WEAPONCRUSH ) )
+ clif->skill_nodamage(src,bl,skill_id,skill_lv,rate);
//Nothing stripped.
- if( sd && !i )
+ if( sd && !rate )
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
@@ -6602,8 +6621,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
break;
case SA_DISPELL:
- if (flag&1 || (i = skill->get_splash(skill_id, skill_lv)) < 1)
- {
+ {
+ int splash;
+ if (flag&1 || (splash = skill->get_splash(skill_id, skill_lv)) < 1) {
+ int i;
if( sd && dstsd && !map_flag_vs(sd->bl.m)
&& (sd->status.party_id == 0 || sd->status.party_id != dstsd->status.party_id) ) {
// Outside PvP it should only affect party members and no skill fail message.
@@ -6654,11 +6675,13 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
status_change_end(bl, (sc_type)i, INVALID_TIMER);
}
break;
+ } else {
+ //Affect all targets on splash area.
+ map->foreachinrange(skill->area_sub, bl, splash, BL_CHAR,
+ src, skill_id, skill_lv, tick, flag|1,
+ skill->castend_damage_id);
}
- //Affect all targets on splash area.
- map->foreachinrange(skill->area_sub, bl, i, BL_CHAR,
- src, skill_id, skill_lv, tick, flag|1,
- skill->castend_damage_id);
+ }
break;
case TF_BACKSLIDING: //This is the correct implementation as per packet logging information. [Skotlex]
@@ -7050,16 +7073,17 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( sd && !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) ) {
// prevent picking up expired traps
if( battle_config.skill_removetrap_type ) {
+ int i;
// get back all items used to deploy the trap
for( i = 0; i < 10; i++ ) {
if( skill->db[su->group->skill_id].itemid[i] > 0 ) {
- int flag;
+ int success;
struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = skill->db[su->group->skill_id].itemid[i];
item_tmp.identify = 1;
- if( item_tmp.nameid && (flag=pc->additem(sd,&item_tmp,skill->db[su->group->skill_id].amount[i],LOG_TYPE_OTHER)) ) {
- clif->additem(sd,0,0,flag);
+ if( item_tmp.nameid && (success=pc->additem(sd,&item_tmp,skill->db[su->group->skill_id].amount[i],LOG_TYPE_OTHER)) ) {
+ clif->additem(sd,0,0,success);
map->addflooritem(&item_tmp,skill->db[su->group->skill_id].amount[i],sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
@@ -7480,7 +7504,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
{
int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0};
int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0};
- int j = 0;
+ int i, j = 0;
struct guild *g;
// i don't know if it actually summons in a circle, but oh well. ;P
g = sd ? sd->guild : guild->search(status->get_guild_id(src));
@@ -7534,10 +7558,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
/* per official standards, this skill works on players and mobs. */
if (sd && (dstsd || dstmd))
{
- i =65 -5*distance_bl(src,bl); //Base rate
- if (i < 30) i = 30;
+ int rate = 65 -5*distance_bl(src,bl); //Base rate
+ if (rate < 30) rate = 30;
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- sc_start(bl,SC_STUN, i,skill_lv,skill->get_time2(skill_id,skill_lv));
+ sc_start(bl,SC_STUN, rate,skill_lv,skill->get_time2(skill_id,skill_lv));
}
break;
@@ -7592,20 +7616,21 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
{
static const int per[5][2]={{20,50},{50,60},{25,75},{60,64},{34,67}};
int r = rnd()%100;
- i = (skill_lv-1)%5;
- if(r<per[i][0]) //Self
+ int target = (skill_lv-1)%5;
+ int hp;
+ if(r<per[target][0]) //Self
bl = src;
- else if(r<per[i][1]) //Master
+ else if(r<per[target][1]) //Master
bl = battle->get_master(src);
else //Enemy
bl = map->id2bl(battle->get_target(src));
if (!bl) bl = src;
- i = skill->calc_heal(src, bl, skill_id, 1+rnd()%skill_lv, true);
+ hp = skill->calc_heal(src, bl, skill_id, 1+rnd()%skill_lv, true);
//Eh? why double skill packet?
- clif->skill_nodamage(src,bl,AL_HEAL,i,1);
- clif->skill_nodamage(src,bl,skill_id,i,1);
- status->heal(bl, i, 0, 0);
+ clif->skill_nodamage(src,bl,AL_HEAL,hp,1);
+ clif->skill_nodamage(src,bl,skill_id,hp,1);
+ status->heal(bl, hp, 0, 0);
}
break;
//Homun single-target support skills [orn]
@@ -7624,7 +7649,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case NPC_DRAGONFEAR:
if (flag&1) {
const enum sc_type sc[] = { SC_STUN, SC_SILENCE, SC_CONFUSION, SC_BLOODING };
- int j;
+ int i, j;
j = i = rnd()%ARRAYLENGTH(sc);
while ( !sc_start2(bl,sc[i],100,skill_lv,src->id,skill->get_time2(skill_id,i+1)) ) {
i++;
@@ -7726,14 +7751,17 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case RK_IGNITIONBREAK:
case LG_EARTHDRIVE:
+ {
+ int splash;
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
- i = skill->get_splash(skill_id,skill_lv);
+ splash = skill->get_splash(skill_id,skill_lv);
if( skill_id == LG_EARTHDRIVE ) {
int dummy = 1;
- map->foreachinarea(skill->cell_overlap, src->m, src->x-i, src->y-i, src->x+i, src->y+i, BL_SKILL, LG_EARTHDRIVE, &dummy, src);
+ map->foreachinarea(skill->cell_overlap, src->m, src->x-splash, src->y-splash, src->x+splash, src->y+splash, BL_SKILL, LG_EARTHDRIVE, &dummy, src);
}
- map->foreachinrange(skill->area_sub, bl,i,BL_CHAR,
+ map->foreachinrange(skill->area_sub, bl,splash,BL_CHAR,
src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id);
+ }
break;
case RK_STONEHARDSKIN:
if( sd ) {
@@ -7771,8 +7799,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
sc_start(bl,type,100,skill->area_temp[5]/4,skill->get_time(skill_id,skill_lv));
} else if( sd ) {
if( sd->status.party_id ) {
- i = party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,BCT_PARTY,skill->area_sub_count);
- skill->area_temp[5] = 7 * i; // ATK
+ int members = party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,BCT_PARTY,skill->area_sub_count);
+ skill->area_temp[5] = 7 * members; // ATK
party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
} else
sc_start2(bl,type,100,7,5,skill->get_time(skill_id,skill_lv));
@@ -7785,28 +7813,28 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( src == bl )
break;
while( skill->area_temp[5] >= 0x10 ){
+ int value = 0;
type = SC_NONE;
- i = 0;
if( skill->area_temp[5]&0x10 ){
if( dstsd ){
- i = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2);
- clif->millenniumshield(dstsd,i);
+ value = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2);
+ clif->millenniumshield(dstsd,value);
skill->area_temp[5] &= ~0x10;
type = SC_MILLENNIUMSHIELD;
}
}else if( skill->area_temp[5]&0x20 ){
- i = status_get_max_hp(bl) * 25 / 100;
+ value = status_get_max_hp(bl) * 25 / 100;
status->change_clear_buffs(bl,4);
skill->area_temp[5] &= ~0x20;
- status->heal(bl,i,0,1);
+ status->heal(bl,value,0,1);
type = SC_REFRESH;
}else if( skill->area_temp[5]&0x40 ){
skill->area_temp[5] &= ~0x40;
type = SC_GIANTGROWTH;
}else if( skill->area_temp[5]&0x80 ){
if( dstsd ){
- i = sstatus->hp / 4;
- if( status->charge(bl,i,0) )
+ value = sstatus->hp / 4;
+ if( status->charge(bl,value,0) )
type = SC_STONEHARDSKIN;
skill->area_temp[5] &= ~0x80;
}
@@ -7819,7 +7847,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
}
if( type > SC_NONE )
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
- sc_start4(bl, type, 100, skill_lv, i, 0, 1, skill->get_time(skill_id, skill_lv)));
+ sc_start4(bl, type, 100, skill_lv, value, 0, 1, skill->get_time(skill_id, skill_lv)));
}
}else if( sd ){
if( tsc && tsc->count ){
@@ -7931,16 +7959,19 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case AB_CLEMENTIA:
case AB_CANTO:
+ {
+ int level = 0;
if( sd )
- i = skill_id == AB_CLEMENTIA ? pc->checkskill(sd,AL_BLESSING) : pc->checkskill(sd,AL_INCAGI);
+ level = skill_id == AB_CLEMENTIA ? pc->checkskill(sd,AL_BLESSING) : pc->checkskill(sd,AL_INCAGI);
if( sd == NULL || sd->status.party_id == 0 || flag&1 )
- clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl, type, 100, i + (sd?(sd->status.job_level / 10):0), skill->get_time(skill_id,skill_lv)));
+ clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl, type, 100, level + (sd?(sd->status.job_level / 10):0), skill->get_time(skill_id,skill_lv)));
else if( sd ) {
- if( !i )
+ if( !level )
clif->skill_fail(sd,skill_id,USESKILL_FAIL,0);
else
party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
+ }
break;
case AB_PRAEFATIO:
@@ -7953,15 +7984,15 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case AB_CHEAL:
if( sd == NULL || sd->status.party_id == 0 || flag&1 ) {
if( sd && tstatus && !battle->check_undead(tstatus->race, tstatus->def_ele) ) {
- i = skill->calc_heal(src, bl, AL_HEAL, pc->checkskill(sd, AL_HEAL), true);
+ int heal = skill->calc_heal(src, bl, AL_HEAL, pc->checkskill(sd, AL_HEAL), true);
if( (dstsd && pc_ismadogear(dstsd)) || status->isimmune(bl))
- i = 0; // Should heal by 0 or won't do anything?? in iRO it breaks the healing to members.. [malufett]
+ heal = 0; // Should heal by 0 or won't do anything?? in iRO it breaks the healing to members.. [malufett]
- clif->skill_nodamage(bl, bl, skill_id, i, 1);
- if( tsc && tsc->data[SC_AKAITSUKI] && i )
- i = ~i + 1;
- status->heal(bl, i, 0, 0);
+ clif->skill_nodamage(bl, bl, skill_id, heal, 1);
+ if( tsc && tsc->data[SC_AKAITSUKI] && heal )
+ heal = ~heal + 1;
+ status->heal(bl, heal, 0, 0);
}
}
else if( sd )
@@ -8016,7 +8047,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case AB_CLEARANCE:
- if( flag&1 || (i = skill->get_splash(skill_id, skill_lv)) < 1 ) {
+ {
+ int splash;
+ if( flag&1 || (splash = skill->get_splash(skill_id, skill_lv)) < 1 ) {
+ int i;
//As of the behavior in official server Clearance is just a super version of Dispell skill. [Jobbie]
if( bl->type != BL_MOB && battle->check_target(src,bl,BCT_PARTY) <= 0 ) // Only affect mob or party.
break;
@@ -8049,8 +8083,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
status_change_end(bl,(sc_type)i,INVALID_TIMER);
}
break;
+ } else {
+ map->foreachinrange(skill->area_sub, bl, splash, BL_CHAR, src, skill_id, skill_lv, tick, flag|1, skill->castend_damage_id);
}
- map->foreachinrange(skill->area_sub, bl, i, BL_CHAR, src, skill_id, skill_lv, tick, flag|1, skill->castend_damage_id);
+ }
break;
case AB_SILENTIUM:
@@ -8081,9 +8117,9 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
else rate += 40 + 10 * skill_lv; // On Monsters, (40 + 10 * Skill Level) %
if( !(tsc && tsc->data[type]) ){
- i = sc_start2(bl,type,rate,skill_lv,src->id,(src == bl)?5000:(bl->type == BL_PC)?skill->get_time(skill_id,skill_lv):skill->get_time2(skill_id, skill_lv));
- clif->skill_nodamage(src,bl,skill_id,skill_lv,i);
- if( sd && !i )
+ int failure = sc_start2(bl,type,rate,skill_lv,src->id,(src == bl)?5000:(bl->type == BL_PC)?skill->get_time(skill_id,skill_lv):skill->get_time2(skill_id, skill_lv));
+ clif->skill_nodamage(src,bl,skill_id,skill_lv,failure);
+ if( sd && !failure )
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
}
}else
@@ -8128,6 +8164,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case WL_SUMMONBL:
case WL_SUMMONWB:
case WL_SUMMONSTONE:
+ {
+ int i;
for( i = SC_SUMMON1; i <= SC_SUMMON5; i++ ){
if( tsc && !tsc->data[i] ){ // officially it doesn't work like a stack
int ele = WLS_FIRE + (skill_id - WL_SUMMONFB) - (skill_id == WL_SUMMONSTONE ? 4 : 0);
@@ -8136,11 +8174,13 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
}
}
+ }
break;
case WL_READING_SB:
if( sd ) {
struct status_change *sc = status->get_sc(bl);
+ int i;
for( i = SC_SPELLBOOK1; i <= SC_SPELLBOOK7; i++)
if( sc && !sc->data[i] )
@@ -8234,13 +8274,16 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case NC_MAGNETICFIELD:
- if( (i = sc_start2(bl,type,100,skill_lv,src->id,skill->get_time(skill_id,skill_lv))) )
+ {
+ int failure;
+ if( (failure = sc_start2(bl,type,100,skill_lv,src->id,skill->get_time(skill_id,skill_lv))) )
{
map->foreachinrange(skill->area_sub,src,skill->get_splash(skill_id,skill_lv),splash_target(src),src,skill_id,skill_lv,tick,flag|BCT_ENEMY|SD_SPLASH|1,skill->castend_damage_id);;
clif->skill_damage(src,src,tick,status_get_amotion(src),0,-30000,1,skill_id,skill_lv,6);
if (sd) pc->overheat(sd,1);
}
- clif->skill_nodamage(src,src,skill_id,skill_lv,i);
+ clif->skill_nodamage(src,src,skill_id,skill_lv,failure);
+ }
break;
case NC_REPAIR:
@@ -8481,6 +8524,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case LG_KINGS_GRACE:
if( flag&1 ){
+ int i;
sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
for(i=0; i<SC_MAX; i++)
{
@@ -8542,6 +8586,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SR_RAISINGDRAGON:
if( sd ) {
short max = 5 + skill_lv;
+ int i;
sc_start(bl, SC_EXPLOSIONSPIRITS, 100, skill_lv, skill->get_time(skill_id, skill_lv));
for( i = 0; i < max; i++ ) // Don't call more than max available spheres.
pc->addspiritball(sd, skill->get_time(skill_id, skill_lv), max);
@@ -8551,14 +8596,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case SR_ASSIMILATEPOWER:
if( flag&1 ) {
- i = 0;
+ int sp = 0;
if( dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER )
{
- i = dstsd->spiritball; //1%sp per spiritball.
+ sp = dstsd->spiritball; //1%sp per spiritball.
pc->delspiritball(dstsd, dstsd->spiritball, 0);
}
- if( i ) status_percent_heal(src, 0, i);
- clif->skill_nodamage(src, bl, skill_id, skill_lv, i ? 1:0);
+ if( sp ) status_percent_heal(src, 0, sp);
+ clif->skill_nodamage(src, bl, skill_id, skill_lv, sp ? 1:0);
} else {
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|BCT_SELF|SD_SPLASH|1, skill->castend_nodamage_id);
@@ -8569,6 +8614,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( !dstsd )
break;
if( sd && dstsd->spiritball <= 5 ) {
+ int i;
for(i = 0; i <= 5; i++) {
pc->addspiritball(dstsd, skill->get_time(MO_CALLSPIRITS, pc->checkskill(sd,MO_CALLSPIRITS)), i);
pc->delspiritball(sd, sd->spiritball, 0);
@@ -8610,9 +8656,12 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
sc_start2(bl,type,100,skill_lv,src->id,skill->get_time(skill_id,skill_lv)));
break;
case SR_FLASHCOMBO:
+ {
+ int i;
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
for(i = SR_FLASHCOMBO_ATK_STEP1; i <= SR_FLASHCOMBO_ATK_STEP4; i++)
skill->addtimerskill(src, tick + 500 * (i - SR_FLASHCOMBO_ATK_STEP1), bl->id, 0, 0, i, skill_lv, BF_WEAPON, flag|SD_LEVEL);
+ }
break;
case WA_SWING_DANCE:
case WA_MOONLIT_SERENADE:
@@ -8743,11 +8792,11 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case WM_RANDOMIZESPELL: {
- int improv_skill_id = 0, improv_skill_lv;
+ int improv_skill_id = 0, improv_skill_lv, improv_idx;
do {
- i = rnd() % MAX_SKILL_IMPROVISE_DB;
- improv_skill_id = skill->improvise_db[i].skill_id;
- } while( improv_skill_id == 0 || rnd()%10000 >= skill->improvise_db[i].per );
+ improv_idx = rnd() % MAX_SKILL_IMPROVISE_DB;
+ improv_skill_id = skill->improvise_db[improv_idx].skill_id;
+ } while( improv_skill_id == 0 || rnd()%10000 >= skill->improvise_db[improv_idx].per );
improv_skill_lv = 4 + skill_lv;
clif->skill_nodamage (src, bl, skill_id, skill_lv, 1);
@@ -8792,28 +8841,25 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( sd )
{
short x, y; // Destiny position.
- unsigned short mapindex;
+ unsigned short map_index;
- if( skill_id == RETURN_TO_ELDICASTES)
- {
+ if( skill_id == RETURN_TO_ELDICASTES) {
x = 198;
y = 187;
- mapindex = mapindex_name2id(MAP_DICASTES);
- }
- else
- {
+ map_index = mapindex->name2id(MAP_DICASTES);
+ } else {
x = 44;
y = 151;
- mapindex = mapindex_name2id(MAP_MORA);
+ map_index = mapindex->name2id(MAP_MORA);
}
- if(!mapindex) {
+ if(!map_index) {
//Given map not found?
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
return 0;
}
- pc->setpos(sd, mapindex, x, y, CLR_TELEPORT);
+ pc->setpos(sd, map_index, x, y, CLR_TELEPORT);
}
break;
@@ -8987,10 +9033,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case GN_SLINGITEM:
if( sd ) {
short ammo_id;
- i = sd->equip_index[EQI_AMMO];
- if( i <= 0 )
+ int equip_idx = sd->equip_index[EQI_AMMO];
+ if( equip_idx <= 0 )
break; // No ammo.
- ammo_id = sd->inventory_data[i]->nameid;
+ ammo_id = sd->inventory_data[equip_idx]->nameid;
if( ammo_id <= 0 )
break;
sd->itemid = ammo_id;
@@ -9003,7 +9049,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
} else //Otherwise, it fails, shows animation and removes items.
clif->skill_fail(sd,GN_SLINGITEM_RANGEMELEEATK,0xa,0);
} else if( itemdb_is_GNthrowable(ammo_id) ) {
- struct script_code *scriptroot = sd->inventory_data[i]->script;
+ struct script_code *scriptroot = sd->inventory_data[equip_idx]->script;
if( !scriptroot )
break;
if( dstsd )
@@ -9102,6 +9148,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case KO_KAZEHU_SEIRAN:
case KO_DOHU_KOUKAI:
if(sd) {
+ int i;
int ttype = skill->get_ele(skill_id, skill_lv);
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
ARR_FIND(1, 6, i, sd->charm[i] > 0 && ttype != i);
@@ -9113,16 +9160,16 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case KO_ZANZOU:
if(sd) {
- struct mob_data *md;
-
- md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), 2308, "", SZ_MEDIUM, AI_NONE);
- if( md ) {
- md->master_id = src->id;
- md->special_state.ai = AI_ZANZOU;
- if( md->deletetimer != INVALID_TIMER )
- timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0);
- mob->spawn( md );
+ struct mob_data *summon_md;
+
+ summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), 2308, "", SZ_MEDIUM, AI_NONE);
+ if( summon_md ) {
+ summon_md->master_id = src->id;
+ summon_md->special_state.ai = AI_ZANZOU;
+ if( summon_md->deletetimer != INVALID_TIMER )
+ timer->delete(summon_md->deletetimer, mob->timer_delete);
+ summon_md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, summon_md->bl.id, 0);
+ mob->spawn( summon_md );
pc->setinvincibletimer(sd,500);// unlock target lock
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
skill->blown(src,bl,skill->get_blewcount(skill_id,skill_lv),unit->getdir(bl),0);
@@ -9231,6 +9278,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
};
int heal;
if(tsc){
+ int i;
for (i = 0; i < ARRAYLENGTH(scs); i++) {
if (tsc->data[scs[i]]) status_change_end(bl, scs[i], INVALID_TIMER);
}
@@ -9270,14 +9318,16 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case MH_GRANITIC_ARMOR:
case MH_PYROCLASTIC:
- {
- struct block_list *s_bl = battle->get_master(src);
- if(s_bl)
- sc_start2(s_bl, type, 100, skill_lv, hd->homunculus.level, skill->get_time(skill_id, skill_lv)); //start on master
- sc_start2(bl, type, 100, skill_lv, hd->homunculus.level, skill->get_time(skill_id, skill_lv));
- if (hd)
+ if( hd ){
+ struct block_list *s_bl = battle->get_master(src);
+
+ if(s_bl)
+ sc_start2(s_bl, type, 100, skill_lv, hd->homunculus.level, skill->get_time(skill_id, skill_lv)); //start on master
+
+ sc_start2(bl, type, 100, skill_lv, hd->homunculus.level, skill->get_time(skill_id, skill_lv));
+
skill->blockhomun_start(hd, skill_id, skill->get_cooldown(skill_id, skill_lv));
- }
+ }
break;
case MH_LIGHT_OF_REGENE:
@@ -9296,22 +9346,22 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
{
int summons[5] = {1004, 1303, 1303, 1994, 1994};
int qty[5] = {3 , 3 , 4 , 4 , 5};
- struct mob_data *md;
+ struct mob_data *summon_md;
int i, dummy = 0;
- i = map->foreachinmap(skill->check_condition_mob_master_sub ,hd->bl.m, BL_MOB, hd->bl.id, summons[skill_lv-1], skill_id, &dummy);
+ i = map->foreachinmap(skill->check_condition_mob_master_sub, src->m, BL_MOB, src->id, summons[skill_lv-1], skill_id, &dummy);
if(i >= qty[skill_lv-1])
break;
for(i=0; i<qty[skill_lv - 1]; i++){ //easy way
- md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), summons[skill_lv - 1], "", SZ_MEDIUM, AI_ATTACK);
- if (md) {
- md->master_id = src->id;
- if (md->deletetimer != INVALID_TIMER)
- timer->delete(md->deletetimer, mob->timer_delete);
- md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, md->bl.id, 0);
- mob->spawn(md); //Now it is ready for spawning.
- sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_CANATTACK|MD_AGGRESSIVE, 0, 60000);
+ summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), summons[skill_lv - 1], "", SZ_MEDIUM, AI_ATTACK);
+ if (summon_md) {
+ summon_md->master_id = src->id;
+ if (summon_md->deletetimer != INVALID_TIMER)
+ timer->delete(summon_md->deletetimer, mob->timer_delete);
+ summon_md->deletetimer = timer->add(timer->gettick() + skill->get_time(skill_id, skill_lv), mob->timer_delete, summon_md->bl.id, 0);
+ mob->spawn(summon_md); //Now it is ready for spawning.
+ sc_start4(&summon_md->bl, SC_MODECHANGE, 100, 1, 0, MD_CANATTACK|MD_AGGRESSIVE, 0, 60000);
}
}
if (hd)
@@ -9583,10 +9633,10 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char
int i, lv, wx, wy;
int maxcount=0;
int x,y;
- unsigned short mapindex;
+ unsigned short map_index;
- mapindex = mapindex_name2id(mapname);
- if(!mapindex) { //Given map not found?
+ map_index = mapindex->name2id(mapname);
+ if(!map_index) { //Given map not found?
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
skill_failed(sd);
return 0;
@@ -9616,7 +9666,7 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char
if( lv > 4 ) lv = 4; // crash prevention
// check if the chosen map exists in the memo list
- ARR_FIND( 0, lv, i, mapindex == p[i]->map );
+ ARR_FIND( 0, lv, i, map_index == p[i]->map );
if( i < lv ) {
x=p[i]->x;
y=p[i]->y;
@@ -9641,7 +9691,7 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char
group->val1 = (group->val1<<16)|(short)0;
// record the destination coordinates
group->val2 = (x<<16)|y;
- group->val3 = mapindex;
+ group->val3 = map_index;
}
break;
}
@@ -9660,7 +9710,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
struct status_change_entry *sce;
struct skill_unit_group* sg;
enum sc_type type;
- int i;
+ int r;
//if(skill_lv <= 0) return 0;
if(skill_id > 0 && !skill_lv) return 0; // celest
@@ -9696,47 +9746,46 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
switch(skill_id) {
case PR_BENEDICTIO:
+ r = skill->get_splash(skill_id, skill_lv);
skill->area_temp[1] = src->id;
- i = skill->get_splash(skill_id, skill_lv);
map->foreachinarea(skill->area_sub,
- src->m, x-i, y-i, x+i, y+i, BL_PC,
+ src->m, x-r, y-r, x+r, y+r, BL_PC,
src, skill_id, skill_lv, tick, flag|BCT_ALL|1,
skill->castend_nodamage_id);
map->foreachinarea(skill->area_sub,
- src->m, x-i, y-i, x+i, y+i, BL_CHAR,
+ src->m, x-r, y-r, x+r, y+r, BL_CHAR,
src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1,
skill->castend_damage_id);
break;
case BS_HAMMERFALL:
- i = skill->get_splash(skill_id, skill_lv);
+ r = skill->get_splash(skill_id, skill_lv);
map->foreachinarea(skill->area_sub,
- src->m, x-i, y-i, x+i, y+i, BL_CHAR,
+ src->m, x-r, y-r, x+r, y+r, BL_CHAR,
src, skill_id, skill_lv, tick, flag|BCT_ENEMY|2,
skill->castend_nodamage_id);
break;
case HT_DETECTING:
- i = skill->get_splash(skill_id, skill_lv);
+ r = skill->get_splash(skill_id, skill_lv);
map->foreachinarea(status->change_timer_sub,
- src->m, x-i, y-i, x+i,y+i,BL_CHAR,
+ src->m, x-r, y-r, x+r,y+r,BL_CHAR,
src,NULL,SC_SIGHT,tick);
if(battle_config.traps_setting&1)
map->foreachinarea(skill_reveal_trap,
- src->m, x-i, y-i, x+i,y+i,BL_SKILL);
+ src->m, x-r, y-r, x+r, y+r, BL_SKILL);
break;
case SR_RIDEINLIGHTNING:
- i = skill->get_splash(skill_id, skill_lv);
- map->foreachinarea(skill->area_sub, src->m, x-i, y-i, x+i, y+i, BL_CHAR,
+ r = skill->get_splash(skill_id, skill_lv);
+ map->foreachinarea(skill->area_sub, src->m, x-r, y-r, x+r, y+r, BL_CHAR,
src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_damage_id);
break;
case SA_VOLCANO:
case SA_DELUGE:
case SA_VIOLENTGALE:
- { //Does not consumes if the skill is already active. [Skotlex]
- struct skill_unit_group *sg;
+ //Does not consumes if the skill is already active. [Skotlex]
if ((sg= skill->locate_element_field(src)) != NULL && ( sg->skill_id == SA_VOLCANO || sg->skill_id == SA_DELUGE || sg->skill_id == SA_VIOLENTGALE ))
{
if (sg->limit - DIFF_TICK(timer->gettick(), sg->tick) > 0) {
@@ -9747,7 +9796,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
}
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
break;
- }
+
case MG_SAFETYWALL:
case MG_FIREWALL:
case MG_THUNDERSTORM:
@@ -9890,8 +9939,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
flag|=1;
break;
case RG_CLEANER: // [Valaris]
- i = skill->get_splash(skill_id, skill_lv);
- map->foreachinarea(skill->graffitiremover,src->m,x-i,y-i,x+i,y+i,BL_SKILL);
+ r = skill->get_splash(skill_id, skill_lv);
+ map->foreachinarea(skill->graffitiremover,src->m,x-r,y-r,x+r,y+r,BL_SKILL);
break;
case SO_WARMER:
@@ -9900,9 +9949,11 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
break;
- case WZ_METEOR: {
+ case WZ_METEOR:
+ {
int area = skill->get_splash(skill_id, skill_lv);
short tmpx = 0, tmpy = 0, x1 = 0, y1 = 0;
+ int i;
for( i = 0; i < 2 + (skill_lv>>1); i++ ) {
// Creates a random Cell in the Splash Area
@@ -10035,8 +10086,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
if (rnd()%100 < 80) {
int dummy = 1;
clif->skill_poseffect(src,skill_id,skill_lv,x,y,tick);
- i = skill->get_splash(skill_id, skill_lv);
- map->foreachinarea(skill->cell_overlap, src->m, x-i, y-i, x+i, y+i, BL_SKILL, HW_GANBANTEIN, &dummy, src);
+ r = skill->get_splash(skill_id, skill_lv);
+ map->foreachinarea(skill->cell_overlap, src->m, x-r, y-r, x+r, y+r, BL_SKILL, HW_GANBANTEIN, &dummy, src);
} else {
if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 1;
@@ -10117,14 +10168,14 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case NC_ARMSCANNON:
case RK_DRAGONBREATH:
case RK_DRAGONBREATH_WATER:
- i = skill->get_splash(skill_id,skill_lv);
- map->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src),
+ r = skill->get_splash(skill_id,skill_lv);
+ map->foreachinarea(skill->area_sub,src->m,x-r,y-r,x+r,y+r,splash_target(src),
src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id);
break;
case SO_ARRULLO:
- i = skill->get_splash(skill_id,skill_lv);
- map->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src),
+ r = skill->get_splash(skill_id,skill_lv);
+ map->foreachinarea(skill->area_sub,src->m,x-r,y-r,x+r,y+r,splash_target(src),
src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
break;
/**
@@ -10145,8 +10196,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
**/
case AB_EPICLESIS:
if( (sg = skill->unitsetting(src, skill_id, skill_lv, x, y, 0)) ) {
- i = sg->unit->range;
- map->foreachinarea(skill->area_sub, src->m, x - i, y - i, x + i, y + i, BL_CHAR, src, ALL_RESURRECTION, 1, tick, flag|BCT_NOENEMY|1,skill->castend_nodamage_id);
+ r = sg->unit->range;
+ map->foreachinarea(skill->area_sub, src->m, x - r, y - r, x + r, y + r, BL_CHAR, src, ALL_RESURRECTION, 1, tick, flag|BCT_NOENEMY|1,skill->castend_nodamage_id);
}
break;
@@ -10171,8 +10222,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
* Ranger
**/
case RA_DETONATOR:
- i = skill->get_splash(skill_id, skill_lv);
- map->foreachinarea(skill->detonator, src->m, x-i, y-i, x+i, y+i, BL_SKILL, src);
+ r = skill->get_splash(skill_id, skill_lv);
+ map->foreachinarea(skill->detonator, src->m, x-r, y-r, x+r, y+r, BL_SKILL, src);
clif->skill_damage(src, src, tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
break;
/**
@@ -10224,6 +10275,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case LG_OVERBRAND:
{
int width;//according to data from irowiki it actually is a square
+ int i;
for( width = 0; width < 7; width++ )
for( i = 0; i < 7; i++ )
map->foreachincell(skill->area_sub, src->m, x-2+i, y-2+width, splash_target(src), src, LG_OVERBRAND_BRANDISH, skill_lv, tick, flag|BCT_ENEMY,skill->castend_damage_id);
@@ -10245,26 +10297,28 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case LG_RAYOFGENESIS:
if( status->charge(src,status_get_max_hp(src)*3*skill_lv / 100,0) ) {
- i = skill->get_splash(skill_id,skill_lv);
- map->foreachinarea(skill->area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src),
+ r = skill->get_splash(skill_id,skill_lv);
+ map->foreachinarea(skill->area_sub,src->m,x-r,y-r,x+r,y+r,splash_target(src),
src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_damage_id);
} else if( sd )
clif->skill_fail(sd,skill_id,USESKILL_FAIL,0);
break;
case WM_DOMINION_IMPULSE:
- i = skill->get_splash(skill_id, skill_lv);
+ r = skill->get_splash(skill_id, skill_lv);
map->foreachinarea( skill->activate_reverberation,
- src->m, x-i, y-i, x+i,y+i,BL_SKILL);
+ src->m, x-r, y-r, x+r,y+r,BL_SKILL);
break;
case WM_GREAT_ECHO:
flag|=1; // Should counsume 1 item per skill usage.
map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill->castend_damage_id);
break;
- case GN_CRAZYWEED: {
+ case GN_CRAZYWEED:
+ {
int area = skill->get_splash(GN_CRAZYWEED_ATK, skill_lv);
short x1 = 0, y1 = 0;
+ int i;
for( i = 0; i < 3 + (skill_lv/2); i++ ) {
x1 = x - area + rnd()%(area * 2 + 1);
@@ -10317,11 +10371,14 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
break;
case KO_MAKIBISHI:
+ {
+ int i;
for( i = 0; i < (skill_lv+2); i++ ) {
x = src->x - 1 + rnd()%3;
y = src->y - 1 + rnd()%3;
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
}
+ }
break;
default:
@@ -10850,9 +10907,9 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
struct skill_unit *su;
int ux = x + layout->dx[i];
int uy = y + layout->dy[i];
- int val1 = skill_lv;
- int val2 = 0;
int alive = 1;
+ val1 = skill_lv;
+ val2 = 0;
if( !group->state.song_dance && !map->getcell(src->m,ux,uy,CELL_CHKREACH) )
continue; // don't place skill units on walls (except for songs/dances/encores)
@@ -12205,7 +12262,7 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16
int i;
bool is_chorus = ( skill->get_inf2(skill_id)&INF2_CHORUS_SKILL );
- if (!battle_config.player_skill_partner_check || pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL))
+ if (!battle_config.player_skill_partner_check || pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL))
return is_chorus ? MAX_PARTY : 99; //As if there were infinite partners.
if (cast_flag) { //Execute the skill on the partners.
@@ -12296,13 +12353,12 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
struct status_data *st;
struct status_change *sc;
struct skill_condition require;
- int i;
nullpo_ret(sd);
if (sd->chatID) return 0;
- if( pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id )
+ if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id )
{ //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check.
sd->spiritball_old = sd->spiritball; //Need to do Spiritball check.
@@ -12338,6 +12394,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
if( sd->state.abra_flag ) // Hocus-Pocus was used. [Inkfish]
sd->state.abra_flag = 0;
else {
+ int i;
// When a target was selected, consume items that were skipped in pc_use_item [Skotlex]
if( (i = sd->itemindex) == -1 ||
sd->status.inventory[i].nameid != sd->itemid ||
@@ -12491,34 +12548,38 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
return 0;
if(sc->data[SC_BLADESTOP])
break;
- if( (i=(sc && sc->data[SC_COMBOATTACK])) && sc->data[SC_COMBOATTACK]->val1 == MO_TRIPLEATTACK )
- break;
- if( i )
+ if( sc && sc->data[SC_COMBOATTACK] ) {
+ if( sc->data[SC_COMBOATTACK]->val1 == MO_TRIPLEATTACK )
+ break;
clif->skill_fail(sd, skill_id, USESKILL_FAIL_COMBOSKILL, MO_TRIPLEATTACK);
+ }
return 0;
case MO_COMBOFINISH:
if(!sc)
return 0;
- if( (i=(sc && sc->data[SC_COMBOATTACK])) && sc->data[SC_COMBOATTACK]->val1 == MO_CHAINCOMBO )
- break;
- if( i )
+ if( sc && sc->data[SC_COMBOATTACK] ) {
+ if ( sc->data[SC_COMBOATTACK]->val1 == MO_CHAINCOMBO )
+ break;
clif->skill_fail(sd, skill_id, USESKILL_FAIL_COMBOSKILL, MO_CHAINCOMBO);
+ }
return 0;
case CH_TIGERFIST:
if(!sc)
return 0;
- if( (i=(sc && sc->data[SC_COMBOATTACK])) && sc->data[SC_COMBOATTACK]->val1 == MO_COMBOFINISH )
- break;
- if( i )
+ if( sc && sc->data[SC_COMBOATTACK] ) {
+ if ( sc->data[SC_COMBOATTACK]->val1 == MO_COMBOFINISH )
+ break;
clif->skill_fail(sd, skill_id, USESKILL_FAIL_COMBOSKILL, MO_COMBOFINISH);
+ }
return 0;
case CH_CHAINCRUSH:
if(!sc)
return 0;
- if( (i=(sc && sc->data[SC_COMBOATTACK])) && sc->data[SC_COMBOATTACK]->val1 == CH_TIGERFIST )
- break;
- if( i )
+ if( sc && sc->data[SC_COMBOATTACK] ) {
+ if( sc->data[SC_COMBOATTACK]->val1 == CH_TIGERFIST )
+ break;
clif->skill_fail(sd, skill_id, USESKILL_FAIL_COMBOSKILL, CH_TIGERFIST);
+ }
return 0;
case MO_EXTREMITYFIST:
// if(sc && sc->data[SC_EXTREMITYFIST]) //To disable Asura during the 5 min skill block uncomment this...
@@ -12666,8 +12727,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
case SG_STAR_WARM:
if (sc && sc->data[SC_MIRACLE])
break;
- i = skill_id-SG_SUN_WARM;
- if (sd->bl.m == sd->feel_map[i].m)
+ if (sd->bl.m == sd->feel_map[skill_id-SG_SUN_WARM].m)
break;
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
@@ -12677,9 +12737,8 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
case SG_STAR_COMFORT:
if (sc && sc->data[SC_MIRACLE])
break;
- i = skill_id-SG_SUN_COMFORT;
- if (sd->bl.m == sd->feel_map[i].m &&
- (battle_config.allow_skill_without_day || pc->sg_info[i].day_func()))
+ if (sd->bl.m == sd->feel_map[skill_id-SG_SUN_COMFORT].m &&
+ (battle_config.allow_skill_without_day || pc->sg_info[skill_id-SG_SUN_COMFORT].day_func()))
break;
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
@@ -12760,7 +12819,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
**/
case AB_ANCILLA:
{
- int count = 0;
+ int count = 0, i;
for( i = 0; i < MAX_INVENTORY; i ++ )
if( sd->status.inventory[i].nameid == ITEMID_ANCILLA )
count += sd->status.inventory[i].amount;
@@ -12787,12 +12846,15 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
* Warlock
**/
case WL_COMET:
- if( skill->check_pc_partner(sd,skill_id,&skill_lv,1,0) <= 0 && ((i = pc->search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[i].amount < require.amount[0]) )
+ {
+ int idx;
+ if( skill->check_pc_partner(sd,skill_id,&skill_lv,1,0) <= 0 && ((idx = pc->search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[idx].amount < require.amount[0]) )
{
//clif->skill_fail(sd,skill_id,USESKILL_FAIL_NEED_ITEM,require.amount[0],require.itemid[0]);
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
+ }
break;
case WL_SUMMONFB:
case WL_SUMMONBL:
@@ -12801,10 +12863,9 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
case WL_TETRAVORTEX:
case WL_RELEASE:
{
- int x = SC_SUMMON1;
- i = 0;
- for(; x <= SC_SUMMON5; x++)
- if( sc && sc->data[x] )
+ int j, i = 0;
+ for(j = SC_SUMMON1; j <= SC_SUMMON5; j++)
+ if( sc && sc->data[j] )
i++;
switch(skill_id){
@@ -12815,8 +12876,8 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
break;
case WL_RELEASE:
- for(x = SC_SPELLBOOK7; x >= SC_SPELLBOOK1; x--)
- if( sc && sc->data[x] )
+ for(j = SC_SPELLBOOK7; j >= SC_SPELLBOOK1; j--)
+ if( sc && sc->data[j] )
i++;
if( i == 0 ){
clif->skill_fail(sd,skill_id,USESKILL_FAIL_SUMMON_NONE,0);
@@ -12912,12 +12973,11 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
break;
case SR_FALLENEMPIRE:
- if( !sc )
- return 0;
- if( (i=(sc && sc->data[SC_COMBOATTACK])) && sc->data[SC_COMBOATTACK]->val1 == SR_DRAGONCOMBO )
- break;
- if( i )
+ if( sc && sc->data[SC_COMBOATTACK] ) {
+ if( sc->data[SC_COMBOATTACK]->val1 == SR_DRAGONCOMBO )
+ break;
clif->skill_fail(sd, skill_id, USESKILL_FAIL_COMBOSKILL, SR_DRAGONCOMBO);
+ }
return 0;
case SR_CRESCENTELBOW:
if( sc && sc->data[SC_CRESCENTELBOW] ) {
@@ -13004,11 +13064,14 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
break;
case KO_KAIHOU:
case KO_ZENKAI:
- ARR_FIND(1, 6, i, sd->charm[i] > 0);
+ {
+ int i;
+ ARR_FIND(1, 6, i, sd->charm[i] > 0); // FIXME: 4 or 6?
if( i > 4 ) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_SUMMON,0);
return 0;
}
+ }
break;
}
@@ -13219,7 +13282,7 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
if( sd->chatID )
return 0;
- if( pc->has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) {
+ if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) {
//GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check.
sd->spiritball_old = sd->spiritball; //Need to do Spiritball check.
@@ -14889,17 +14952,17 @@ int skill_chastle_mob_changetarget(struct block_list *bl,va_list ap)
int skill_trap_splash(struct block_list *bl, va_list ap) {
struct block_list *src;
int64 tick;
- struct skill_unit *su;
+ struct skill_unit *src_su;
struct skill_unit_group *sg;
struct block_list *ss;
src = va_arg(ap,struct block_list *);
- su = (struct skill_unit *)src;
+ src_su = (struct skill_unit *)src;
tick = va_arg(ap,int64);
- if( !su->alive || bl->prev == NULL )
+ if( !src_su->alive || bl->prev == NULL )
return 0;
- nullpo_ret(sg = su->group);
+ nullpo_ret(sg = src_su->group);
nullpo_ret(ss = map->id2bl(sg->src_id));
if(battle->check_target(src,bl,sg->target_flag) <= 0)
@@ -16103,11 +16166,11 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
}
if( skill_id == RK_RUNEMASTERY ) {
- int temp_qty, skill_lv = pc->checkskill(sd,skill_id);
+ int temp_qty, rune_skill_lv = pc->checkskill(sd,skill_id);
data = itemdb->search(nameid);
- if( skill_lv == 10 ) temp_qty = 1 + rnd()%3;
- else if( skill_lv > 5 ) temp_qty = 1 + rnd()%2;
+ if( rune_skill_lv == 10 ) temp_qty = 1 + rnd()%3;
+ else if( rune_skill_lv > 5 ) temp_qty = 1 + rnd()%2;
else temp_qty = 1;
if (data->stack.inventory) {
@@ -17078,10 +17141,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
if( !(cd = idb_get(skill->cd_db,sd->status.char_id)) ) {// create a new skill cooldown object for map storage
cd = ers_alloc(skill->cd_ers, struct skill_cd);
-
- cd->cursor = 0;
- memset(cd->entry, 0, sizeof(cd->entry));
-
+
idb_put( skill->cd_db, sd->status.char_id, cd );
} else {
int i;
@@ -17846,8 +17906,8 @@ bool skill_parse_row_unitdb(char* split[], int columns, int current) {
if( !idx ) // invalid skill id
return false;
- skill->db[idx].unit_id[0] = strtol(split[1],NULL,16);
- skill->db[idx].unit_id[1] = strtol(split[2],NULL,16);
+ skill->db[idx].unit_id[0] = (int)strtol(split[1],NULL,16);
+ skill->db[idx].unit_id[1] = (int)strtol(split[2],NULL,16);
skill->split_atoi(split[3],skill->db[idx].unit_layout_type);
skill->split_atoi(split[4],skill->db[idx].unit_range);
skill->db[idx].unit_interval = atoi(split[5]);
@@ -17862,9 +17922,9 @@ bool skill_parse_row_unitdb(char* split[], int columns, int current) {
else if( strcmpi(split[6],"self")==0 ) skill->db[idx].unit_target = BCT_SELF;
else if( strcmpi(split[6],"sameguild")==0 ) skill->db[idx].unit_target = BCT_GUILD|BCT_SAMEGUILD;
else if( strcmpi(split[6],"noone")==0 ) skill->db[idx].unit_target = BCT_NOONE;
- else skill->db[idx].unit_target = strtol(split[6],NULL,16);
+ else skill->db[idx].unit_target = (int)strtol(split[6],NULL,16);
- skill->db[idx].unit_flag = strtol(split[7],NULL,16);
+ skill->db[idx].unit_flag = (int)strtol(split[7],NULL,16);
if (skill->db[idx].unit_flag&UF_DEFNOTENEMY && battle_config.defnotenemy)
skill->db[idx].unit_target = BCT_NOENEMY;
@@ -18152,9 +18212,9 @@ int do_init_skill(bool minimal) {
skill->cd_db = idb_alloc(DB_OPT_BASE);
skill->usave_db = idb_alloc(DB_OPT_RELEASE_DATA);
- skill->unit_ers = ers_new(sizeof(struct skill_unit_group),"skill.c::skill_unit_ers",ERS_OPT_NONE);
+ skill->unit_ers = ers_new(sizeof(struct skill_unit_group),"skill.c::skill_unit_ers",ERS_OPT_CLEAN);
skill->timer_ers = ers_new(sizeof(struct skill_timerskill),"skill.c::skill_timer_ers",ERS_OPT_NONE);
- skill->cd_ers = ers_new(sizeof(struct skill_cd),"skill.c::skill_cd_ers",ERS_OPT_CLEAR);
+ skill->cd_ers = ers_new(sizeof(struct skill_cd),"skill.c::skill_cd_ers",ERS_OPT_CLEAR|ERS_OPT_CLEAN);
skill->cd_entry_ers = ers_new(sizeof(struct skill_cd_entry),"skill.c::skill_cd_entry_ers",ERS_OPT_CLEAR);
ers_chunk_size(skill->cd_ers, 25);
diff --git a/src/map/skill.h b/src/map/skill.h
index 1b6f1e24c..28cb548d2 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1871,7 +1871,7 @@ struct skill_interface {
int (*get_casttype) (uint16 skill_id);
int (*get_casttype2) (uint16 index);
int (*name2id) (const char* name);
- int (*isammotype) (struct map_session_data *sd, int skill);
+ int (*isammotype) (struct map_session_data *sd, int skill_id);
int (*castend_id) (int tid, int64 tick, int id, intptr_t data);
int (*castend_pos) (int tid, int64 tick, int id, intptr_t data);
int (*castend_map) ( struct map_session_data *sd,uint16 skill_id, const char *mapname);
diff --git a/src/map/status.c b/src/map/status.c
index 29a1689a1..f6ca1ff00 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1168,6 +1168,21 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp,
if( hp && !(flag&1) ) {
if( sc ) {
struct status_change_entry *sce;
+
+#ifdef DEVOTION_REFLECT_DAMAGE
+ if(src && (sce = sc->data[SC_DEVOTION])) {
+ struct block_list *d_bl = map->id2bl(sce->val1);
+
+ if(d_bl &&((d_bl->type == BL_MER && ((TBL_MER *)d_bl)->master && ((TBL_MER *)d_bl)->master->bl.id == target->id)
+ || (d_bl->type == BL_PC && ((TBL_PC *)d_bl)->devotion[sce->val2] == target->id)) && check_distance_bl(target, d_bl, sce->val3)) {
+ clif->damage(d_bl, d_bl, 0, 0, hp, 0, 0, 0);
+ status_fix_damage(NULL, d_bl, hp, 0);
+ return 0;
+ }
+ status_change_end(target, SC_DEVOTION, INVALID_TIMER);
+ }
+#endif
+
if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
status_change_end(target, SC_STONE, INVALID_TIMER);
status_change_end(target, SC_FREEZE, INVALID_TIMER);
@@ -1418,34 +1433,28 @@ int status_percent_change(struct block_list *src,struct block_list *target,signe
st = status->get_status_data(target);
-
- //It's safe now [MarkZD]
- if (hp_rate > 99)
- hp = st->hp;
- else if (hp_rate > 0)
- hp = st->hp>10000?
- hp_rate*(st->hp/100):
- ((int64)hp_rate*st->hp)/100;
- else if (hp_rate < -99)
- hp = st->max_hp;
- else if (hp_rate < 0)
- hp = st->max_hp>10000?
- (-hp_rate)*(st->max_hp/100):
- ((int64)-hp_rate*st->max_hp)/100;
+ if (hp_rate > 100)
+ hp_rate = 100;
+ else if (hp_rate < -100)
+ hp_rate = -100;
+ if (hp_rate > 0)
+ hp = APPLY_RATE(st->hp, hp_rate);
+ else
+ hp = APPLY_RATE(st->max_hp, -hp_rate);
if (hp_rate && !hp)
hp = 1;
if (flag == 2 && hp >= st->hp)
hp = st->hp-1; //Must not kill target.
- if (sp_rate > 99)
- sp = st->sp;
- else if (sp_rate > 0)
- sp = ((int64)sp_rate*st->sp)/100;
- else if (sp_rate < -99)
- sp = st->max_sp;
- else if (sp_rate < 0)
- sp = ((int64)-sp_rate)*st->max_sp/100;
+ if (sp_rate > 100)
+ sp_rate = 100;
+ else if (sp_rate < -100)
+ sp_rate = -100;
+ if (sp_rate > 0)
+ sp = APPLY_RATE(st->sp, sp_rate);
+ else
+ sp = APPLY_RATE(st->max_sp, -sp_rate);
if (sp_rate && !sp)
sp = 1;
@@ -1479,8 +1488,8 @@ int status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per
if (st == &status->dummy)
return 0; //Invalid target.
- hp = (int64)st->max_hp * per_hp/100;
- sp = (int64)st->max_sp * per_sp/100;
+ hp = APPLY_RATE(st->max_hp, per_hp);
+ sp = APPLY_RATE(st->max_sp, per_sp);
if(hp > st->max_hp - st->hp)
hp = st->max_hp - st->hp;
@@ -1752,14 +1761,16 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
bool is_detect = ((st->mode&MD_DETECTOR)?true:false);//god-knows-why gcc doesn't shut up until this happens
if (pc_isinvisible(sd))
return 0;
- if (tsc->option&hide_flag && !is_boss &&
- ((sd->special_state.perfect_hiding || !is_detect) ||
- (tsc->data[SC_CLOAKINGEXCEED] && is_detect)))
- return 0;
- if( tsc->data[SC_CAMOUFLAGE] && !(is_boss || is_detect) && !skill_id )
- return 0;
- if( tsc->data[SC_STEALTHFIELD] && !is_boss )
- return 0;
+ if( tsc ) {
+ if (tsc->option&hide_flag && !is_boss &&
+ ((sd->special_state.perfect_hiding || !is_detect) ||
+ (tsc->data[SC_CLOAKINGEXCEED] && is_detect)))
+ return 0;
+ if( tsc->data[SC_CAMOUFLAGE] && !(is_boss || is_detect) && !skill_id )
+ return 0;
+ if( tsc->data[SC_STEALTHFIELD] && !is_boss )
+ return 0;
+ }
}
break;
case BL_ITEM: //Allow targetting of items to pick'em up (or in the case of mobs, to loot them).
@@ -1792,38 +1803,41 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
//Checks whether the source can see and chase target.
int status_check_visibility(struct block_list *src, struct block_list *target) {
int view_range;
- struct status_data *st = status->get_status_data(src);
- struct status_change *tsc = status->get_sc(target);
+ struct status_change *tsc = NULL;
+
switch (src->type) {
- case BL_MOB:
- view_range = ((TBL_MOB*)src)->min_chase;
- break;
- case BL_PET:
- view_range = ((TBL_PET*)src)->db->range2;
- break;
- default:
- view_range = AREA_SIZE;
+ case BL_MOB:
+ view_range = ((TBL_MOB*)src)->min_chase;
+ break;
+ case BL_PET:
+ view_range = ((TBL_PET*)src)->db->range2;
+ break;
+ default:
+ view_range = AREA_SIZE;
}
if (src->m != target->m || !check_distance_bl(src, target, view_range))
return 0;
- if( tsc && tsc->data[SC_STEALTHFIELD] )
- return 0;
-
- switch (target->type)
- { //Check for chase-walk/hiding/cloaking opponents.
- case BL_PC:
- if ( tsc->data[SC_CLOAKINGEXCEED] && !(st->mode&MD_BOSS) )
- return 0;
- if( (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || tsc->data[SC__INVISIBILITY] || tsc->data[SC_CAMOUFLAGE]) && !(st->mode&MD_BOSS) &&
- ( ((TBL_PC*)target)->special_state.perfect_hiding || !(st->mode&MD_DETECTOR) ) )
- return 0;
- break;
- default:
- if( tsc && (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || tsc->data[SC__INVISIBILITY] || tsc->data[SC_CAMOUFLAGE]) && !(st->mode&(MD_BOSS|MD_DETECTOR)) )
+ if( ( tsc = status->get_sc(target) ) ) {
+ struct status_data *st = status->get_status_data(src);
+
+ if( tsc->data[SC_STEALTHFIELD] )
return 0;
+ switch (target->type) { //Check for chase-walk/hiding/cloaking opponents.
+ case BL_PC:
+ if ( tsc->data[SC_CLOAKINGEXCEED] && !(st->mode&MD_BOSS) )
+ return 0;
+ if( (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || tsc->data[SC__INVISIBILITY] || tsc->data[SC_CAMOUFLAGE]) && !(st->mode&MD_BOSS) &&
+ ( ((TBL_PC*)target)->special_state.perfect_hiding || !(st->mode&MD_DETECTOR) ) )
+ return 0;
+ break;
+ default:
+ if( (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || tsc->data[SC__INVISIBILITY] || tsc->data[SC_CAMOUFLAGE]) && !(st->mode&(MD_BOSS|MD_DETECTOR)) )
+ return 0;
+
+ }
}
return 1;
@@ -1836,11 +1850,11 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
short mod = -1;
switch( sd->weapontype2 ){ // adjustment for dual weilding
- case W_DAGGER: mod = 0; break; // 0, 1, 1
- case W_1HSWORD:
- case W_1HAXE: mod = 1;
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_GUILLOTINE_CROSS ) // 0, 2, 3
- mod = sd->weapontype2 / W_1HSWORD + W_1HSWORD / sd->weapontype2 ;
+ case W_DAGGER: mod = 0; break; // 0, 1, 1
+ case W_1HSWORD:
+ case W_1HAXE: mod = 1;
+ if( (sd->class_&MAPID_THIRDMASK) == MAPID_GUILLOTINE_CROSS ) // 0, 2, 3
+ mod = sd->weapontype2 / W_1HSWORD + W_1HSWORD / sd->weapontype2 ;
}
amotion = ( sd->status.weapon < MAX_WEAPON_TYPE && mod < 0 )
@@ -1863,9 +1877,14 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
// percentual delay reduction from stats
amotion -= amotion * (4*st->agi + st->dex)/1000;
#endif
+
// raw delay adjustment from bAspd bonus
amotion += sd->bonus.aspd_add;
+ /* angra manyu disregards aspd_base and similar */
+ if( sd->equip_index[EQI_HAND_R] >= 0 && sd->status.inventory[sd->equip_index[EQI_HAND_R]].nameid == ITEMID_ANGRA_MANYU )
+ return 0;
+
return amotion;
}
@@ -2049,12 +2068,13 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt) {
mbl = map->id2bl(md->master_id);
if (flag&8 && mbl) {
- struct status_data *mstatus = status->get_base_status(mbl);
- if (mstatus &&
- battle_config.slaves_inherit_speed&(mstatus->mode&MD_CANMOVE?1:2))
- mstatus->speed = mstatus->speed;
- if( mstatus->speed < 2 ) /* minimum for the unit to function properly */
- mstatus->speed = 2;
+ struct status_data *masterstatus = status->get_base_status(mbl);
+ if ( masterstatus ) {
+ if( battle_config.slaves_inherit_speed&(masterstatus->mode&MD_CANMOVE?1:2) )
+ masterstatus->speed = masterstatus->speed;
+ if( masterstatus->speed < 2 ) /* minimum for the unit to function properly */
+ masterstatus->speed = 2;
+ }
}
if (flag&16 && mbl) {
@@ -2453,10 +2473,11 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
pc->delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true);
// Parse equipment.
- for(i=0;i<EQI_MAX-1;i++) {
+ for(i=0;i<EQI_MAX;i++) {
status->current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to status->current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
if(index < 0)
continue;
+ if(i == EQI_AMMO) continue;/* ammo has special handler down there */
if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index)
continue;
if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index)
@@ -2588,10 +2609,11 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
bstatus->def += (refinedef+50)/100;
//Parse Cards
- for(i=0;i<EQI_MAX-1;i++) {
+ for(i=0;i<EQI_MAX;i++) {
status->current_equip_item_index = index = sd->equip_index[i]; //We pass INDEX to status->current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus]
if(index < 0)
continue;
+ if(i == EQI_AMMO) continue;/* ammo doesn't have cards */
if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index)
continue;
if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index)
@@ -2765,9 +2787,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if(sd->hprate < 0)
sd->hprate = 0;
if(sd->hprate!=100)
- bstatus->max_hp = (int64)bstatus->max_hp * sd->hprate/100;
+ bstatus->max_hp = APPLY_RATE(bstatus->max_hp, sd->hprate);
if(battle_config.hp_rate != 100)
- bstatus->max_hp = (int64)bstatus->max_hp * battle_config.hp_rate/100;
+ bstatus->max_hp = APPLY_RATE(bstatus->max_hp, battle_config.hp_rate);
if(bstatus->max_hp > (unsigned int)battle_config.max_hp)
bstatus->max_hp = battle_config.max_hp;
@@ -2799,9 +2821,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if(sd->sprate < 0)
sd->sprate = 0;
if(sd->sprate!=100)
- bstatus->max_sp = (int64)bstatus->max_sp * sd->sprate/100;
+ bstatus->max_sp = APPLY_RATE(bstatus->max_sp, sd->sprate);
if(battle_config.sp_rate != 100)
- bstatus->max_sp = (int64)bstatus->max_sp * battle_config.sp_rate/100;
+ bstatus->max_sp = APPLY_RATE(bstatus->max_sp, battle_config.sp_rate);
if(bstatus->max_sp > (unsigned int)battle_config.max_sp)
bstatus->max_sp = battle_config.max_sp;
@@ -2820,11 +2842,11 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
&& battle_config.restart_hp_rate < 50)
bstatus->hp = bstatus->max_hp>>1;
else
- bstatus->hp = (int64)bstatus->max_hp * battle_config.restart_hp_rate/100;
+ bstatus->hp = APPLY_RATE(bstatus->max_hp, battle_config.restart_hp_rate);
if(!bstatus->hp)
bstatus->hp = 1;
- bstatus->sp = (int64)bstatus->max_sp * battle_config.restart_sp_rate /100;
+ bstatus->sp = APPLY_RATE(bstatus->max_sp, battle_config.restart_sp_rate);
if( !bstatus->sp ) /* the minimum for the respawn setting is SP:1 */
bstatus->sp = 1;
@@ -6560,10 +6582,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_NIBELUNGEN:
case SC_INTOABYSS:
case SC_SIEGFRIED:
- if( bl->type == BL_PC) {
- struct map_session_data *sd = BL_CAST(BL_PC,bl);
- if (!sd->status.party_id) return 0;
- }
+ if( sd && !sd->status.party_id )
+ return 0;
break;
case SC_ANGRIFFS_MODUS:
case SC_GOLDENE_FERSE:
@@ -7289,7 +7309,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val2 = val1*20; //SP gained
break;
case SC_KYRIE:
- val2 = (int64)st->max_hp * (val1 * 2 + 10) / 100; //%Max HP to absorb
+ val2 = APPLY_RATE(st->max_hp, (val1 * 2 + 10)); //%Max HP to absorb
val3 = (val1 / 2 + 5); //Hits
break;
case SC_MAGICPOWER:
@@ -7946,11 +7966,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if (sd->mapindex != val2)
{
int pos = (bl->x&0xFFFF)|(bl->y<<16); /// Current Coordinates
- int mapindex = sd->mapindex; /// Current Map
+ int map_index = sd->mapindex; /// Current Map
//1. Place in Jail (val2 -> Jail Map, val3 -> x, val4 -> y
pc->setpos(sd,(unsigned short)val2,val3,val4, CLR_TELEPORT);
//2. Set restore point (val3 -> return map, val4 return coords
- val3 = mapindex;
+ val3 = map_index;
val4 = pos;
} else if (!val3 || val3 == sd->mapindex) { //Use save point.
val3 = sd->status.save_point.map;
@@ -9389,15 +9409,15 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
case SC_BLADESTOP:
if(sce->val4) {
- int tid = sce->val4;
- struct block_list *tbl = map->id2bl(tid);
+ int target_id = sce->val4;
+ struct block_list *tbl = map->id2bl(target_id);
struct status_change *tsc = status->get_sc(tbl);
sce->val4 = 0;
if(tbl && tsc && tsc->data[SC_BLADESTOP]) {
tsc->data[SC_BLADESTOP]->val4 = 0;
status_change_end(tbl, SC_BLADESTOP, INVALID_TIMER);
}
- clif->bladestop(bl, tid, 0);
+ clif->bladestop(bl, target_id, 0);
}
break;
case SC_DANCING:
@@ -9695,8 +9715,8 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
case SC_CURSEDCIRCLE_TARGET:
{
struct block_list *src = map->id2bl(sce->val2);
- struct status_change *sc = status->get_sc(src);
- if( sc && sc->data[SC_CURSEDCIRCLE_ATKER] && --(sc->data[SC_CURSEDCIRCLE_ATKER]->val2) == 0 ){
+ struct status_change *ssc = status->get_sc(src);
+ if( ssc && ssc->data[SC_CURSEDCIRCLE_ATKER] && --(ssc->data[SC_CURSEDCIRCLE_ATKER]->val2) == 0 ){
status_change_end(src, SC_CURSEDCIRCLE_ATKER, INVALID_TIMER);
clif->bladestop(bl, sce->val2, 0);
}
@@ -9706,8 +9726,8 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
if( sce->val2 ){
struct block_list *src = map->id2bl(sce->val2);
if(src) {
- struct status_change *sc = status->get_sc(src);
- sc->bs_counter--;
+ struct status_change *ssc = status->get_sc(src);
+ ssc->bs_counter--;
}
}
break;
@@ -9925,7 +9945,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
else if(opt_flag) {
clif->changeoption(bl);
if( sd && opt_flag&0x4 ) {
- clif->changelook(bl,LOOK_BASE,vd->class_);
+ clif->changelook(bl,LOOK_BASE,sd->vd.class_);
clif->get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield);
clif->changelook(bl,LOOK_WEAPON,sd->vd.weapon);
clif->changelook(bl,LOOK_SHIELD,sd->vd.shield);
@@ -10964,7 +10984,7 @@ int status_get_matk(struct block_list *bl, int flag) {
st->matk_min = status_base_matk_min(st) + (sd?sd->bonus.ematk:0);
st->matk_max = status_base_matk_max(st) + (sd?sd->bonus.ematk:0);
#endif
- if (bl->type&BL_PC && sd->matk_rate != 100) {
+ if (sd && sd->matk_rate != 100) {
st->matk_max = st->matk_max * sd->matk_rate/100;
st->matk_min = st->matk_min * sd->matk_rate/100;
}
diff --git a/src/map/status.h b/src/map/status.h
index 75582e9a4..cdf3e03d6 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -14,6 +14,21 @@ struct homun_data;
struct mercenary_data;
struct status_change;
+//Change the equation when the values are high enough to discard the
+//imprecision in exchange of overflow protection [Skotlex]
+//Also add 100% checks since those are the most used cases where we don't
+//want aproximation errors.
+#define APPLY_RATE(value, rate) ( \
+ (rate) == 100 ? \
+ (value) \
+ : ( \
+ (value) > 100000 ? \
+ (rate) * ( (value) / 100 ) \
+ : \
+ (value) * (rate) / 100 \
+ ) \
+)
+
/**
* Max Refine available to your server
* Changing this limit requires edits to refine_db.txt
@@ -1925,7 +1940,7 @@ struct status_interface {
int (*calc_homunculus_) (struct homun_data *hd, enum e_status_calc_opt opt);
int (*calc_mercenary_) (struct mercenary_data *md, enum e_status_calc_opt opt);
int (*calc_elemental_) (struct elemental_data *ed, enum e_status_calc_opt opt);
- void (*calc_misc) (struct block_list *bl, struct status_data *status, int level);
+ void (*calc_misc) (struct block_list *bl, struct status_data *st, int level);
void (*calc_regen) (struct block_list *bl, struct status_data *st, struct regen_data *regen);
void (*calc_regen_rate) (struct block_list *bl, struct regen_data *regen, struct status_change *sc);
int (*check_skilluse) (struct block_list *src, struct block_list *target, uint16 skill_id, int flag); // [Skotlex]
diff --git a/src/map/storage.c b/src/map/storage.c
index db85b3c98..e65ed7b80 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -85,7 +85,7 @@ int storage_storageopen(struct map_session_data *sd)
if(sd->state.storage_flag)
return 1; //Already open?
- if( !pc->can_give_items(sd) )
+ if( !pc_can_give_items(sd) )
{ //check is this GM level is allowed to put items to storage
clif->message(sd->fd, msg_txt(246));
return 1;
@@ -135,13 +135,13 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo
return 1;
}
- if( !itemdb_canstore(item_data, pc->get_group_level(sd)) )
+ if( !itemdb_canstore(item_data, pc_get_group_level(sd)) )
{ //Check if item is storable. [Skotlex]
clif->message (sd->fd, msg_txt(264));
return 1;
}
- if( item_data->bound > IBT_ACCOUNT && !pc->can_give_bound_items(sd) ) {
+ if( item_data->bound > IBT_ACCOUNT && !pc_can_give_bound_items(sd) ) {
clif->message(sd->fd, msg_txt(294));
return 1;
}
@@ -387,7 +387,7 @@ int storage_guild_storageopen(struct map_session_data* sd)
if(sd->state.storage_flag)
return 1; //Can't open both storages at a time.
- if( !pc->can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus]
+ if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus]
clif->message(sd->fd, msg_txt(246));
return 1;
}
@@ -435,13 +435,13 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
return 1;
}
- if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time )
+ if( !itemdb_canguildstore(item_data, pc_get_group_level(sd)) || item_data->expire_time )
{ //Check if item is storable. [Skotlex]
clif->message (sd->fd, msg_txt(264));
return 1;
}
- if( item_data->bound && item_data->bound != IBT_GUILD && !pc->can_give_bound_items(sd) ) {
+ if( item_data->bound && item_data->bound != IBT_GUILD && !pc_can_give_bound_items(sd) ) {
clif->message(sd->fd, msg_txt(294));
return 1;
}
diff --git a/src/map/trade.c b/src/map/trade.c
index ffd1336f5..6f079bdd3 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -69,7 +69,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta
return;
}
- if (!pc->can_give_items(sd) || !pc->can_give_items(target_sd)) //check if both GMs are allowed to trade
+ if (!pc_can_give_items(sd) || !pc_can_give_items(target_sd)) //check if both GMs are allowed to trade
{
clif->message(sd->fd, msg_txt(246));
clif->tradestart(sd, 2); // GM is not allowed to trade
@@ -348,8 +348,8 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount)
return;
item = &sd->status.inventory[index];
- src_lv = pc->get_group_level(sd);
- dst_lv = pc->get_group_level(target_sd);
+ src_lv = pc_get_group_level(sd);
+ dst_lv = pc_get_group_level(target_sd);
if( !itemdb_cantrade(item, src_lv, dst_lv) && //Can't trade
(pc->get_partner(sd) != target_sd || !itemdb_canpartnertrade(item, src_lv, dst_lv)) ) //Can't partner-trade
{
@@ -368,7 +368,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount)
if( item->bound &&
!( item->bound == IBT_GUILD && sd->status.guild_id == target_sd->status.guild_id ) &&
!( item->bound == IBT_PARTY && sd->status.party_id == target_sd->status.party_id )
- && !pc->can_give_bound_items(sd) ) {
+ && !pc_can_give_bound_items(sd) ) {
clif->message(sd->fd, msg_txt(293));
clif->tradeitemok(sd, index+2, TIO_INDROCKS);
return;
diff --git a/src/map/unit.c b/src/map/unit.c
index 872ad1f8b..7f722684d 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -670,15 +670,15 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool
if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 )
{ // Check if pet needs to be teleported. [Skotlex]
int flag = 0;
- struct block_list* bl = &sd->pd->bl;
- if( !checkpath && !path->search(NULL,bl->m,bl->x,bl->y,dst_x,dst_y,0,CELL_CHKNOPASS) )
+ struct block_list* pbl = &sd->pd->bl;
+ if( !checkpath && !path->search(NULL,pbl->m,pbl->x,pbl->y,dst_x,dst_y,0,CELL_CHKNOPASS) )
flag = 1;
- else if (!check_distance_bl(&sd->bl, bl, AREA_SIZE)) //Too far, teleport.
+ else if (!check_distance_bl(&sd->bl, pbl, AREA_SIZE)) //Too far, teleport.
flag = 2;
if( flag )
{
- unit->movepos(bl,sd->bl.x,sd->bl.y, 0, 0);
- clif->slide(bl,bl->x,bl->y);
+ unit->movepos(pbl,sd->bl.x,sd->bl.y, 0, 0);
+ clif->slide(pbl,pbl->x,pbl->y);
}
}
}
@@ -720,6 +720,8 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
struct skill_unit* su = NULL;
int nx, ny, result;
+ nullpo_ret(bl);
+
sd = BL_CAST(BL_PC, bl);
su = BL_CAST(BL_SKILL, bl);
@@ -2393,6 +2395,11 @@ int unit_free(struct block_list *bl, clr_type clrtype) {
aFree(sd->queues);
sd->queues = NULL;
}
+ if( sd->quest_log != NULL ) {
+ aFree(sd->quest_log);
+ sd->quest_log = NULL;
+ sd->num_quests = sd->avail_quests = 0;
+ }
for( k = 0; k < sd->hdatac; k++ ) {
if( sd->hdata[k]->flag.free ) {
diff --git a/src/map/vending.c b/src/map/vending.c
index f16a208e4..7d248351c 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -53,7 +53,7 @@ void vending_vendinglistreq(struct map_session_data* sd, unsigned int id) {
if( !vsd->state.vending )
return; // not vending
- if (!pc->can_give_items(sd) || !pc->can_give_items(vsd)) { //check if both GMs are allowed to trade
+ if (!pc_can_give_items(sd) || !pc_can_give_items(vsd)) { //check if both GMs are allowed to trade
// GM is not allowed to trade
clif->message(sd->fd, msg_txt(246));
return;
@@ -257,8 +257,8 @@ void vending_openvending(struct map_session_data* sd, const char* message, const
|| !sd->status.cart[index].identify // unidentified item
|| sd->status.cart[index].attribute == 1 // broken item
|| sd->status.cart[index].expire_time // It should not be in the cart but just in case
- || (sd->status.cart[index].bound && !pc->can_give_bound_items(sd)) // can't trade bound items w/o permission
- || !itemdb_cantrade(&sd->status.cart[index], pc->get_group_level(sd), pc->get_group_level(sd)) ) // untradeable item
+ || (sd->status.cart[index].bound && !pc_can_give_bound_items(sd)) // can't trade bound items w/o permission
+ || !itemdb_cantrade(&sd->status.cart[index], pc_get_group_level(sd), pc_get_group_level(sd)) ) // untradeable item
continue;
sd->vending[i].index = index;
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 9914c2f17..3303e93ae 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -3479,16 +3479,12 @@ struct {
struct HPMHookPoint *HP_pc_get_dummy_sd_post;
struct HPMHookPoint *HP_pc_class2idx_pre;
struct HPMHookPoint *HP_pc_class2idx_post;
- struct HPMHookPoint *HP_pc_get_group_level_pre;
- struct HPMHookPoint *HP_pc_get_group_level_post;
struct HPMHookPoint *HP_pc_can_give_items_pre;
struct HPMHookPoint *HP_pc_can_give_items_post;
struct HPMHookPoint *HP_pc_can_give_bound_items_pre;
struct HPMHookPoint *HP_pc_can_give_bound_items_post;
struct HPMHookPoint *HP_pc_can_use_command_pre;
struct HPMHookPoint *HP_pc_can_use_command_post;
- struct HPMHookPoint *HP_pc_has_permission_pre;
- struct HPMHookPoint *HP_pc_has_permission_post;
struct HPMHookPoint *HP_pc_set_group_pre;
struct HPMHookPoint *HP_pc_set_group_post;
struct HPMHookPoint *HP_pc_should_log_commands_pre;
@@ -3949,10 +3945,12 @@ struct {
struct HPMHookPoint *HP_pet_read_db_post;
struct HPMHookPoint *HP_quest_init_pre;
struct HPMHookPoint *HP_quest_init_post;
+ struct HPMHookPoint *HP_quest_final_pre;
+ struct HPMHookPoint *HP_quest_final_post;
struct HPMHookPoint *HP_quest_reload_pre;
struct HPMHookPoint *HP_quest_reload_post;
- struct HPMHookPoint *HP_quest_search_db_pre;
- struct HPMHookPoint *HP_quest_search_db_post;
+ struct HPMHookPoint *HP_quest_db_pre;
+ struct HPMHookPoint *HP_quest_db_post;
struct HPMHookPoint *HP_quest_pc_login_pre;
struct HPMHookPoint *HP_quest_pc_login_post;
struct HPMHookPoint *HP_quest_add_pre;
@@ -3969,6 +3967,8 @@ struct {
struct HPMHookPoint *HP_quest_update_status_post;
struct HPMHookPoint *HP_quest_check_pre;
struct HPMHookPoint *HP_quest_check_post;
+ struct HPMHookPoint *HP_quest_clear_pre;
+ struct HPMHookPoint *HP_quest_clear_post;
struct HPMHookPoint *HP_quest_read_db_pre;
struct HPMHookPoint *HP_quest_read_db_post;
struct HPMHookPoint *HP_script_init_pre;
@@ -3979,6 +3979,8 @@ struct {
struct HPMHookPoint *HP_script_reload_post;
struct HPMHookPoint *HP_script_parse_pre;
struct HPMHookPoint *HP_script_parse_post;
+ struct HPMHookPoint *HP_script_add_builtin_pre;
+ struct HPMHookPoint *HP_script_add_builtin_post;
struct HPMHookPoint *HP_script_parse_builtin_pre;
struct HPMHookPoint *HP_script_parse_builtin_post;
struct HPMHookPoint *HP_script_parse_subexpr_pre;
@@ -4089,8 +4091,6 @@ struct {
struct HPMHookPoint *HP_script_reportdata_post;
struct HPMHookPoint *HP_script_reportfunc_pre;
struct HPMHookPoint *HP_script_reportfunc_post;
- struct HPMHookPoint *HP_script_disp_error_message2_pre;
- struct HPMHookPoint *HP_script_disp_error_message2_post;
struct HPMHookPoint *HP_script_disp_warning_message_pre;
struct HPMHookPoint *HP_script_disp_warning_message_post;
struct HPMHookPoint *HP_script_check_event_pre;
@@ -4211,10 +4211,8 @@ struct {
struct HPMHookPoint *HP_script_run_func_post;
struct HPMHookPoint *HP_script_getfuncname_pre;
struct HPMHookPoint *HP_script_getfuncname_post;
- struct HPMHookPoint *HP_script_local_casecheck_add_str_pre;
- struct HPMHookPoint *HP_script_local_casecheck_add_str_post;
- struct HPMHookPoint *HP_script_local_casecheck_clear_pre;
- struct HPMHookPoint *HP_script_local_casecheck_clear_post;
+ struct HPMHookPoint *HP_script_calc_hash_ci_pre;
+ struct HPMHookPoint *HP_script_calc_hash_ci_post;
struct HPMHookPoint *HP_searchstore_open_pre;
struct HPMHookPoint *HP_searchstore_open_post;
struct HPMHookPoint *HP_searchstore_query_pre;
@@ -8448,16 +8446,12 @@ struct {
int HP_pc_get_dummy_sd_post;
int HP_pc_class2idx_pre;
int HP_pc_class2idx_post;
- int HP_pc_get_group_level_pre;
- int HP_pc_get_group_level_post;
int HP_pc_can_give_items_pre;
int HP_pc_can_give_items_post;
int HP_pc_can_give_bound_items_pre;
int HP_pc_can_give_bound_items_post;
int HP_pc_can_use_command_pre;
int HP_pc_can_use_command_post;
- int HP_pc_has_permission_pre;
- int HP_pc_has_permission_post;
int HP_pc_set_group_pre;
int HP_pc_set_group_post;
int HP_pc_should_log_commands_pre;
@@ -8918,10 +8912,12 @@ struct {
int HP_pet_read_db_post;
int HP_quest_init_pre;
int HP_quest_init_post;
+ int HP_quest_final_pre;
+ int HP_quest_final_post;
int HP_quest_reload_pre;
int HP_quest_reload_post;
- int HP_quest_search_db_pre;
- int HP_quest_search_db_post;
+ int HP_quest_db_pre;
+ int HP_quest_db_post;
int HP_quest_pc_login_pre;
int HP_quest_pc_login_post;
int HP_quest_add_pre;
@@ -8938,6 +8934,8 @@ struct {
int HP_quest_update_status_post;
int HP_quest_check_pre;
int HP_quest_check_post;
+ int HP_quest_clear_pre;
+ int HP_quest_clear_post;
int HP_quest_read_db_pre;
int HP_quest_read_db_post;
int HP_script_init_pre;
@@ -8948,6 +8946,8 @@ struct {
int HP_script_reload_post;
int HP_script_parse_pre;
int HP_script_parse_post;
+ int HP_script_add_builtin_pre;
+ int HP_script_add_builtin_post;
int HP_script_parse_builtin_pre;
int HP_script_parse_builtin_post;
int HP_script_parse_subexpr_pre;
@@ -9058,8 +9058,6 @@ struct {
int HP_script_reportdata_post;
int HP_script_reportfunc_pre;
int HP_script_reportfunc_post;
- int HP_script_disp_error_message2_pre;
- int HP_script_disp_error_message2_post;
int HP_script_disp_warning_message_pre;
int HP_script_disp_warning_message_post;
int HP_script_check_event_pre;
@@ -9180,10 +9178,8 @@ struct {
int HP_script_run_func_post;
int HP_script_getfuncname_pre;
int HP_script_getfuncname_post;
- int HP_script_local_casecheck_add_str_pre;
- int HP_script_local_casecheck_add_str_post;
- int HP_script_local_casecheck_clear_pre;
- int HP_script_local_casecheck_clear_post;
+ int HP_script_calc_hash_ci_pre;
+ int HP_script_calc_hash_ci_post;
int HP_searchstore_open_pre;
int HP_searchstore_open_post;
int HP_searchstore_query_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 1d0ef8654..86e1cf53a 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1770,11 +1770,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->final, HP_pc_final) },
{ HP_POP(pc->get_dummy_sd, HP_pc_get_dummy_sd) },
{ HP_POP(pc->class2idx, HP_pc_class2idx) },
- { HP_POP(pc->get_group_level, HP_pc_get_group_level) },
{ HP_POP(pc->can_give_items, HP_pc_can_give_items) },
{ HP_POP(pc->can_give_bound_items, HP_pc_can_give_bound_items) },
{ HP_POP(pc->can_use_command, HP_pc_can_use_command) },
- { HP_POP(pc->has_permission, HP_pc_has_permission) },
{ HP_POP(pc->set_group, HP_pc_set_group) },
{ HP_POP(pc->should_log_commands, HP_pc_should_log_commands) },
{ HP_POP(pc->setrestartvalue, HP_pc_setrestartvalue) },
@@ -2007,8 +2005,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pet->read_db, HP_pet_read_db) },
/* quest */
{ HP_POP(quest->init, HP_quest_init) },
+ { HP_POP(quest->final, HP_quest_final) },
{ HP_POP(quest->reload, HP_quest_reload) },
- { HP_POP(quest->search_db, HP_quest_search_db) },
+ { HP_POP(quest->db, HP_quest_db) },
{ HP_POP(quest->pc_login, HP_quest_pc_login) },
{ HP_POP(quest->add, HP_quest_add) },
{ HP_POP(quest->change, HP_quest_change) },
@@ -2017,12 +2016,14 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(quest->update_objective, HP_quest_update_objective) },
{ HP_POP(quest->update_status, HP_quest_update_status) },
{ HP_POP(quest->check, HP_quest_check) },
+ { HP_POP(quest->clear, HP_quest_clear) },
{ HP_POP(quest->read_db, HP_quest_read_db) },
/* script */
{ HP_POP(script->init, HP_script_init) },
{ HP_POP(script->final, HP_script_final) },
{ HP_POP(script->reload, HP_script_reload) },
{ HP_POP(script->parse, HP_script_parse) },
+ { HP_POP(script->add_builtin, HP_script_add_builtin) },
{ HP_POP(script->parse_builtin, HP_script_parse_builtin) },
{ HP_POP(script->parse_subexpr, HP_script_parse_subexpr) },
{ HP_POP(script->skip_space, HP_script_skip_space) },
@@ -2078,7 +2079,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->reportsrc, HP_script_reportsrc) },
{ HP_POP(script->reportdata, HP_script_reportdata) },
{ HP_POP(script->reportfunc, HP_script_reportfunc) },
- { HP_POP(script->disp_error_message2, HP_script_disp_error_message2) },
{ HP_POP(script->disp_warning_message, HP_script_disp_warning_message) },
{ HP_POP(script->check_event, HP_script_check_event) },
{ HP_POP(script->calc_hash, HP_script_calc_hash) },
@@ -2139,8 +2139,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->cleanfloor_sub, HP_script_cleanfloor_sub) },
{ HP_POP(script->run_func, HP_script_run_func) },
{ HP_POP(script->getfuncname, HP_script_getfuncname) },
- { HP_POP(script->local_casecheck_add_str, HP_script_local_casecheck_add_str) },
- { HP_POP(script->local_casecheck_clear, HP_script_local_casecheck_clear) },
+ { HP_POP(script->calc_hash_ci, HP_script_calc_hash_ci) },
/* searchstore */
{ HP_POP(searchstore->open, HP_searchstore_open) },
{ HP_POP(searchstore->query, HP_searchstore_query) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 06a1299d5..c6f58a4c1 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -2545,14 +2545,14 @@ int HP_bg_team_delete(int bg_id) {
}
return retVal___;
}
-int HP_bg_team_warp(int bg_id, unsigned short mapindex, short x, short y) {
+int HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_bg_team_warp_pre ) {
- int (*preHookFunc) (int *bg_id, unsigned short *mapindex, short *x, short *y);
+ int (*preHookFunc) (int *bg_id, unsigned short *map_index, short *x, short *y);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_team_warp_pre[hIndex].func;
- retVal___ = preHookFunc(&bg_id, &mapindex, &x, &y);
+ retVal___ = preHookFunc(&bg_id, &map_index, &x, &y);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -2560,13 +2560,13 @@ int HP_bg_team_warp(int bg_id, unsigned short mapindex, short x, short y) {
}
}
{
- retVal___ = HPMHooks.source.bg.team_warp(bg_id, mapindex, x, y);
+ retVal___ = HPMHooks.source.bg.team_warp(bg_id, map_index, x, y);
}
if( HPMHooks.count.HP_bg_team_warp_post ) {
- int (*postHookFunc) (int retVal___, int *bg_id, unsigned short *mapindex, short *x, short *y);
+ int (*postHookFunc) (int retVal___, int *bg_id, unsigned short *map_index, short *x, short *y);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_bg_team_warp_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &bg_id, &mapindex, &x, &y);
+ retVal___ = postHookFunc(retVal___, &bg_id, &map_index, &x, &y);
}
}
return retVal___;
@@ -2675,14 +2675,14 @@ int HP_bg_member_respawn(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev) {
+int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, const char *dev) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_bg_create_pre ) {
- int (*preHookFunc) (unsigned short *mapindex, short *rx, short *ry, const char *ev, const char *dev);
+ int (*preHookFunc) (unsigned short *map_index, short *rx, short *ry, const char *ev, const char *dev);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_bg_create_pre[hIndex].func;
- retVal___ = preHookFunc(&mapindex, &rx, &ry, ev, dev);
+ retVal___ = preHookFunc(&map_index, &rx, &ry, ev, dev);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -2690,13 +2690,13 @@ int HP_bg_create(unsigned short mapindex, short rx, short ry, const char *ev, co
}
}
{
- retVal___ = HPMHooks.source.bg.create(mapindex, rx, ry, ev, dev);
+ retVal___ = HPMHooks.source.bg.create(map_index, rx, ry, ev, dev);
}
if( HPMHooks.count.HP_bg_create_post ) {
- int (*postHookFunc) (int retVal___, unsigned short *mapindex, short *rx, short *ry, const char *ev, const char *dev);
+ int (*postHookFunc) (int retVal___, unsigned short *map_index, short *rx, short *ry, const char *ev, const char *dev);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_bg_create_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &mapindex, &rx, &ry, ev, dev);
+ retVal___ = postHookFunc(retVal___, &map_index, &rx, &ry, ev, dev);
}
}
return retVal___;
@@ -9049,10 +9049,10 @@ void HP_clif_font(struct map_session_data *sd) {
}
return;
}
-void HP_clif_progressbar(struct map_session_data *sd, unsigned long color, unsigned int second) {
+void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsigned int second) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_progressbar_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, unsigned long *color, unsigned int *second);
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *color, unsigned int *second);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_progressbar_pre[hIndex].func;
preHookFunc(sd, &color, &second);
@@ -9066,7 +9066,7 @@ void HP_clif_progressbar(struct map_session_data *sd, unsigned long color, unsig
HPMHooks.source.clif.progressbar(sd, color, second);
}
if( HPMHooks.count.HP_clif_progressbar_post ) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned long *color, unsigned int *second);
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *color, unsigned int *second);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_progressbar_post[hIndex].func;
postHookFunc(sd, &color, &second);
@@ -10883,10 +10883,10 @@ void HP_clif_changechatstatus(struct chat_data *cd) {
}
return;
}
-void HP_clif_wis_message(int fd, const char *nick, const char *mes, int mes_len) {
+void HP_clif_wis_message(int fd, const char *nick, const char *mes, size_t mes_len) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_wis_message_pre ) {
- void (*preHookFunc) (int *fd, const char *nick, const char *mes, int *mes_len);
+ void (*preHookFunc) (int *fd, const char *nick, const char *mes, size_t *mes_len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_wis_message_pre[hIndex].func;
preHookFunc(&fd, nick, mes, &mes_len);
@@ -10900,7 +10900,7 @@ void HP_clif_wis_message(int fd, const char *nick, const char *mes, int mes_len)
HPMHooks.source.clif.wis_message(fd, nick, mes, mes_len);
}
if( HPMHooks.count.HP_clif_wis_message_post ) {
- void (*postHookFunc) (int *fd, const char *nick, const char *mes, int *mes_len);
+ void (*postHookFunc) (int *fd, const char *nick, const char *mes, size_t *mes_len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_wis_message_post[hIndex].func;
postHookFunc(&fd, nick, mes, &mes_len);
@@ -10933,10 +10933,10 @@ void HP_clif_wis_end(int fd, int flag) {
}
return;
}
-void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len) {
+void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, size_t len) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_disp_onlyself_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ void (*preHookFunc) (struct map_session_data *sd, const char *mes, size_t *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_onlyself_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_disp_onlyself_pre[hIndex].func;
preHookFunc(sd, mes, &len);
@@ -10950,7 +10950,7 @@ void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len
HPMHooks.source.clif.disp_onlyself(sd, mes, len);
}
if( HPMHooks.count.HP_clif_disp_onlyself_post ) {
- void (*postHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ void (*postHookFunc) (struct map_session_data *sd, const char *mes, size_t *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_onlyself_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_disp_onlyself_post[hIndex].func;
postHookFunc(sd, mes, &len);
@@ -10958,10 +10958,10 @@ void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len
}
return;
}
-void HP_clif_disp_message(struct block_list *src, const char *mes, int len, enum send_target target) {
+void HP_clif_disp_message(struct block_list *src, const char *mes, size_t len, enum send_target target) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_disp_message_pre ) {
- void (*preHookFunc) (struct block_list *src, const char *mes, int *len, enum send_target *target);
+ void (*preHookFunc) (struct block_list *src, const char *mes, size_t *len, enum send_target *target);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_disp_message_pre[hIndex].func;
preHookFunc(src, mes, &len, &target);
@@ -10975,7 +10975,7 @@ void HP_clif_disp_message(struct block_list *src, const char *mes, int len, enum
HPMHooks.source.clif.disp_message(src, mes, len, target);
}
if( HPMHooks.count.HP_clif_disp_message_post ) {
- void (*postHookFunc) (struct block_list *src, const char *mes, int *len, enum send_target *target);
+ void (*postHookFunc) (struct block_list *src, const char *mes, size_t *len, enum send_target *target);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_disp_message_post[hIndex].func;
postHookFunc(src, mes, &len, &target);
@@ -10983,10 +10983,10 @@ void HP_clif_disp_message(struct block_list *src, const char *mes, int len, enum
}
return;
}
-void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type, enum send_target target) {
+void HP_clif_broadcast(struct block_list *bl, const char *mes, size_t len, int type, enum send_target target) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_broadcast_pre ) {
- void (*preHookFunc) (struct block_list *bl, const char *mes, int *len, int *type, enum send_target *target);
+ void (*preHookFunc) (struct block_list *bl, const char *mes, size_t *len, int *type, enum send_target *target);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_broadcast_pre[hIndex].func;
preHookFunc(bl, mes, &len, &type, &target);
@@ -11000,7 +11000,7 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type
HPMHooks.source.clif.broadcast(bl, mes, len, type, target);
}
if( HPMHooks.count.HP_clif_broadcast_post ) {
- void (*postHookFunc) (struct block_list *bl, const char *mes, int *len, int *type, enum send_target *target);
+ void (*postHookFunc) (struct block_list *bl, const char *mes, size_t *len, int *type, enum send_target *target);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_broadcast_post[hIndex].func;
postHookFunc(bl, mes, &len, &type, &target);
@@ -11008,10 +11008,10 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type
}
return;
}
-void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target) {
+void HP_clif_broadcast2(struct block_list *bl, const char *mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_broadcast2_pre ) {
- void (*preHookFunc) (struct block_list *bl, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target);
+ void (*preHookFunc) (struct block_list *bl, const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_broadcast2_pre[hIndex].func;
preHookFunc(bl, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target);
@@ -11025,7 +11025,7 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigne
HPMHooks.source.clif.broadcast2(bl, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, target);
}
if( HPMHooks.count.HP_clif_broadcast2_post ) {
- void (*postHookFunc) (struct block_list *bl, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target);
+ void (*postHookFunc) (struct block_list *bl, const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_broadcast2_post[hIndex].func;
postHookFunc(bl, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target);
@@ -11033,10 +11033,10 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigne
}
return;
}
-void HP_clif_messagecolor(struct block_list *bl, unsigned long color, const char *msg) {
+void HP_clif_messagecolor(struct block_list *bl, unsigned int color, const char *msg) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_messagecolor_pre ) {
- void (*preHookFunc) (struct block_list *bl, unsigned long *color, const char *msg);
+ void (*preHookFunc) (struct block_list *bl, unsigned int *color, const char *msg);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_messagecolor_pre[hIndex].func;
preHookFunc(bl, &color, msg);
@@ -11050,7 +11050,7 @@ void HP_clif_messagecolor(struct block_list *bl, unsigned long color, const char
HPMHooks.source.clif.messagecolor(bl, color, msg);
}
if( HPMHooks.count.HP_clif_messagecolor_post ) {
- void (*postHookFunc) (struct block_list *bl, unsigned long *color, const char *msg);
+ void (*postHookFunc) (struct block_list *bl, unsigned int *color, const char *msg);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_messagecolor_post[hIndex].func;
postHookFunc(bl, &color, msg);
@@ -11284,11 +11284,11 @@ int HP_clif_colormes(int fd, enum clif_colors color, const char *msg) {
}
return retVal___;
}
-bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, int *namelen_, char **message_, int *messagelen_) {
+bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_clif_process_message_pre ) {
- bool (*preHookFunc) (struct map_session_data *sd, int *format, char **name_, int *namelen_, char **message_, int *messagelen_);
+ bool (*preHookFunc) (struct map_session_data *sd, int *format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_process_message_pre[hIndex].func;
retVal___ = preHookFunc(sd, &format, name_, namelen_, message_, messagelen_);
@@ -11302,7 +11302,7 @@ bool HP_clif_process_message(struct map_session_data *sd, int format, char **nam
retVal___ = HPMHooks.source.clif.process_message(sd, format, name_, namelen_, message_, messagelen_);
}
if( HPMHooks.count.HP_clif_process_message_post ) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *format, char **name_, int *namelen_, char **message_, int *messagelen_);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_message_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_process_message_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, &format, name_, namelen_, message_, messagelen_);
@@ -13262,10 +13262,10 @@ void HP_clif_bg_xy_remove(struct map_session_data *sd) {
}
return;
}
-void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, int len) {
+void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, size_t len) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_bg_message_pre ) {
- void (*preHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, int *len);
+ void (*preHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, size_t *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_bg_message_pre[hIndex].func;
preHookFunc(bgd, &src_id, name, mes, &len);
@@ -13279,7 +13279,7 @@ void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *n
HPMHooks.source.clif.bg_message(bgd, src_id, name, mes, len);
}
if( HPMHooks.count.HP_clif_bg_message_post ) {
- void (*postHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, int *len);
+ void (*postHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, size_t *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_bg_message_post[hIndex].func;
postHookFunc(bgd, &src_id, name, mes, &len);
@@ -14097,13 +14097,13 @@ void HP_clif_quest_send_mission(struct map_session_data *sd) {
}
return;
}
-void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd, int index) {
+void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_add_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ void (*preHookFunc) (struct map_session_data *sd, struct quest *qd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_add_pre[hIndex].func;
- preHookFunc(sd, qd, &index);
+ preHookFunc(sd, qd);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -14111,13 +14111,13 @@ void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd, int index)
}
}
{
- HPMHooks.source.clif.quest_add(sd, qd, index);
+ HPMHooks.source.clif.quest_add(sd, qd);
}
if( HPMHooks.count.HP_clif_quest_add_post ) {
- void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ void (*postHookFunc) (struct map_session_data *sd, struct quest *qd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_quest_add_post[hIndex].func;
- postHookFunc(sd, qd, &index);
+ postHookFunc(sd, qd);
}
}
return;
@@ -14172,13 +14172,13 @@ void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool
}
return;
}
-void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd, int index) {
+void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_quest_update_objective_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ void (*preHookFunc) (struct map_session_data *sd, struct quest *qd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_quest_update_objective_pre[hIndex].func;
- preHookFunc(sd, qd, &index);
+ preHookFunc(sd, qd);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -14186,13 +14186,13 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q
}
}
{
- HPMHooks.source.clif.quest_update_objective(sd, qd, index);
+ HPMHooks.source.clif.quest_update_objective(sd, qd);
}
if( HPMHooks.count.HP_clif_quest_update_objective_post ) {
- void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ void (*postHookFunc) (struct map_session_data *sd, struct quest *qd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_quest_update_objective_post[hIndex].func;
- postHookFunc(sd, qd, &index);
+ postHookFunc(sd, qd);
}
}
return;
@@ -15047,10 +15047,10 @@ void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) {
}
return;
}
-void HP_clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_data *sd) {
+void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre ) {
- void (*preHookFunc) (unsigned long *aid, struct map_session_data *sd);
+ void (*preHookFunc) (unsigned int *aid, struct map_session_data *sd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_pre[hIndex].func;
preHookFunc(&aid, sd);
@@ -15064,7 +15064,7 @@ void HP_clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_d
HPMHooks.source.clif.PartyBookingRefuseVolunteer(aid, sd);
}
if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post ) {
- void (*postHookFunc) (unsigned long *aid, struct map_session_data *sd);
+ void (*postHookFunc) (unsigned int *aid, struct map_session_data *sd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_post[hIndex].func;
postHookFunc(&aid, sd);
@@ -23253,14 +23253,14 @@ struct guild_castle* HP_guild_mapname2gc(const char *mapname) {
}
return retVal___;
}
-struct guild_castle* HP_guild_mapindex2gc(short mapindex) {
+struct guild_castle* HP_guild_mapindex2gc(short map_index) {
int hIndex = 0;
struct guild_castle* retVal___ = NULL;
if( HPMHooks.count.HP_guild_mapindex2gc_pre ) {
- struct guild_castle* (*preHookFunc) (short *mapindex);
+ struct guild_castle* (*preHookFunc) (short *map_index);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_guild_mapindex2gc_pre[hIndex].func;
- retVal___ = preHookFunc(&mapindex);
+ retVal___ = preHookFunc(&map_index);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -23268,13 +23268,13 @@ struct guild_castle* HP_guild_mapindex2gc(short mapindex) {
}
}
{
- retVal___ = HPMHooks.source.guild.mapindex2gc(mapindex);
+ retVal___ = HPMHooks.source.guild.mapindex2gc(map_index);
}
if( HPMHooks.count.HP_guild_mapindex2gc_post ) {
- struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short *mapindex);
+ struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short *map_index);
for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_guild_mapindex2gc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &mapindex);
+ retVal___ = postHookFunc(retVal___, &map_index);
}
}
return retVal___;
@@ -27396,11 +27396,11 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l
}
return retVal___;
}
-int HP_intif_broadcast(const char *mes, int len, int type) {
+int HP_intif_broadcast(const char *mes, size_t len, int type) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_intif_broadcast_pre ) {
- int (*preHookFunc) (const char *mes, int *len, int *type);
+ int (*preHookFunc) (const char *mes, size_t *len, int *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_broadcast_pre[hIndex].func;
retVal___ = preHookFunc(mes, &len, &type);
@@ -27414,7 +27414,7 @@ int HP_intif_broadcast(const char *mes, int len, int type) {
retVal___ = HPMHooks.source.intif.broadcast(mes, len, type);
}
if( HPMHooks.count.HP_intif_broadcast_post ) {
- int (*postHookFunc) (int retVal___, const char *mes, int *len, int *type);
+ int (*postHookFunc) (int retVal___, const char *mes, size_t *len, int *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_broadcast_post[hIndex].func;
retVal___ = postHookFunc(retVal___, mes, &len, &type);
@@ -27422,11 +27422,11 @@ int HP_intif_broadcast(const char *mes, int len, int type) {
}
return retVal___;
}
-int HP_intif_broadcast2(const char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY) {
+int HP_intif_broadcast2(const char *mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_intif_broadcast2_pre ) {
- int (*preHookFunc) (const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
+ int (*preHookFunc) (const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_broadcast2_pre[hIndex].func;
retVal___ = preHookFunc(mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY);
@@ -27440,7 +27440,7 @@ int HP_intif_broadcast2(const char *mes, int len, unsigned long fontColor, short
retVal___ = HPMHooks.source.intif.broadcast2(mes, len, fontColor, fontType, fontSize, fontAlign, fontY);
}
if( HPMHooks.count.HP_intif_broadcast2_post ) {
- int (*postHookFunc) (int retVal___, const char *mes, int *len, unsigned long *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
+ int (*postHookFunc) (int retVal___, const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_broadcast2_post[hIndex].func;
retVal___ = postHookFunc(retVal___, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY);
@@ -27474,11 +27474,11 @@ int HP_intif_main_message(struct map_session_data *sd, const char *message) {
}
return retVal___;
}
-int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) {
+int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, size_t mes_len) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_intif_wis_message_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, char *nick, char *mes, int *mes_len);
+ int (*preHookFunc) (struct map_session_data *sd, char *nick, char *mes, size_t *mes_len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_wis_message_pre[hIndex].func;
retVal___ = preHookFunc(sd, nick, mes, &mes_len);
@@ -27492,7 +27492,7 @@ int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int
retVal___ = HPMHooks.source.intif.wis_message(sd, nick, mes, mes_len);
}
if( HPMHooks.count.HP_intif_wis_message_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *nick, char *mes, int *mes_len);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *nick, char *mes, size_t *mes_len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_wis_message_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, nick, mes, &mes_len);
@@ -28046,11 +28046,11 @@ int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int le
}
return retVal___;
}
-int HP_intif_guild_change_gm(int guild_id, const char *name, int len) {
+int HP_intif_guild_change_gm(int guild_id, const char *name, size_t len) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_intif_guild_change_gm_pre ) {
- int (*preHookFunc) (int *guild_id, const char *name, int *len);
+ int (*preHookFunc) (int *guild_id, const char *name, size_t *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_guild_change_gm_pre[hIndex].func;
retVal___ = preHookFunc(&guild_id, name, &len);
@@ -28064,7 +28064,7 @@ int HP_intif_guild_change_gm(int guild_id, const char *name, int len) {
retVal___ = HPMHooks.source.intif.guild_change_gm(guild_id, name, len);
}
if( HPMHooks.count.HP_intif_guild_change_gm_post ) {
- int (*postHookFunc) (int retVal___, int *guild_id, const char *name, int *len);
+ int (*postHookFunc) (int retVal___, int *guild_id, const char *name, size_t *len);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_guild_change_gm_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &guild_id, name, &len);
@@ -28539,31 +28539,30 @@ int HP_intif_homunculus_requestdelete(int homun_id) {
}
return retVal___;
}
-int HP_intif_request_questlog(struct map_session_data *sd) {
+void HP_intif_request_questlog(struct map_session_data *sd) {
int hIndex = 0;
- int retVal___ = 0;
if( HPMHooks.count.HP_intif_request_questlog_pre ) {
- int (*preHookFunc) (struct map_session_data *sd);
+ void (*preHookFunc) (struct map_session_data *sd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_intif_request_questlog_pre[hIndex].func;
- retVal___ = preHookFunc(sd);
+ preHookFunc(sd);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.intif.request_questlog(sd);
+ HPMHooks.source.intif.request_questlog(sd);
}
if( HPMHooks.count.HP_intif_request_questlog_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ void (*postHookFunc) (struct map_session_data *sd);
for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_intif_request_questlog_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd);
+ postHookFunc(sd);
}
}
- return retVal___;
+ return;
}
int HP_intif_quest_save(struct map_session_data *sd) {
int hIndex = 0;
@@ -35031,14 +35030,14 @@ bool HP_map_blid_exists(int id) {
}
return retVal___;
}
-int16 HP_map_mapindex2mapid(unsigned short mapindex) {
+int16 HP_map_mapindex2mapid(unsigned short map_index) {
int hIndex = 0;
int16 retVal___ = 0;
if( HPMHooks.count.HP_map_mapindex2mapid_pre ) {
- int16 (*preHookFunc) (unsigned short *mapindex);
+ int16 (*preHookFunc) (unsigned short *map_index);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func;
- retVal___ = preHookFunc(&mapindex);
+ retVal___ = preHookFunc(&map_index);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -35046,13 +35045,13 @@ int16 HP_map_mapindex2mapid(unsigned short mapindex) {
}
}
{
- retVal___ = HPMHooks.source.map.mapindex2mapid(mapindex);
+ retVal___ = HPMHooks.source.map.mapindex2mapid(map_index);
}
if( HPMHooks.count.HP_map_mapindex2mapid_post ) {
- int16 (*postHookFunc) (int16 retVal___, unsigned short *mapindex);
+ int16 (*postHookFunc) (int16 retVal___, unsigned short *map_index);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &mapindex);
+ retVal___ = postHookFunc(retVal___, &map_index);
}
}
return retVal___;
@@ -35109,14 +35108,14 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) {
}
return retVal___;
}
-int HP_map_setipport(unsigned short mapindex, uint32 ip, uint16 port) {
+int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_map_setipport_pre ) {
- int (*preHookFunc) (unsigned short *mapindex, uint32 *ip, uint16 *port);
+ int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func;
- retVal___ = preHookFunc(&mapindex, &ip, &port);
+ retVal___ = preHookFunc(&map_index, &ip, &port);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -35124,25 +35123,25 @@ int HP_map_setipport(unsigned short mapindex, uint32 ip, uint16 port) {
}
}
{
- retVal___ = HPMHooks.source.map.setipport(mapindex, ip, port);
+ retVal___ = HPMHooks.source.map.setipport(map_index, ip, port);
}
if( HPMHooks.count.HP_map_setipport_post ) {
- int (*postHookFunc) (int retVal___, unsigned short *mapindex, uint32 *ip, uint16 *port);
+ int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_setipport_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &mapindex, &ip, &port);
+ retVal___ = postHookFunc(retVal___, &map_index, &ip, &port);
}
}
return retVal___;
}
-int HP_map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
+int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_map_eraseipport_pre ) {
- int (*preHookFunc) (unsigned short *mapindex, uint32 *ip, uint16 *port);
+ int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func;
- retVal___ = preHookFunc(&mapindex, &ip, &port);
+ retVal___ = preHookFunc(&map_index, &ip, &port);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -35150,13 +35149,13 @@ int HP_map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
}
}
{
- retVal___ = HPMHooks.source.map.eraseipport(mapindex, ip, port);
+ retVal___ = HPMHooks.source.map.eraseipport(map_index, ip, port);
}
if( HPMHooks.count.HP_map_eraseipport_post ) {
- int (*postHookFunc) (int retVal___, unsigned short *mapindex, uint32 *ip, uint16 *port);
+ int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_eraseipport_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, &mapindex, &ip, &port);
+ retVal___ = postHookFunc(retVal___, &map_index, &ip, &port);
}
}
return retVal___;
@@ -38339,14 +38338,14 @@ int HP_mob_db_searchname(const char *str) {
}
return retVal___;
}
-int HP_mob_db_searchname_array_sub(struct mob_db *mob, const char *str, int flag) {
+int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int flag) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) {
- int (*preHookFunc) (struct mob_db *mob, const char *str, int *flag);
+ int (*preHookFunc) (struct mob_db *monster, const char *str, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_pre[hIndex].func;
- retVal___ = preHookFunc(mob, str, &flag);
+ retVal___ = preHookFunc(monster, str, &flag);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -38354,13 +38353,13 @@ int HP_mob_db_searchname_array_sub(struct mob_db *mob, const char *str, int flag
}
}
{
- retVal___ = HPMHooks.source.mob.db_searchname_array_sub(mob, str, flag);
+ retVal___ = HPMHooks.source.mob.db_searchname_array_sub(monster, str, flag);
}
if( HPMHooks.count.HP_mob_db_searchname_array_sub_post ) {
- int (*postHookFunc) (int retVal___, struct mob_db *mob, const char *str, int *flag);
+ int (*postHookFunc) (int retVal___, struct mob_db *monster, const char *str, int *flag);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mob, str, &flag);
+ retVal___ = postHookFunc(retVal___, monster, str, &flag);
}
}
return retVal___;
@@ -44809,32 +44808,6 @@ int HP_pc_class2idx(int class_) {
}
return retVal___;
}
-int HP_pc_get_group_level(struct map_session_data *sd) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_pc_get_group_level_pre ) {
- int (*preHookFunc) (struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_group_level_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_pc_get_group_level_pre[hIndex].func;
- retVal___ = preHookFunc(sd);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.pc.get_group_level(sd);
- }
- if( HPMHooks.count.HP_pc_get_group_level_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_group_level_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_pc_get_group_level_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd);
- }
- }
- return retVal___;
-}
bool HP_pc_can_give_items(struct map_session_data *sd) {
int hIndex = 0;
bool retVal___ = false;
@@ -44913,32 +44886,6 @@ bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) {
}
return retVal___;
}
-bool HP_pc_has_permission(struct map_session_data *sd, unsigned int permission) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_pc_has_permission_pre ) {
- bool (*preHookFunc) (struct map_session_data *sd, unsigned int *permission);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_permission_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_pc_has_permission_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &permission);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.pc.has_permission(sd, permission);
- }
- if( HPMHooks.count.HP_pc_has_permission_post ) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *permission);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_permission_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_pc_has_permission_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &permission);
- }
- }
- return retVal___;
-}
int HP_pc_set_group(struct map_session_data *sd, int group_id) {
int hIndex = 0;
int retVal___ = 0;
@@ -45431,14 +45378,14 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_pc_setpos(struct map_session_data *sd, unsigned short mapindex, int x, int y, clr_type clrtype) {
+int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setpos_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, unsigned short *mapindex, int *x, int *y, clr_type *clrtype);
+ int (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &mapindex, &x, &y, &clrtype);
+ retVal___ = preHookFunc(sd, &map_index, &x, &y, &clrtype);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -45446,25 +45393,25 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short mapindex, int x, in
}
}
{
- retVal___ = HPMHooks.source.pc.setpos(sd, mapindex, x, y, clrtype);
+ retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype);
}
if( HPMHooks.count.HP_pc_setpos_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *mapindex, int *x, int *y, clr_type *clrtype);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_setpos_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &mapindex, &x, &y, &clrtype);
+ retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y, &clrtype);
}
}
return retVal___;
}
-int HP_pc_setsavepoint(struct map_session_data *sd, short mapindex, int x, int y) {
+int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int y) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_pc_setsavepoint_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, short *mapindex, int *x, int *y);
+ int (*preHookFunc) (struct map_session_data *sd, short *map_index, int *x, int *y);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &mapindex, &x, &y);
+ retVal___ = preHookFunc(sd, &map_index, &x, &y);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -45472,13 +45419,13 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short mapindex, int x, int y
}
}
{
- retVal___ = HPMHooks.source.pc.setsavepoint(sd, mapindex, x, y);
+ retVal___ = HPMHooks.source.pc.setsavepoint(sd, map_index, x, y);
}
if( HPMHooks.count.HP_pc_setsavepoint_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *mapindex, int *x, int *y);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *map_index, int *x, int *y);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_setsavepoint_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &mapindex, &x, &y);
+ retVal___ = postHookFunc(retVal___, sd, &map_index, &x, &y);
}
}
return retVal___;
@@ -50930,6 +50877,31 @@ void HP_quest_init(bool minimal) {
}
return;
}
+void HP_quest_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_quest_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.quest.final();
+ }
+ if( HPMHooks.count.HP_quest_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
void HP_quest_reload(void) {
int hIndex = 0;
if( HPMHooks.count.HP_quest_reload_pre ) {
@@ -50955,13 +50927,13 @@ void HP_quest_reload(void) {
}
return;
}
-int HP_quest_search_db(int quest_id) {
+struct quest_db* HP_quest_db(int quest_id) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_quest_search_db_pre ) {
- int (*preHookFunc) (int *quest_id);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_search_db_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_quest_search_db_pre[hIndex].func;
+ struct quest_db* retVal___ = NULL;
+ if( HPMHooks.count.HP_quest_db_pre ) {
+ struct quest_db* (*preHookFunc) (int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_db_pre[hIndex].func;
retVal___ = preHookFunc(&quest_id);
}
if( *HPMforce_return ) {
@@ -50970,12 +50942,12 @@ int HP_quest_search_db(int quest_id) {
}
}
{
- retVal___ = HPMHooks.source.quest.search_db(quest_id);
+ retVal___ = HPMHooks.source.quest.db(quest_id);
}
- if( HPMHooks.count.HP_quest_search_db_post ) {
- int (*postHookFunc) (int retVal___, int *quest_id);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_search_db_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_quest_search_db_post[hIndex].func;
+ if( HPMHooks.count.HP_quest_db_post ) {
+ struct quest_db* (*postHookFunc) (struct quest_db* retVal___, int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_db_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &quest_id);
}
}
@@ -51142,11 +51114,11 @@ void HP_quest_update_objective(TBL_PC *sd, int mob_id) {
}
return;
}
-int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) {
+int HP_quest_update_status(TBL_PC *sd, int quest_id, enum quest_state qs) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_quest_update_status_pre ) {
- int (*preHookFunc) (TBL_PC *sd, int *quest_id, quest_state *qs);
+ int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_state *qs);
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_update_status_pre[hIndex].func;
retVal___ = preHookFunc(sd, &quest_id, &qs);
@@ -51160,7 +51132,7 @@ int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) {
retVal___ = HPMHooks.source.quest.update_status(sd, quest_id, qs);
}
if( HPMHooks.count.HP_quest_update_status_post ) {
- int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, quest_state *qs);
+ int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_state *qs);
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_quest_update_status_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, &quest_id, &qs);
@@ -51168,11 +51140,11 @@ int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) {
}
return retVal___;
}
-int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) {
+int HP_quest_check(TBL_PC *sd, int quest_id, enum quest_check_type type) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_quest_check_pre ) {
- int (*preHookFunc) (TBL_PC *sd, int *quest_id, quest_check_type *type);
+ int (*preHookFunc) (TBL_PC *sd, int *quest_id, enum quest_check_type *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_quest_check_pre[hIndex].func;
retVal___ = preHookFunc(sd, &quest_id, &type);
@@ -51186,7 +51158,7 @@ int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) {
retVal___ = HPMHooks.source.quest.check(sd, quest_id, type);
}
if( HPMHooks.count.HP_quest_check_post ) {
- int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, quest_check_type *type);
+ int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id, enum quest_check_type *type);
for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_quest_check_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, &quest_id, &type);
@@ -51194,6 +51166,31 @@ int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) {
}
return retVal___;
}
+void HP_quest_clear(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_quest_clear_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_clear_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.quest.clear();
+ }
+ if( HPMHooks.count.HP_quest_clear_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_clear_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
int HP_quest_read_db(void) {
int hIndex = 0;
int retVal___ = 0;
@@ -51323,6 +51320,32 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line,
}
return retVal___;
}
+bool HP_script_add_builtin(const struct script_function *buildin, bool override) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_script_add_builtin_pre ) {
+ bool (*preHookFunc) (const struct script_function *buildin, bool *override);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func;
+ retVal___ = preHookFunc(buildin, &override);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.add_builtin(buildin, override);
+ }
+ if( HPMHooks.count.HP_script_add_builtin_post ) {
+ bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool *override);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_add_builtin_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, buildin, &override);
+ }
+ }
+ return retVal___;
+}
void HP_script_parse_builtin(void) {
int hIndex = 0;
if( HPMHooks.count.HP_script_parse_builtin_pre ) {
@@ -52728,31 +52751,6 @@ void HP_script_reportfunc(struct script_state *st) {
}
return;
}
-void HP_script_disp_error_message2(const char *mes, const char *pos, int report) {
- int hIndex = 0;
- if( HPMHooks.count.HP_script_disp_error_message2_pre ) {
- void (*preHookFunc) (const char *mes, const char *pos, int *report);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_error_message2_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_script_disp_error_message2_pre[hIndex].func;
- preHookFunc(mes, pos, &report);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.script.disp_error_message2(mes, pos, report);
- }
- if( HPMHooks.count.HP_script_disp_error_message2_post ) {
- void (*postHookFunc) (const char *mes, const char *pos, int *report);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_error_message2_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_script_disp_error_message2_post[hIndex].func;
- postHookFunc(mes, pos, &report);
- }
- }
- return;
-}
void HP_script_disp_warning_message(const char *mes, const char *pos) {
int hIndex = 0;
if( HPMHooks.count.HP_script_disp_warning_message_pre ) {
@@ -54419,14 +54417,14 @@ const char* HP_script_getfuncname(struct script_state *st) {
}
return retVal___;
}
-bool HP_script_local_casecheck_add_str(const char *p, int h) {
+unsigned int HP_script_calc_hash_ci(const char *p) {
int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_script_local_casecheck_add_str_pre ) {
- bool (*preHookFunc) (const char *p, int *h);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_add_str_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_script_local_casecheck_add_str_pre[hIndex].func;
- retVal___ = preHookFunc(p, &h);
+ unsigned int retVal___ = 0;
+ if( HPMHooks.count.HP_script_calc_hash_ci_pre ) {
+ unsigned int (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_calc_hash_ci_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -54434,42 +54432,17 @@ bool HP_script_local_casecheck_add_str(const char *p, int h) {
}
}
{
- retVal___ = HPMHooks.source.script.local_casecheck_add_str(p, h);
+ retVal___ = HPMHooks.source.script.calc_hash_ci(p);
}
- if( HPMHooks.count.HP_script_local_casecheck_add_str_post ) {
- bool (*postHookFunc) (bool retVal___, const char *p, int *h);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_add_str_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_script_local_casecheck_add_str_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, &h);
+ if( HPMHooks.count.HP_script_calc_hash_ci_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_calc_hash_ci_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
}
}
return retVal___;
}
-void HP_script_local_casecheck_clear(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_script_local_casecheck_clear_pre ) {
- void (*preHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_clear_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_script_local_casecheck_clear_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.script.local_casecheck_clear();
- }
- if( HPMHooks.count.HP_script_local_casecheck_clear_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_script_local_casecheck_clear_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_script_local_casecheck_clear_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
/* searchstore */
bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) {
int hIndex = 0;
@@ -56049,14 +56022,14 @@ int HP_skill_name2id(const char *name) {
}
return retVal___;
}
-int HP_skill_isammotype(struct map_session_data *sd, int skill) {
+int HP_skill_isammotype(struct map_session_data *sd, int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_isammotype_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, int *skill);
+ int (*preHookFunc) (struct map_session_data *sd, int *skill_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &skill);
+ retVal___ = preHookFunc(sd, &skill_id);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -56064,13 +56037,13 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill) {
}
}
{
- retVal___ = HPMHooks.source.skill.isammotype(sd, skill);
+ retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id);
}
if( HPMHooks.count.HP_skill_isammotype_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill_id);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_isammotype_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &skill);
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
}
}
return retVal___;
@@ -60948,13 +60921,13 @@ int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt
}
return retVal___;
}
-void HP_status_calc_misc(struct block_list *bl, struct status_data *status, int level) {
+void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int level) {
int hIndex = 0;
if( HPMHooks.count.HP_status_calc_misc_pre ) {
- void (*preHookFunc) (struct block_list *bl, struct status_data *status, int *level);
+ void (*preHookFunc) (struct block_list *bl, struct status_data *st, int *level);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func;
- preHookFunc(bl, status, &level);
+ preHookFunc(bl, st, &level);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -60962,13 +60935,13 @@ void HP_status_calc_misc(struct block_list *bl, struct status_data *status, int
}
}
{
- HPMHooks.source.status.calc_misc(bl, status, level);
+ HPMHooks.source.status.calc_misc(bl, st, level);
}
if( HPMHooks.count.HP_status_calc_misc_post ) {
- void (*postHookFunc) (struct block_list *bl, struct status_data *status, int *level);
+ void (*postHookFunc) (struct block_list *bl, struct status_data *st, int *level);
for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_status_calc_misc_post[hIndex].func;
- postHookFunc(bl, status, &level);
+ postHookFunc(bl, st, &level);
}
}
return;
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index ff2e83cf9..0f1698d2a 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -6,6 +6,11 @@
# #
# MYPLUGINS = my_cool_plugin my_second_plugin #
# #
+# This is only needed if you want to build your plugin through #
+# 'make plugins' or 'make all'. If you don't add it to this list, #
+# you will still be able to build your plugin through #
+# 'make plugin.my_plugin' #
+# #
# Note: DO NOT include the .c extension!!! #
MYPLUGINS =
@@ -13,6 +18,10 @@ MYPLUGINS =
# #
######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ##################
+# All plugins in the src/plugins directory
+ALLPLUGINS = $(basename $(wildcard *.c))
+
+# Plugins that will be built through 'make plugins' or 'make all'
PLUGINS = sample db2sql HPMHooking $(MYPLUGINS)
COMMON_D = ../common
@@ -32,11 +41,11 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all $(PLUGINS) clean buildclean help
+.PHONY: all $(ALLPLUGINS) clean buildclean help
all: $(PLUGINS) Makefile
-$(PLUGINS): %: ../../plugins/%@DLLEXT@
+$(ALLPLUGINS): %: ../../plugins/%@DLLEXT@
buildclean:
@echo " CLEAN plugins (build temp files)"
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 1bf3f6c01..58dee4306 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -27,7 +27,7 @@ struct {
FILE *fp;
struct {
char *p;
- unsigned int len;
+ size_t len;
} buf[4];
char *db_name;
} tosql;
@@ -52,7 +52,7 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
if( (it = itemdb->exists(itemdb_readdb_libconfig_sub(entry,n,source))) ) {
char e_name[ITEM_NAME_LENGTH*2+1], e_jname[ITEM_NAME_LENGTH*2+1];
- const char *script = NULL;
+ const char *bonus = NULL;
char *str;
int i32;
unsigned int ui32, job = 0, upper = 0;
@@ -60,9 +60,9 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
SQL->EscapeString(NULL, e_name, it->name);
SQL->EscapeString(NULL, e_jname, it->jname);
- if( it->script ) { h_config_setting_lookup_string(entry, "Script", &script); hstr(script); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[0].len ) { tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000; RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); }
- if( it->equip_script ) { h_config_setting_lookup_string(entry, "OnEquipScript", &script); hstr(script); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[1].len ) { tosql.buf[1].len = tosql.buf[1].len + strlen(str) + 1000; RECREATE(tosql.buf[1].p,char,tosql.buf[1].len); } SQL->EscapeString(NULL, tosql.buf[1].p, str); }
- if( it->unequip_script ) { h_config_setting_lookup_string(entry, "OnUnequipScript", &script); hstr(script); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[2].len ) { tosql.buf[2].len = tosql.buf[2].len + strlen(str) + 1000; RECREATE(tosql.buf[2].p,char,tosql.buf[2].len); } SQL->EscapeString(NULL, tosql.buf[2].p, str); }
+ if( it->script ) { h_config_setting_lookup_string(entry, "Script", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[0].len ) { tosql.buf[0].len = tosql.buf[0].len + strlen(str) + 1000; RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); }
+ if( it->equip_script ) { h_config_setting_lookup_string(entry, "OnEquipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[1].len ) { tosql.buf[1].len = tosql.buf[1].len + strlen(str) + 1000; RECREATE(tosql.buf[1].p,char,tosql.buf[1].len); } SQL->EscapeString(NULL, tosql.buf[1].p, str); }
+ if( it->unequip_script ) { h_config_setting_lookup_string(entry, "OnUnequipScript", &bonus); hstr(bonus); str = tosql.buf[3].p; if ( strlen(str) > tosql.buf[2].len ) { tosql.buf[2].len = tosql.buf[2].len + strlen(str) + 1000; RECREATE(tosql.buf[2].p,char,tosql.buf[2].len); } SQL->EscapeString(NULL, tosql.buf[2].p, str); }
if( h_config_setting_lookup_int(entry, "Job", &i32) ) // This is an unsigned value, do not check for >= 0
ui32 = (unsigned int)i32;
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 552194e43..b3e2b570f 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -109,6 +109,10 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd,int *n,int *amou
}
return 1;
}
+void parse_my_setting(const char *val) {
+ ShowDebug("Received 'my_setting:%s'\n",val);
+ /* do anything with the var e.g. config_switch(val) */
+}
/* run when server starts */
HPExport void plugin_init (void) {
char *server_type;
@@ -168,7 +172,14 @@ HPExport void plugin_init (void) {
/* if the original pc->dropitem was successful and the amount stored on my_pc_dropitem_storage is higher than 1, */
/* our posthook will display a message to the user about the cap */
/* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */
- addHookPost("pc->dropitem",my_pc_dropitem_post);
+ addHookPost("pc->dropitem",my_pc_dropitem_post);
+}
+/* triggered when server starts loading, before any server-specific data is set */
+HPExport void server_preinit (void) {
+ /* makes map server listen to mysetting:value in any "battleconf" file (including imported or custom ones) */
+ /* value is not limited to numbers, its passed to our plugins handler (parse_my_setting) as const char *,
+ * and thus can be manipulated at will */
+ addBattleConf("my_setting",parse_my_setting);
}
/* run when server is ready (online) */
HPExport void server_online (void) {
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index 307aa6d2c..3d0de1122 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -4,9 +4,9 @@ CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_OBJ = $(addprefix $(COMMON_D)/obj_all/, des.o grfio.o malloc.o \
- miniconsole.o minicore.o showmsg.o strlib.o utils.o)
+ nullpo.o miniconsole.o minicore.o showmsg.o strlib.o utils.o)
COMMON_H = $(addprefix $(COMMON_D)/, cbasetypes.h console.h core.h des.h \
- grfio.h malloc.h mmo.h showmsg.h strlib.h utils.h)
+ grfio.h malloc.h mmo.h nullpo.h showmsg.h strlib.h utils.h)
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index 49f948709..caa55c87a 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -181,7 +181,7 @@ void cache_map(char *name, struct map_data *m)
strncpy(info.name, name, MAP_NAME_LENGTH);
info.xs = MakeShortLE(m->xs);
info.ys = MakeShortLE(m->ys);
- info.len = MakeLongLE(len);
+ info.len = MakeLongLE((uint32)len);
// Append map header then compressed cells at the end of the file
fseek(map_cache_fp, header.file_size, SEEK_SET);
diff --git a/vcproj-10/mapcache.vcxproj b/vcproj-10/mapcache.vcxproj
index 61c6e8ea8..b8c901f14 100644
--- a/vcproj-10/mapcache.vcxproj
+++ b/vcproj-10/mapcache.vcxproj
@@ -124,19 +124,20 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\common\core.c" />
- <ClCompile Include="..\src\common\console.c" />
+ <ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\des.c" />
<ClCompile Include="..\src\common\grfio.c" />
<ClCompile Include="..\src\common\malloc.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\tool\mapcache.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\common\cbasetypes.h" />
<ClInclude Include="..\src\common\core.h" />
- <ClInclude Include="..\src\common\console.h" />
+ <ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\des.h" />
<ClInclude Include="..\src\common\grfio.h" />
<ClInclude Include="..\src\common\malloc.h" />
@@ -145,7 +146,8 @@
<ClInclude Include="..\src\common\strlib.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\src\common\winapi.h" />
- <ClInclude Include="..\src\config\renewal.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\config\renewal.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/vcproj-10/mapcache.vcxproj.filters b/vcproj-10/mapcache.vcxproj.filters
index b32268443..e095c1e1c 100644
--- a/vcproj-10/mapcache.vcxproj.filters
+++ b/vcproj-10/mapcache.vcxproj.filters
@@ -25,6 +25,9 @@
<ClCompile Include="..\src\common\utils.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\nullpo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\tool\mapcache.c">
<Filter>mapcache</Filter>
</ClCompile>
@@ -63,6 +66,9 @@
<ClInclude Include="..\src\common\winapi.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\nullpo.h">
+ <Filter>common</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="common">
diff --git a/vcproj-11/mapcache.vcxproj b/vcproj-11/mapcache.vcxproj
index 390e0cc65..1135461ad 100644
--- a/vcproj-11/mapcache.vcxproj
+++ b/vcproj-11/mapcache.vcxproj
@@ -128,19 +128,20 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\common\core.c" />
- <ClCompile Include="..\src\common\console.c" />
+ <ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\des.c" />
<ClCompile Include="..\src\common\grfio.c" />
<ClCompile Include="..\src\common\malloc.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\tool\mapcache.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\common\cbasetypes.h" />
<ClInclude Include="..\src\common\core.h" />
- <ClInclude Include="..\src\common\console.h" />
+ <ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\des.h" />
<ClInclude Include="..\src\common\grfio.h" />
<ClInclude Include="..\src\common\malloc.h" />
@@ -149,6 +150,7 @@
<ClInclude Include="..\src\common\strlib.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\src\common\winapi.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
<ClInclude Include="..\src\config\renewal.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/vcproj-11/mapcache.vcxproj.filters b/vcproj-11/mapcache.vcxproj.filters
index dea00ce79..3fe21d74b 100644
--- a/vcproj-11/mapcache.vcxproj.filters
+++ b/vcproj-11/mapcache.vcxproj.filters
@@ -4,7 +4,7 @@
<ClCompile Include="..\src\common\core.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\console.c">
+ <ClCompile Include="..\src\common\console.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\des.c">
@@ -25,6 +25,9 @@
<ClCompile Include="..\src\common\utils.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\nullpo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\tool\mapcache.c">
<Filter>mapcache</Filter>
</ClCompile>
@@ -36,7 +39,7 @@
<ClInclude Include="..\src\common\core.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\console.h">
+ <ClInclude Include="..\src\common\console.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\des.h">
@@ -63,6 +66,9 @@
<ClInclude Include="..\src\common\winapi.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\nullpo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\config\renewal.h" />
</ItemGroup>
<ItemGroup>
diff --git a/vcproj-12/mapcache.vcxproj b/vcproj-12/mapcache.vcxproj
index 44b063cba..3be84f4d4 100644
--- a/vcproj-12/mapcache.vcxproj
+++ b/vcproj-12/mapcache.vcxproj
@@ -135,6 +135,7 @@
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\tool\mapcache.c" />
</ItemGroup>
<ItemGroup>
@@ -149,6 +150,7 @@
<ClInclude Include="..\src\common\strlib.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\src\common\winapi.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
<ClInclude Include="..\src\config\renewal.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/vcproj-12/mapcache.vcxproj.filters b/vcproj-12/mapcache.vcxproj.filters
index dea00ce79..3fe21d74b 100644
--- a/vcproj-12/mapcache.vcxproj.filters
+++ b/vcproj-12/mapcache.vcxproj.filters
@@ -4,7 +4,7 @@
<ClCompile Include="..\src\common\core.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\console.c">
+ <ClCompile Include="..\src\common\console.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\des.c">
@@ -25,6 +25,9 @@
<ClCompile Include="..\src\common\utils.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\nullpo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\tool\mapcache.c">
<Filter>mapcache</Filter>
</ClCompile>
@@ -36,7 +39,7 @@
<ClInclude Include="..\src\common\core.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\console.h">
+ <ClInclude Include="..\src\common\console.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\des.h">
@@ -63,6 +66,9 @@
<ClInclude Include="..\src\common\winapi.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\nullpo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\config\renewal.h" />
</ItemGroup>
<ItemGroup>
diff --git a/vcproj-9/mapcache.vcproj b/vcproj-9/mapcache.vcproj
index eadf6b64e..a9d230b36 100644
--- a/vcproj-9/mapcache.vcproj
+++ b/vcproj-9/mapcache.vcproj
@@ -282,6 +282,14 @@
RelativePath="..\src\common\winapi.h"
>
</File>
+ <File
+ RelativePath="..\src\common\nullpo.h"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\nullpo.c"
+ >
+ </File>
</Filter>
<Filter
Name="mapcache"